diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php index 9336c71ba1..7fbb754cce 100644 --- a/wp-includes/assets/script-loader-packages.min.php +++ b/wp-includes/assets/script-loader-packages.min.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e7b4ea96175a89b263e2'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '9c45b8d28fc867ceed45'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '46c007fd3a0a068de86b'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '669a26513eaf893784f5'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '639e14271099dc3d85bf'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '065445ba618b21cd441f'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '0d0320f45a7c34b53f34'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fc0de6bb17aa25caf698'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '7ae69cc350436c0cf301'), 'data.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '90cebfec01d1a3f0368e'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'f8550b1212d715fbf745'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'e03c89e1dd68aee1cb3a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '9b8a238132518a33384d'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '2275cdf64d95c5ce4649'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '21e057ba167634bfd652'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '6573393b3d9ce0d07d66'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '03d3efe862cc12b89c2e'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'experiments.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7a09a31152667ba2d915'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cd4a10ec005e2f001978'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b696c16720133edfc065'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '184b321fa2d3bc7fd173'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'cd5fa2e68a534174e31f'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f837b6298c83612cd6f6'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '0d1b90278bae7df6ecf9'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'c66e137a7e588dab54c3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'dfac1545e52734396640'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f247ed2bc3571743bba'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd86e7e9f062d7582f76b'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'a7367a6154c724b51b31'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '29557b2dbbe17d0d4317'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'd1bc93277666143a3f5e'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '528e6cf281ffc9b7bd3c'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '16185fce2fb043a0cfed'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '4f6bd168b2b8b45c8a6b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '943ce7f84e164b9462c1'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e7b4ea96175a89b263e2'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '9c45b8d28fc867ceed45'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '8411e74b3cfdcd4b24c5'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '669a26513eaf893784f5'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '639e14271099dc3d85bf'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '76b10bc4ae2c6dd49d96'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '0d0320f45a7c34b53f34'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fc0de6bb17aa25caf698'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '7ae69cc350436c0cf301'), 'data.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '90cebfec01d1a3f0368e'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'f8550b1212d715fbf745'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'e03c89e1dd68aee1cb3a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '9b8a238132518a33384d'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '2275cdf64d95c5ce4649'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '21e057ba167634bfd652'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '6573393b3d9ce0d07d66'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '03d3efe862cc12b89c2e'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cd4a10ec005e2f001978'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b696c16720133edfc065'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '184b321fa2d3bc7fd173'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'cd5fa2e68a534174e31f'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f837b6298c83612cd6f6'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '0d1b90278bae7df6ecf9'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'c66e137a7e588dab54c3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'dfac1545e52734396640'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f247ed2bc3571743bba'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd86e7e9f062d7582f76b'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'a7367a6154c724b51b31'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '29557b2dbbe17d0d4317'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'd1bc93277666143a3f5e'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '528e6cf281ffc9b7bd3c'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '16185fce2fb043a0cfed'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '4f6bd168b2b8b45c8a6b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '943ce7f84e164b9462c1'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php index c3b8b512af..8a26c636b6 100644 --- a/wp-includes/assets/script-loader-packages.php +++ b/wp-includes/assets/script-loader-packages.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4358553d8083f2393262'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f0a8770c8b4a8ec390b9'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'a89547838e730a610587'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '024f9916777004b0c2d2'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '659c02a916d332d198d3'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '5f23cda55814f981387d'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'b11905a368f77f6e8e8f'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '4a01b5f18e2b115f2d26'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '60feb4306fe9534bc937'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'cc141d4539c9582ac6b8'), 'data.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '325ebd654e2aa93715a1'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '9cf52367916dd73a1aeb'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'b93565ec9d5379c780ad'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => 'a3ff013bf61f24d59040'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'f769ceebbfc77fa588c1'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '57415a737c616c945c5d'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '0dcee86072149fd871e7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '32f2aaffba82f1904a9b'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'experiments.js' => array('dependencies' => array('wp-polyfill'), 'version' => '26fe282451f7e704225c'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cf8adce62678d9a64c60'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'd9997e5c243ce7427d4e'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'e05b6bffe500867f27e8'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '25beb2547d1f3ac97be2'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b53823237263f9d526b5'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '86345f1b98bd487fb760'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'b68672fbcc78e405d114'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'd4082da1f03df7787408'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '16174c161e15be86c4e6'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1d62738f06e87528f62'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18f3ef9ff9519ffbb0b6'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '847fa8b3d926b1bcf533'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7ae393123206d036f3d9'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b844e727d75133fead36'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'a92cb36becaeba47ce44'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51bfa0ce50c94567c1d2'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '41dca70fa912251373d1'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51470de6b529e717152a'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '2769d3f5d7462b726ba8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '9c8407c203d2fd7274d1'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4358553d8083f2393262'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f0a8770c8b4a8ec390b9'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'c9d943dfdecaca4fae78'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '024f9916777004b0c2d2'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '659c02a916d332d198d3'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '5f23cda55814f981387d'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'abf472a7092181008571'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '4a01b5f18e2b115f2d26'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '60feb4306fe9534bc937'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'cc141d4539c9582ac6b8'), 'data.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '325ebd654e2aa93715a1'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '9cf52367916dd73a1aeb'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'b93565ec9d5379c780ad'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => 'a3ff013bf61f24d59040'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'f769ceebbfc77fa588c1'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '57415a737c616c945c5d'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '0dcee86072149fd871e7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '32f2aaffba82f1904a9b'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cf8adce62678d9a64c60'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'd9997e5c243ce7427d4e'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'e05b6bffe500867f27e8'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '25beb2547d1f3ac97be2'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b53823237263f9d526b5'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '86345f1b98bd487fb760'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'b68672fbcc78e405d114'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'd4082da1f03df7787408'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '16174c161e15be86c4e6'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1d62738f06e87528f62'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18f3ef9ff9519ffbb0b6'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '847fa8b3d926b1bcf533'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7ae393123206d036f3d9'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b844e727d75133fead36'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'a92cb36becaeba47ce44'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51bfa0ce50c94567c1d2'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '41dca70fa912251373d1'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51470de6b529e717152a'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '2769d3f5d7462b726ba8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '9c8407c203d2fd7274d1'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index ba6fd42607..32185e8b60 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -49080,8 +49080,8 @@ var Cropper = /** @class */function (_super) { _this.rafDragTimeout = null; _this.rafPinchTimeout = null; _this.wheelTimer = null; - _this.currentDoc = document; - _this.currentWindow = window; + _this.currentDoc = typeof document !== 'undefined' ? document : null; + _this.currentWindow = typeof window !== 'undefined' ? window : null; _this.resizeObserver = null; _this.state = { cropSize: null, @@ -49106,6 +49106,7 @@ var Cropper = /** @class */function (_super) { return e.preventDefault(); }; _this.cleanEvents = function () { + if (!_this.currentDoc) return; _this.currentDoc.removeEventListener('mousemove', _this.onMouseMove); _this.currentDoc.removeEventListener('mouseup', _this.onDragStopped); _this.currentDoc.removeEventListener('touchmove', _this.onTouchMove); @@ -49224,6 +49225,7 @@ var Cropper = /** @class */function (_super) { } }; _this.onMouseDown = function (e) { + if (!_this.currentDoc) return; e.preventDefault(); _this.currentDoc.addEventListener('mousemove', _this.onMouseMove); _this.currentDoc.addEventListener('mouseup', _this.onDragStopped); @@ -49233,6 +49235,7 @@ var Cropper = /** @class */function (_super) { return _this.onDrag(Cropper.getMousePoint(e)); }; _this.onTouchStart = function (e) { + if (!_this.currentDoc) return; _this.isTouching = true; if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) { return; @@ -49257,6 +49260,7 @@ var Cropper = /** @class */function (_super) { } }; _this.onGestureStart = function (e) { + if (!_this.currentDoc) return; e.preventDefault(); _this.currentDoc.addEventListener('gesturechange', _this.onGestureMove); _this.currentDoc.addEventListener('gestureend', _this.onGestureEnd); @@ -49296,6 +49300,7 @@ var Cropper = /** @class */function (_super) { _this.onDrag = function (_a) { var x = _a.x, y = _a.y; + if (!_this.currentWindow) return; if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout); _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () { if (!_this.state.cropSize) return; @@ -49318,6 +49323,7 @@ var Cropper = /** @class */function (_super) { (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); }; _this.onWheel = function (e) { + if (!_this.currentWindow) return; if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) { return; } @@ -49426,6 +49432,7 @@ var Cropper = /** @class */function (_super) { return _this; } Cropper.prototype.componentDidMount = function () { + if (!this.currentDoc || !this.currentWindow) return; if (this.containerRef) { if (this.containerRef.ownerDocument) { this.currentDoc = this.containerRef.ownerDocument; @@ -49466,6 +49473,7 @@ var Cropper = /** @class */function (_super) { }; Cropper.prototype.componentWillUnmount = function () { var _a, _b; + if (!this.currentDoc || !this.currentWindow) return; if (typeof window.ResizeObserver === 'undefined') { this.currentWindow.removeEventListener('resize', this.computeSizes); } @@ -49520,6 +49528,7 @@ var Cropper = /** @class */function (_super) { }; Cropper.prototype.onPinchMove = function (e) { var _this = this; + if (!this.currentDoc || !this.currentWindow) return; var pointA = Cropper.getTouchPoint(e.touches[0]); var pointB = Cropper.getTouchPoint(e.touches[1]); var center = getCenter(pointA, pointB); diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index 32c82b8b42..455ac5669f 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -38,4 +38,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var jE=function(e,t){return jE=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])},jE(e,t)};var WE=function(){return WE=Object.assign||function(e){for(var t,n=1,o=arguments.length;nu*r?{width:u*r,height:u}:{width:c,height:c/r}}function ZE(e,t,n,o,r){void 0===r&&(r=0);var l=iC(t.width,t.height,r),i=l.width,s=l.height;return{x:QE(e.x,i,n.width,o),y:QE(e.y,s,n.height,o)}}function QE(e,t,n,o){var r=t*o/2-n/2;return sC(e,-r,r)}function XE(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function JE(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function eC(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i?tC:nC,a=iC(t.width,t.height,l),c=iC(t.naturalWidth,t.naturalHeight,l),u={x:s(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:s(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:s(100,n.width/a.width*100/r),height:s(100,n.height/a.height*100/r)},d=Math.round(s(c.width,u.width*c.width/100)),p=Math.round(s(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:WE(WE({},m),{x:Math.round(s(c.width-m.width,u.x*c.width/100)),y:Math.round(s(c.height-m.height,u.y*c.height/100))})}}function tC(e,t){return Math.min(e,Math.max(0,t))}function nC(e,t){return t}function oC(e,t,n,o,r,l){var i=iC(t.width,t.height,n),s=sC(o.width/i.width*(100/e.width),r,l);return{crop:{x:s*i.width/2-o.width/2-i.width*s*(e.x/100),y:s*i.height/2-o.height/2-i.height*s*(e.y/100)},zoom:s}}function rC(e,t,n,o,r,l){void 0===n&&(n=0);var i=iC(t.naturalWidth,t.naturalHeight,n),s=sC(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*a,y:((i.height-e.height)/2-e.y)*a},zoom:s}}function lC(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function iC(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 sC(e,t,n){return Math.min(Math.max(e,t),n)}function aC(){for(var e=[],t=0;t0})).join(" ").trim()}var cC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=_s().createRef(),n.videoRef=_s().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=oC(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=rC(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();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(s.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=WE(WE({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:YE(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=WE({},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.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?ZE(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var o=t.getMousePoint(e),r=qE()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=sC(e,n.props.minZoom,n.props.maxZoom);if(l){var s=n.getPointOnContainer(t),a=n.getPointOnMedia(s),c={x:a.x*i-s.x,y:a.y*i-s.y},u=n.props.restrictPosition?ZE(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?eC(n.props.restrictPosition?ZE(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?ZE(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}jE(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e,t;void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,s,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(s=e.crop)||void 0===s?void 0:s.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())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=XE(n,o),this.lastPinchRotation=JE(n,o),this.onDragStart(lC(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=lC(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=XE(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=JE(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,s=i.x,a=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,g=m.containerStyle,f=m.cropAreaStyle,h=m.mediaStyle,v=t.classes,b=v.containerClassName,_=v.cropAreaClassName,k=v.mediaClassName,y=t.objectFit;return _s().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:aC("reactEasyCrop_Container",b)},n?_s().createElement("img",WE({alt:"",className:aC("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{src:n,ref:this.imageRef,style:WE(WE({},h),{transform:l||"translate(".concat(s,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&_s().createElement("video",WE({autoPlay:!0,loop:!0,muted:!0,className:aC("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:WE(WE({},h),{transform:l||"translate(".concat(s,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return _s().createElement("source",WE({key:e.src},e))}))),this.state.cropSize&&_s().createElement("div",{style:WE(WE({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:aC("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(_s().Component);const uC={placement:"bottom-start",variant:"toolbar"};function dC(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,borderProps:s}=e;const{isInProgress:a,editedUrl:c,position:d,zoom:m,aspect:g,setPosition:f,setCrop:v,setZoom:b,rotation:_}=UE();let k=o||r*l/i;return _%180==90&&(k=r*i/l),(0,u.createElement)("div",{className:p()("wp-block-image__crop-area",null==s?void 0:s.className,{"is-applying":a}),style:{...null==s?void 0:s.style,width:n||r,height:k}},(0,u.createElement)(cC,{image:c||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:g,onCropChange:e=>{f(e)},onCropComplete:e=>{v(e)},onZoomChange:e=>{b(100*e)}}),a&&(0,u.createElement)(h.Spinner,null))}var pC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function mC(){const{isInProgress:e,zoom:t,setZoom:n}=UE();return(0,u.createElement)(h.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:uC,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,u.createElement)(h.ToolbarButton,{icon:pC,label:(0,k.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,u.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var gC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function fC(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,u.createElement)(h.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,u.createElement)(h.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?$f:void 0},t)})))}function hC(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=UE();return(0,u.createElement)(h.DropdownMenu,{icon:gC,label:(0,k.__)("Aspect Ratio"),popoverProps:uC,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(fC,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("Original"),aspect:l},{title:(0,k.__)("Square"),aspect:1}]}),(0,u.createElement)(fC,{label:(0,k.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("16:10"),aspect:1.6},{title:(0,k.__)("16:9"),aspect:16/9},{title:(0,k.__)("4:3"),aspect:4/3},{title:(0,k.__)("3:2"),aspect:1.5}]}),(0,u.createElement)(fC,{label:(0,k.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("10:16"),aspect:.625},{title:(0,k.__)("9:16"),aspect:9/16},{title:(0,k.__)("3:4"),aspect:3/4},{title:(0,k.__)("2:3"),aspect:2/3}]}))}))}var vC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 bC(){const{isInProgress:e,rotateClockwise:t}=UE();return(0,u.createElement)(h.ToolbarButton,{icon:vC,label:(0,k.__)("Rotate"),onClick:t,disabled:e})}function _C(){const{isInProgress:e,apply:t,cancel:n}=UE();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarButton,{onClick:t,disabled:e},(0,k.__)("Apply")),(0,u.createElement)(h.ToolbarButton,{onClick:n},(0,k.__)("Cancel")))}function kC(e){let{id:t,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:s,onSaveImage:a,onFinishEditing:c,borderProps:d}=e;return(0,u.createElement)($E,{id:t,url:n,naturalWidth:s,naturalHeight:i,onSaveImage:a,onFinishEditing:c},(0,u.createElement)(dC,{borderProps:d,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:s}),(0,u.createElement)(Vo,null,(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(mC,null),(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(hC,{toggleProps:e}))),(0,u.createElement)(bC,null)),(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(_C,null))))}const yC=[25,50,75,100],EC=()=>{};function CC(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:o,imageSizeOptions:r=[],isResizable:l=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:d=EC}=e;const{currentHeight:p,currentWidth:m,updateDimension:g,updateDimensions:f}=function(e,t,n,o,r){var l,i;const[s,a]=(0,u.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[c,d]=(0,u.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==o&&a(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&a(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&d(e)}),[t,e]),{currentHeight:c,currentWidth:s,updateDimension:(e,t)=>{"width"===e?a(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),a(null!=t?t:o),r({height:e,width:t})}}}(a,s,o,n,c);return(0,u.createElement)(u.Fragment,null,r&&r.length>0&&(0,u.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Image size"),value:i,options:r,onChange:d,help:t}),l&&(0,u.createElement)("div",{className:"block-editor-image-size-control"},(0,u.createElement)("p",{className:"block-editor-image-size-control__row"},(0,k.__)("Image dimensions")),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,k.__)("Width"),value:m,min:1,onChange:e=>g("width",e)}),(0,u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,k.__)("Height"),value:p,min:1,onChange:e=>g("height",e)})),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(h.ButtonGroup,{"aria-label":(0,k.__)("Image size presets")},yC.map((e=>{const t=Math.round(n*(e/100)),r=Math.round(o*(e/100)),l=m===t&&p===r;return(0,u.createElement)(h.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>f(r,t)},e,"%")}))),(0,u.createElement)(h.Button,{isSmall:!0,onClick:()=>f()},(0,k.__)("Reset")))))}const SC=()=>{};var wC=e=>{let{value:t,onChange:n=SC,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,u.createElement)(h.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,u.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,u.createElement)(h.VisuallyHidden,{as:"legend"},(0,k.__)("Currently selected link settings")),l)},BC=n(5425),IC=n.n(BC);function xC(e){return"function"==typeof e}class TC extends u.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,u.createRef)(),this.inputRef=(0,u.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,isUpdatingSuggestions:!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.scrollingIntoView&&(this.scrollingIntoView=!0,IC()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.state.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),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(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);var l,i;if(t=t.trim(),!r&&(t.length<2||!o&&(0,vg.isURL)(t)))return null===(l=this.suggestionsRequest)||void 0===l||null===(i=l.cancel)||void 0===i||i.call(l),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:t,selectedSuggestion:null,loading:!1});this.setState({isUpdatingSuggestions:!0,selectedSuggestion:null,loading:!0});const s=n(t,{isInitialSuggestions:r});s.then((e=>{this.suggestionsRequest===s&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,k.sprintf)((0,k._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,k.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===s&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=s}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.state.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case ud.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case ud.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case ud.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case ud.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case ud.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case ud.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,k.__)("Link selected.")));break;case ud.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,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(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,u.createElement)(u.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:l=(0,k.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s=""}=this.props,{loading:a,showSuggestions:d,selectedSuggestion:m,suggestionsListboxId:g,suggestionOptionIdPrefix:f}=this.state,v=`url-input-control-${r}`,b={id:v,label:t,className:p()("block-editor-url-input",n,{"is-full-width":o})},_={id:v,value:s,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,k.__)("URL"),"aria-expanded":d,"aria-autocomplete":"list","aria-controls":g,"aria-activedescendant":null!==m?`${f}-${m}`:void 0,ref:this.inputRef};return i?i(b,_,a):(e||W()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,u.createElement)(h.BaseControl,c({__nextHasNoMarginBottom:e},b),(0,u.createElement)("input",_),a&&(0,u.createElement)(h.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:l,suggestionsListboxId:i,suggestionOptionIdPrefix:s,loading:a}=this.state;if(!n||0===o.length)return null;const d={id:i,ref:this.autocompleteRef,role:"listbox"},m=(e,t)=>({role:"option",tabIndex:"-1",id:`${s}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l});return xC(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:d,buildSuggestionItemProps:m,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!(null!=r&&r.length),currentInputValue:r}):(0,u.createElement)(h.Popover,{placement:"bottom",focusOnMount:!1},(0,u.createElement)("div",c({},d,{className:p()("block-editor-url-input__suggestions",`${e}__suggestions`)}),o.map(((e,t)=>(0,u.createElement)(h.Button,c({},m(0,t),{key:e.id,className:p()("block-editor-url-input__suggestion",{"is-selected":t===l}),onClick:()=>this.handleOnClick(e)}),e.title)))))}}var MC=(0,m.compose)(m.withSafeTimeout,h.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(xC(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(To);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(TC);var NC=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:i}=e;return n?(t=i?"function"==typeof i?i(n):i:(0,u.createInterpolateElement)((0,k.sprintf)((0,k.__)("Create: %s"),n),{mark:(0,u.createElement)("mark",null)}),(0,u.createElement)(h.Button,c({},r,{className:p()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,u.createElement)(Jl,{className:"block-editor-link-control__search-item-icon",icon:Ed}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var PC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.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 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var LC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var RC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.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"}));var AC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var OC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const DC={post:PC,page:By,post_tag:LC,category:RC,attachment:AC};function zC(e){let{isURL:t,suggestion:n}=e,o=null;return t?o=OC:n.type in DC&&(o=DC[n.type]),o?(0,u.createElement)(Jl,{className:"block-editor-link-control__search-item-icon",icon:o}):null}var FC=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:i="",shouldShowType:s=!1}=e;return(0,u.createElement)(h.Button,c({},t,{onClick:r,className:p()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),(0,u.createElement)(zC,{suggestion:n,isURL:l}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,u.createElement)(h.TextHighlight,{text:n.title,highlight:i})),(0,u.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(n.url))||""),l&&(0,k.__)("Press ENTER to add this link"))),s&&n.type&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const VC="__CREATE__",HC="mailto",GC="internal",UC=["URL",HC,"tel",GC],$C=[{id:"opensInNewTab",title:(0,k.__)("Open in new tab")}];function jC(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:i,suggestions:s,selectedSuggestion:a,isLoading:d,isInitialSuggestions:m,createSuggestionButtonText:g,suggestionsQuery:f}=e;const v=p()("block-editor-link-control__search-results",{"is-loading":d}),b=1===s.length&&UC.includes(s[0].type),_=n&&!b&&!m,y=!(null!=f&&f.type),E=`block-editor-link-control-search-results-label-${t}`,C=m?(0,k.__)("Recently updated"):(0,k.sprintf)((0,k.__)('Search results for "%s"'),o),S=(0,u.createElement)(m?u.Fragment:h.VisuallyHidden,{},(0,u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},C));return(0,u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,u.createElement)("div",c({},l,{className:v,"aria-labelledby":E}),s.map(((e,t)=>_&&VC===e.type?(0,u.createElement)(NC,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:i(e,t),isSelected:t===a}):VC===e.type?null:(0,u.createElement)(FC,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===a,isURL:UC.includes(e.type),searchTerm:o,shouldShowType:y,isFrontPage:null==e?void 0:e.isFrontPage})))))}function WC(e){const t=null==e?void 0:e.startsWith("#");return(0,vg.isURL)(e)||e&&e.includes("www.")||t}const KC=()=>Promise.resolve([]),qC=e=>{let t="URL";const n=(0,vg.getProtocol)(e)||"";return n.includes("mailto")&&(t=HC),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=GC),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,vg.prependHTTP)(e):e,type:t}])};function YC(e,t,n,o){const{fetchSearchSuggestions:r,pageOnFront:l}=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?qC:KC;return(0,u.useCallback)(((t,s)=>{let{isInitialSuggestions:a}=s;return WC(t)?i(t,{isInitialSuggestions:a}):(async(e,t,n,o,r,l,i)=>{const{isInitialSuggestions:s}=t;let a=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(a=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!a&&u&&l&&!s?c[0].concat(c[1]):c[0],s||WC(e)||!r?c:c.concat({title:e,url:e,type:VC})})(t,{...e,isInitialSuggestions:a},r,i,n,o,l)}),[i,r,n])}const ZC=()=>Promise.resolve([]),QC=()=>{},XC=(0,u.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:s=!1,onCreateSuggestion:a=QC,onChange:c=QC,onSelect:d=QC,showSuggestions:g=!0,renderSuggestions:f=(e=>(0,u.createElement)(jC,e)),fetchSuggestions:h=null,allowDirectEntry:v=!0,showInitialSuggestions:b=!1,suggestionsQuery:_={},withURLSuggestion:y=!0,createSuggestionButtonText:E,useLabel:C=!1}=e;const S=YC(_,v,s,y),w=g?h||S:ZC,B=(0,m.useInstanceId)(XC),[I,x]=(0,u.useState)(),T=async e=>{let t=e;if(VC!==e.type){if(v||t&&Object.keys(t).length>=1){const{id:e,url:n,...o}=null!=r?r:{};d({...o,...t},t)}}else try{var n;t=await a(e.title),null!==(n=t)&&void 0!==n&&n.url&&d(t)}catch(e){}},M=p()(l,{"has-no-label":!C});return(0,u.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,label:C?"URL":void 0,className:M,value:n,onChange:(e,t)=>{c(e),x(t)},placeholder:null!=i?i:(0,k.__)("Search or type url"),__experimentalRenderSuggestions:g?e=>f({...e,instanceId:B,withCreateSuggestion:s,createSuggestionButtonText:E,suggestionsQuery:_,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),T(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:b,onSubmit:(e,t)=>{var o;const r=e||I;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?T(r||{url:n}):t.preventDefault()},ref:t}),o)}));var JC=XC;var eS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var tS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:nS,Fill:oS}=(0,h.createSlotFill)("BlockEditorLinkControlViewer");function rS(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 lS=function(e){const[t,n]=(0,u.useReducer)(rS,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.useEffect)((()=>{if(null!=e&&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 iS(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:l=!1,onRemove:i}=e;const s=r?null==n?void 0:n.url:null,{richData:a,isFetching:c}=lS(s),d=a&&Object.keys(a).length,m=n&&(0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(n.url),16)||"",g=(null==a?void 0:a.title)||(null==n?void 0:n.title)||m,f=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let v;return v=null!=a&&a.icon?(0,u.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):f?(0,u.createElement)(Jl,{icon:eS,size:32}):(0,u.createElement)(Jl,{icon:OC}),(0,u.createElement)("div",{"aria-label":(0,k.__)("Currently selected"),className:p()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!c,"is-preview":!0,"is-error":f})},(0,u.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:p()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},v),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-details"},f?(0,u.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,k.__)("Link is empty")):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Ri.__unstableStripHTML)(g)),(null==n?void 0:n.url)&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-info"},m)))),(0,u.createElement)(h.Button,{icon:tS,label:(0,k.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),l&&(0,u.createElement)(h.Button,{icon:Cr,label:(0,k.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,u.createElement)(nS,{fillProps:n})),!!(d&&(null!=a&&a.image||null!=a&&a.description)||c)&&(0,u.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:p()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,u.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:p()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,u.createElement)(h.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}const sS=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}}};function aS(e){const[t,n]=(0,u.useState)(e||"");return(0,u.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const cS=()=>{};function uS(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=$C,onChange:s=cS,onRemove:a,onCancel:c,noDirectEntry:d=!1,showSuggestions:m=!0,showInitialSuggestions:g,forceIsEditingLink:f,createSuggestion:v,withCreateSuggestion:b,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===b&&v&&(b=!0);const I=(0,u.useRef)(!0),x=(0,u.useRef)(),T=(0,u.useRef)(),M=(0,u.useRef)(!1),[N,P]=aS((null==l?void 0:l.url)||""),[L,R]=aS((null==l?void 0:l.title)||""),[A,O]=(0,u.useState)(void 0!==f?f:!l||!l.url),{createPage:D,isCreatingPage:z,errorMessage:F}=function(e){const t=(0,u.useRef)(),[n,o]=(0,u.useState)(!1),[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=sS(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,k.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(v);(0,u.useEffect)((()=>{void 0!==f&&f!==A&&O(f)}),[f]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(Ri.focus.focusable.find(x.current)[e]||x.current).focus(),M.current=!1}),[A,z]);const V=(null==l||null===(t=l.url)||void 0===t||null===(n=t.trim())||void 0===n?void 0:n.length)>0,H=()=>{var e;M.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),O(!1)},G=()=>{U===(null==l?void 0:l.url)&&L===(null==l?void 0:l.title)||s({...l,url:U,title:L}),H()},U=_||N,$=!(null!=U&&null!==(o=U.trim())&&void 0!==o&&o.length),j=a&&l&&!A&&!z,W=!(null==i||!i.length),K=V&&w,q=(A||!l)&&!z;return(0,u.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},z&&(0,u.createElement)("div",{className:"block-editor-link-control__loading"},(0,u.createElement)(h.Spinner,null)," ",(0,k.__)("Creating"),"…"),q&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:p()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":K})},K&&(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:L,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==ud.ENTER||$||(e.preventDefault(),G())}}),(0,u.createElement)(JC,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:U,withCreateSuggestion:b,onCreateSuggestion:D,onChange:P,onSelect:e=>{s({...e,title:L||(null==e?void 0:e.title)}),H()},showInitialSuggestions:g,allowDirectEntry:!d,showSuggestions:m,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:K})),F&&(0,u.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),l&&!A&&!z&&(0,u.createElement)(iS,{key:null==l?void 0:l.url,value:l,onEditClick:()=>O(!0),hasRichPreviews:S,hasUnlinkControl:j,onRemove:a}),(0,u.createElement)("div",{className:"block-editor-link-control__drawer"},W&&(0,u.createElement)("div",{className:"block-editor-link-control__tools"},(0,u.createElement)(wC,{value:l,settings:i,onChange:s})),q&&(0,u.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,u.createElement)(h.Button,{variant:"primary",onClick:G,className:"xblock-editor-link-control__search-submit",disabled:$},(0,k.__)("Apply")),(0,u.createElement)(h.Button,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),P(null==l?void 0:l.url),R(null==l?void 0:l.title),V?H():null==a||a(),null==c||c()}},(0,k.__)("Cancel")))),B&&B())}uS.ViewerFill=oS;var dS=uS;var pS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));var mS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));var gS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 fS=()=>{};let hS=0;var vS=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Tm.store);return{createNotice:t,removeNotice:n}})),(0,h.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:o,allowedTypes:r,accept:l,onError:i,onSelect:s,onSelectURL:a,onToggleFeaturedImage:c,useFeaturedImage:d,onFilesUpload:p=fS,name:m=(0,k.__)("Replace"),createNotice:f,removeNotice:v,children:b,multiple:_=!1,addToGallery:y,handleUpload:E=!0}=e;const C=(0,g.useSelect)((e=>e(To).getSettings().mediaUpload),[]),S=(0,u.useRef)(),w="block-editor/media-replace-flow/error-notice/"+ ++hS,B=e=>{const t=(0,Ri.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{f("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},I=(e,t)=>{d&&c&&c(),t(),s(e),(0,pn.speak)((0,k.__)("The media file has been replaced")),v(w)},x=e=>{e.keyCode===ud.DOWN&&(e.preventDefault(),e.target.click())},T=_&&!(!r||0===r.length)&&r.every((e=>"image"===e||e.startsWith("image/")));return(0,u.createElement)(h.Dropdown,{popoverProps:{variant:"toolbar"},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,u.createElement)(h.ToolbarButton,{ref:S,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},m)},renderContent:e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Lg,{gallery:T,addToGallery:y,multiple:_,value:_?o:n,onSelect:e=>I(e,i),allowedTypes:r,render:e=>{let{open:t}=e;return(0,u.createElement)(h.MenuItem,{icon:pS,onClick:t},(0,k.__)("Open Media Library"))}}),(0,u.createElement)(Pg,null,(0,u.createElement)(h.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),s(n);p(n),C({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:B})})(e,i)},accept:l,multiple:_,render:e=>{let{openFileDialog:t}=e;return(0,u.createElement)(h.MenuItem,{icon:mS,onClick:()=>{t()}},(0,k.__)("Upload"))}}))),c&&(0,u.createElement)(h.MenuItem,{icon:gS,onClick:c,isPressed:d},(0,k.__)("Use featured image")),b),a&&(0,u.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,u.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,k.__)("Current media URL:")),(0,u.createElement)(h.Tooltip,{text:t,position:"bottom"},(0,u.createElement)("div",null,(0,u.createElement)(dS,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;a(t),S.current.focus()}})))))}})}));var bS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,u.createElement)(G.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-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"}));function _S(e){let{url:t,urlLabel:n,className:o}=e;const r=p()(o,"block-editor-url-popover__link-viewer-url");return t?(0,u.createElement)(h.ExternalLink,{className:r,href:t},n||(0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(t))):(0,u.createElement)("span",{className:r})}const{__experimentalPopoverLegacyPositionToPlacement:kS}=Io(h.privateApis);function yS(e){let t,{additionalControls:n,children:o,renderSettings:r,placement:l,focusOnMount:i="firstElement",position:s,...a}=e;void 0!==s&&W()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==l?t=l:void 0!==s&&(t=kS(s)),t=t||"bottom";const[d,p]=(0,u.useState)(!1),m=!!r&&d;return(0,u.createElement)(h.Popover,c({className:"block-editor-url-popover",focusOnMount:i,placement:t,shift:!0},a),(0,u.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,u.createElement)("div",{className:"block-editor-url-popover__row"},o,!!r&&(0,u.createElement)(h.Button,{className:"block-editor-url-popover__settings-toggle",icon:_f,label:(0,k.__)("Link settings"),onClick:()=>{p(!d)},"aria-expanded":d})),m&&(0,u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),n&&!m&&(0,u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},n))}yS.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,u.createElement)("form",c({className:p()("block-editor-url-popover__link-editor",n)},l),(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,value:r,onChange:o,autocompleteRef:t}),(0,u.createElement)(h.Button,{icon:bS,label:(0,k.__)("Apply"),type:"submit"}))},yS.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...i}=e;return(0,u.createElement)("div",c({className:p()("block-editor-url-popover__link-viewer",t)},i),(0,u.createElement)(_S,{url:r,urlLabel:l,className:n}),o&&(0,u.createElement)(h.Button,{icon:tS,label:(0,k.__)("Edit"),onClick:o}))};var ES=yS;const CS=()=>{},SS=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,u.createElement)(ES,{onClose:r},(0,u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,k.__)("URL"),placeholder:(0,k.__)("Paste or type URL"),onChange:n,value:t}),(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bS,label:(0,k.__)("Apply"),type:"submit"})))};var wS=(0,h.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:d,multiple:m=!1,handleUpload:f=!0,disableDropZone:v,disableMediaButtons:b,onError:_,onSelect:y,onCancel:E,onSelectURL:C,onToggleFeaturedImage:S,onDoubleClick:w,onFilesPreUpload:B=CS,onHTMLDrop:I=CS,children:x,mediaLibraryButton:T,placeholder:M,style:N}=e;const P=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return t().mediaUpload}),[]),[L,R]=(0,u.useState)(""),[A,O]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var e;R(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const D=e=>{R(e.target.value)},z=()=>{O(!0)},F=()=>{O(!1)},V=e=>{e.preventDefault(),L&&C&&(C(L),F())},H=e=>{if(!f)return y(e);let o;if(B(e),m)if(d){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));y(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=y;else o=e=>{let[t]=e;return y(t)};P({allowedTypes:n,filesList:e,onFileChange:o,onError:_})},G=e=>{H(e.target.files)},U=null!=M?M:e=>{let{instructions:t,title:c}=l;if(P||C||(t=(0,k.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&P&&(t=(0,k.__)("Upload a media file or pick one from your media library."),l?t=(0,k.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,k.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,k.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=(0,k.__)("Media"),l?c=(0,k.__)("Audio"):i?c=(0,k.__)("Image"):s&&(c=(0,k.__)("Video")))}const d=p()("block-editor-media-placeholder",o,{"is-appender":a});return(0,u.createElement)(h.Placeholder,{icon:r,label:c,instructions:t,className:d,notices:s,onDoubleClick:w,preview:i,style:N},e,x)},$=()=>v?null:(0,u.createElement)(h.DropZone,{onFilesDrop:H,onHTMLDrop:I}),j=()=>E&&(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,k.__)("Cancel"),variant:"link",onClick:E},(0,k.__)("Cancel")),W=()=>C&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:z,isPressed:A,variant:"tertiary"},(0,k.__)("Insert from URL")),A&&(0,u.createElement)(SS,{src:L,onChange:D,onSubmit:V,onClose:F})),K=()=>S&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:S,variant:"tertiary"},(0,k.__)("Use featured image")));return b?(0,u.createElement)(Pg,null,$()):(0,u.createElement)(Pg,{fallback:U(W())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,u.createElement)(h.Button,{variant:"tertiary",onClick:()=>{t()}},(0,k.__)("Media Library"))},o=(0,u.createElement)(Lg,{addToGallery:d,gallery:m&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:m,onSelect:y,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(P&&a)return(0,u.createElement)(u.Fragment,null,$(),(0,u.createElement)(h.FormFileUpload,{onChange:G,accept:c,multiple:m,render:e=>{let{openFileDialog:t}=e;const n=(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Button,{variant:"primary",className:p()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,k.__)("Upload")),o,W(),K(),j());return U(n)}}));if(P){const e=(0,u.createElement)(u.Fragment,null,$(),(0,u.createElement)(h.FormFileUpload,{variant:"primary",className:p()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:c,multiple:m},(0,k.__)("Upload")),o,W(),K(),j());return U(e)}return U(o)})())}));var BS=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,u.createElement)(HE,c({settings:o,gradients:[],disableCustomGradients:!0},n))};const IS={position:"bottom right",variant:"toolbar"};var xS=()=>(0,u.createElement)(u.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,u.createElement)(h.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,u.createElement)(h.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,u.createElement)(h.ToolbarItem,null,(n=>(0,u.createElement)(h.DropdownMenu,{icon:_f,label:(0,k.__)("More"),toggleProps:{...n,className:p()(n.className,{"is-pressed":t}),describedBy:(0,k.__)("Displays more block tools")},controls:Y(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:IS})))})));function TS(e){let{value:t,editableContentElement:n,activeFormats:o}=e;const r=o[o.length-1],l=null==r?void 0:r.type,i=(0,g.useSelect)((e=>e($.store).getFormatType(l)),[l]),s=(0,$.useAnchor)({editableContentElement:n,value:t,settings:i});return(0,u.createElement)(MS,{popoverAnchor:s})}function MS(e){let{popoverAnchor:t}=e;return(0,u.createElement)(h.Popover,{placement:"top",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,u.createElement)(Nf,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,k.__)("Format tools")},(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(xS,null))))}var NS=e=>{let{inline:t,editableContentElement:n,value:o}=e;const r=(0,g.useSelect)((e=>e(To).getSettings().hasInlineToolbar),[]);if(t)return(0,u.createElement)(MS,{popoverAnchor:n});if(r){const e=(0,$.getActiveFormats)(o);return(0,$.isCollapsed)(o)&&!e.length?null:(0,u.createElement)(TS,{editableContentElement:n,value:o,activeFormats:e})}return(0,u.createElement)(Vo,{group:"inline"},(0,u.createElement)(xS,null))};function PS(){const{didAutomaticChange:e,getSettings:t}=(0,g.useSelect)(To);return(0,m.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==ud.DELETE&&o!==ud.BACKSPACE&&o!==ud.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}var LS=window.wp.shortcode;function RS(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function AS(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function OS(e){let{allowedFormats:t,disableFormats:n}=e;return n?OS.EMPTY_ARRAY:t}OS.EMPTY_ARRAY=[];function DS(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const{start:s=0,end:a=0}=t,c={...t,start:s,end:a},u=[],[d,p]=(0,$.split)(c),m=n.length>0;let g=-1;const f=(0,$.isEmpty)(d)&&!(0,$.isEmpty)(p);m&&(0,$.isEmpty)(d)||(u.push(r((0,$.toHTMLString)({value:d,multilineTag:i}),!f)),g+=1),m?(u.push(...n),g+=n.length):l&&u.push(l()),(m||l)&&(0,$.isEmpty)(p)||u.push(r((0,$.toHTMLString)({value:p,multilineTag:i}),f));o(u,m?g:1,m?-1:0)}function zS(e,t){return t?(0,$.replace)(e,/\n+/g,$.__UNSTABLE_LINE_SEPARATOR):(0,$.replace)(e,new RegExp($.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function FS(e){const t=(0,u.useRef)(e);return t.current=e,(0,m.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:g,pastePlainText:f}=t.current;if(!n)return;const{clipboardData:h}=e;let v="",b="";try{v=h.getData("text/plain"),b=h.getData("text/html")}catch(e){try{b=h.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void r((0,$.insert)(l,v));const _=i.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:v})),e}),l);if(_!==l)return void r(_);const k=[...(0,Ri.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=h.getData("rich-text-multi-line-tag")||void 0;let t=(0,$.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:g});return t=zS(t,!!m),RS(t,l.activeFormats),void r((0,$.insert)(l,t))}if(f)return void r((0,$.insert)(l,(0,$.create)({text:v})));if(null!=k&&k.length&&window.console.log("Received items:\n\n",k),null!=k&&k.length&&!dh(k,b)){const e=(0,s.getBlockTransforms)("from"),t=k.reduce(((t,n)=>{const o=(0,s.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,$.isEmpty)(l)?c(t):DS({value:l,pastedBlocks:t,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,$.isEmpty)(l)&&(E=v,(0,LS.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,$.isEmpty)(l)&&(0,vg.isURL)(v.trim())&&(y="BLOCKS");const C=(0,s.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:g});if("string"==typeof C){let e=(0,$.create)({html:C});e=zS(e,!!m),RS(e,l.activeFormats),r((0,$.insert)(l,e))}else C.length>0&&(c&&(0,$.isEmpty)(l)?c(C,C.length-1,-1):DS({value:l,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const VS=["`",'"',"'","“”","‘’"];function HS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,g.useDispatch)(To),o=(0,u.useRef)(e);return o.current=e,(0,m.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:s,onChange:c}=o.current;if("insertText"!==l)return;if((0,$.isCollapsed)(s))return;const u=(0,a.applyFilters)("blockEditor.wrapSelectionSettings",VS).find((e=>{let[t,n]=e;return t===i||n===i}));if(!u)return;const[d,p=d]=u,m=s.start,g=s.end+d.length;let f=(0,$.insert)(s,d,m,m);f=(0,$.insert)(f,p,g,g),t(),c(f),n();const h={};for(const e in r)h[e]=r[e];h.data=p;const{ownerDocument:v}=e,{defaultView:b}=v,_=new b.InputEvent("input",h);window.queueMicrotask((()=>{r.target.dispatchEvent(_)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function GS(e){let t=e.length;for(;t--;){const n=gn(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(mn,""),e[t].clientId;const o=GS(e[t].innerBlocks);if(o)return o}}function US(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,g.useDispatch)(To),o=(0,u.useRef)(e);return o.current=e,(0,m.useRefEffect)((e=>{function r(){const{value:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const a=i.slice(0,l).trim(),c=(0,s.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,s.findTransform)(c,(e=>{let{prefix:t}=e;return a===t}));if(!u)return;const d=(0,$.toHTMLString)({value:(0,$.insert)(e,mn,0,l)}),p=u.transform(d);r(GS([p])),t([p]),n()}function l(e){const{inputType:l,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;c&&r&&r();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function $S(e){const{__unstableMarkAutomaticChange:t}=(0,g.useDispatch)(To),n=(0,u.useRef)(e);return n.current=e,(0,m.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;if(e.keyCode!==ud.ENTER)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;e.preventDefault();const m={...r};m.formats=o(r);const g=l&&i;if(l){const e=(0,s.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,s.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(l([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,$.insert)(m,"\n")):g&&(0,$.__unstableIsEmptyLine)(m)?DS({value:m,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c}):u((0,$.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!g&&!r?d||u((0,$.insert)(m,"\n")):!g&&r?p():g&&DS({value:m,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function jS(e){return e($.store).getFormatTypes()}const WS=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function KS(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,o]=e;return[`${t}.${n}`,o]})))}function qS(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function YS(e){return(0,m.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function ZS(e){return(0,m.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function QS(){const{__unstableMarkLastChangeAsPersistent:e}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function XS(){const{isMultiSelecting:e}=(0,g.useSelect)(To);return(0,m.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function JS(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const s=(0,$.getActiveFormat)(r,t);let a=void 0!==s;const c=(0,$.getActiveObject)(r),d=void 0!==c&&c.type===t;if("core/link"===t&&!(0,$.isCollapsed)(r)){var p,m;const e=r.formats,t=null===(p=e[r.start])||void 0===p?void 0:p.find((e=>{let{type:t}=e;return"core/link"===t})),n=null===(m=e[r.end-1])||void 0===m?void 0:m.find((e=>{let{type:t}=e;return"core/link"===t}));t&&n&&t===n||(a=!1)}return(0,u.createElement)(i,{key:t,isActive:a,activeAttributes:a&&s.attributes||{},isObjectActive:d,activeObjectAttributes:d&&c.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const ew=(0,u.createContext)(),tw=(0,u.createContext)();const nw=(0,u.forwardRef)((function e(t,n){let{children:o,tagName:r="div",value:l="",onChange:i,isSelected:a,multiline:d,inlineToolbar:f,wrapperClassName:v,autocompleters:b,onReplace:_,placeholder:k,allowedFormats:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:N,__unstableDisableFormats:P,disableLineBreaks:L,unstableOnFocus:R,__unstableAllowPrefixTransformations:A,...O}=t;d&&W()("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 D=(0,m.useInstanceId)(e);x=x||D,O=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,rootTagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:p,minWidth:m,maxWidth:g,setRef:f,disableSuggestions:h,disableAutocorrection:v,...b}=e;return b}(O);const z=(0,u.useRef)(),{clientId:F}=Ro(),{selectionStart:V,selectionEnd:H,isSelected:G}=(0,g.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(To),o=t(),r=n();let l;return void 0===a?l=o.clientId===F&&r.clientId===F&&o.attributeKey===x:a&&(l=o.clientId===F),{selectionStart:l?o.offset:void 0,selectionEnd:l?r.offset:void 0,isSelected:l}})),{getSelectionStart:U,getSelectionEnd:j,getBlockRootClientId:K}=(0,g.useSelect)(To),{selectionChange:q}=(0,g.useDispatch)(To),Y=AS(d),Z=OS({allowedFormats:y,disableFormats:P}),Q=!Z||Z.length>0;let X=l,J=i;Array.isArray(l)&&(W()("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/"}),X=s.children.toHTML(l),J=e=>i(s.children.fromDOM((0,$.__unstableCreateElement)(document,e).childNodes)));const ee=(0,u.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&K(F)!==K(j().clientId))return;n.start={clientId:F,attributeKey:x,offset:e}}if("number"==typeof t||o){if(void 0===e&&K(F)!==K(U().clientId))return;n.end={clientId:F,attributeKey:x,offset:t}}q(n)}),[F,x]),{formatTypes:te,prepareHandlers:ne,valueHandlers:oe,changeHandlers:re,dependencies:le}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,g.useSelect)(jS,[]),i=(0,u.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&WS.has(n))}))),[l,r,WS]),s=(0,g.useSelect)((e=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...KS(r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),r.name)}:o),{})),[i,t,n]),a=(0,g.useDispatch)(),c=[],d=[],p=[],m=[];for(const e in s)m.push(s[e]);return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=e.__experimentalCreatePrepareEditableTree(qS(s,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(o):c.push(o)}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:n,blockClientId:t}));const r=qS(s,e.name);p.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:c,valueHandlers:d,changeHandlers:p,dependencies:m}}({clientId:F,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Z});function ie(e){return te.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,$.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:se,onChange:ae,ref:ce}=(0,$.__unstableUseRichText)({value:X,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;J(e),Object.values(re).forEach((e=>{e(n,o)}))},selectionStart:V,selectionEnd:H,onSelectionChange:ee,placeholder:k,__unstableIsSelected:G,__unstableMultilineTag:Y,__unstableDisableFormats:P,preserveWhiteSpace:T,__unstableDependencies:[...le,r],__unstableAfterParse:function(e){return oe.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:ie,__unstableAddInvisibleFormats:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ue=function(e){return(0,h.__unstableUseAutocompleteProps)({...e,completers:My(e)})}({onReplace:_,completers:b,record:se,onChange:ae});!function(e){let{html:t,value:n}=e;const o=(0,u.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,g.useDispatch)(To);(0,u.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:X,value:se});const de=(0,u.useRef)(new Set),pe=(0,u.useRef)(new Set);function me(){var e;null===(e=z.current)||void 0===e||e.focus()}const ge=r;return(0,u.createElement)(u.Fragment,null,G&&(0,u.createElement)(ew.Provider,{value:de},(0,u.createElement)(tw.Provider,{value:pe},(0,u.createElement)(h.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:se,onChange:ae,onFocus:me}),(0,u.createElement)(JS,{value:se,onChange:ae,onFocus:me,formatTypes:te,forwardedRef:z})))),G&&Q&&(0,u.createElement)(NS,{inline:f,editableContentElement:z.current,value:se}),(0,u.createElement)(ge,c({role:"textbox","aria-multiline":!L,"aria-label":k},O,ue,{ref:(0,m.useMergeRefs)([n,ue.ref,O.ref,ce,HS({value:se,onChange:ae}),US({value:se,onChange:ae,__unstableAllowPrefixTransformations:A,formatTypes:te,onReplace:_,selectionChange:q}),QS(),(0,m.useRefEffect)((e=>{function t(e){(ud.isKeyboardEvent.primary(e,"z")||ud.isKeyboardEvent.primary(e,"y")||ud.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),YS(de),ZS(pe),PS(),FS({isSelected:G,disableFormats:P,onChange:ae,value:se,formatTypes:te,tagName:r,onReplace:_,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:N,multilineTag:Y,preserveWhiteSpace:T,pastePlainText:M}),$S({removeEditorOnlyFormats:ie,value:se,onReplace:_,onSplit:w,onSplitMiddle:I,multilineTag:Y,onChange:ae,disableLineBreaks:L,onSplitAtEnd:B}),XS(),z]),contentEditable:!0,suppressContentEditableWarning:!0,className:p()("block-editor-rich-text__editable",O.className,"rich-text"),onFocus:R,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===ud.DELETE||t===ud.BACKSPACE)){const{start:n,end:o,text:r}=se,l=t===ud.BACKSPACE,i=se.activeFormats&&!!se.activeFormats.length;if(!(0,$.isCollapsed)(se)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&(0,$.isEmpty)(se)&&l&&C(!l),e.preventDefault()}}})))}));nw.Content=e=>{let{value:t,tagName:n,multiline:o,...r}=e;Array.isArray(t)&&(W()("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/"}),t=s.children.toHTML(t));const l=AS(o);!t&&l&&(t=`<${l}>`);const i=(0,u.createElement)(u.RawHTML,null,t);if(n){const{format:e,...t}=r;return(0,u.createElement)(n,t,i)}return i},nw.isEmpty=e=>!e||0===e.length;var ow=nw;const rw=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(ow,c({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));rw.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,u.createElement)(n,o,t)};var lw=rw;var iw=(0,u.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,u.createElement)(lw,c({ref:t},o));const{className:r,onChange:l,...i}=o;return(0,u.createElement)(Xi.Z,c({ref:t,className:p()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},i))}));function sw(e){let{property:t,viewport:n,desc:o}=e;const r=(0,m.useInstanceId)(sw),l=o||(0,k.sprintf)((0,k._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."),t,n.label);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,u.createElement)(h.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var aw=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:s=!1,defaultLabel:a={id:"all",label:(0,k.__)("All")},viewports:c=[{id:"small",label:(0,k.__)("Small screens")},{id:"medium",label:(0,k.__)("Medium screens")},{id:"large",label:(0,k.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const d=o||(0,k.sprintf)((0,k.__)("Use the same %s on all screensizes."),n),m=(0,k.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,u.createElement)(sw,{property:n,viewport:a}),a);return(0,u.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,u.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,u.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,u.createElement)(h.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!s,onChange:r,help:m}),(0,u.createElement)("div",{className:p()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(i?i(c):c.map((e=>(0,u.createElement)(u.Fragment,{key:e.id},l((0,u.createElement)(sw,{property:n,viewport:e}),e))))))))};function cw(e){let{character:t,type:n,onUse:o}=e;const r=(0,u.useContext)(ew),l=(0,u.useRef)();return l.current=o,(0,u.useEffect)((()=>{function e(e){ud.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function uw(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,i="RichText.ToolbarControls";return n&&(i+=`.${n}`),o&&r&&(t=ud.displayShortcut[o](r)),(0,u.createElement)(h.Fill,{name:i},(0,u.createElement)(h.ToolbarButton,c({},l,{shortcut:t})))}function dw(e){let{inputType:t,onInput:n}=e;const o=(0,u.useContext)(tw),r=(0,u.useRef)();return r.current=n,(0,u.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const pw=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var mw=(0,u.forwardRef)((function(e,t){const n=(0,g.useSelect)((e=>e(To).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,g.useDispatch)(To);return(0,u.createElement)(h.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,u.createElement)(h.Button,c({},e,{ref:t,icon:"navigation"===n?pw:tS,"aria-expanded":r,"aria-haspopup":"true",onClick:l,label:(0,k.__)("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.NavigableMenu,{role:"menu","aria-label":(0,k.__)("Tools")},(0,u.createElement)(h.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jl,{icon:tS}),(0,k.__)("Edit"))},{value:"navigation",label:(0,u.createElement)(u.Fragment,null,pw,(0,k.__)("Select"))}]})),(0,u.createElement)("div",{className:"block-editor-tool-selector__help"},(0,k.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function gw(e){let{units:t,...n}=e;const o=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,u.createElement)(h.__experimentalUnitControl,c({units:o},n))}var fw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class hw extends u.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,k.__)("Edit link"):(0,k.__)("Insert link");return(0,u.createElement)("div",{className:"block-editor-url-input__button"},(0,u.createElement)(h.Button,{icon:Er,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,u.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,u.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,u.createElement)(h.Button,{className:"block-editor-url-input__back",icon:fw,label:(0,k.__)("Close"),onClick:this.toggle}),(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,u.createElement)(h.Button,{icon:bS,label:(0,k.__)("Submit"),type:"submit"}))))}}var vw=hw;var bw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const _w="none",kw="custom",yw="media",Ew="attachment",Cw=["noreferrer","noopener"],Sw=(0,u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(h.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,u.createElement)(h.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,u.createElement)(h.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),ww=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:s,linkClass:a,rel:c}=e;const[d,p]=(0,u.useState)(!1),[m,g]=(0,u.useState)(null),f=(0,u.useCallback)((()=>{p(!0)})),[v,b]=(0,u.useState)(!1),[_,y]=(0,u.useState)(null),E=(0,u.useRef)(null),C=(0,u.useCallback)((()=>{t!==yw&&t!==Ew||y(""),b(!0)})),S=(0,u.useCallback)((()=>{b(!1)})),w=(0,u.useCallback)((()=>{y(null),S(),p(!1)})),B=(0,u.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(p(!1),y(null),S())})),I=(0,u.useCallback)((()=>e=>{if(_){var t;const e=(null===(t=T().find((e=>e.url===_)))||void 0===t?void 0:t.linkDestination)||kw;n({href:_,linkDestination:e})}S(),y(null),e.preventDefault()})),x=(0,u.useCallback)((()=>{n({linkDestination:_w,href:""})})),T=()=>{const e=[{linkDestination:yw,title:(0,k.__)("Media File"),url:"image"===r?l:void 0,icon:Sw}];return"image"===r&&i&&e.push({linkDestination:Ew,title:(0,k.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(h.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,u.createElement)(h.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},M=(0,u.createElement)(h.__experimentalVStack,{spacing:"3"},(0,u.createElement)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");Cw.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===Cw.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Link CSS Class"),value:a||"",onChange:e=>{n({linkClass:e})}})),N=null!==_?_:o,P=(T().find((e=>e.linkDestination===t))||{}).title;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarButton,{icon:Er,className:"components-toolbar__control",label:o?(0,k.__)("Edit link"):(0,k.__)("Insert link"),"aria-expanded":d,onClick:f,ref:g}),d&&(0,u.createElement)(ES,{anchor:m,onFocusOutside:B(),onClose:w,renderSettings:()=>M,additionalControls:!N&&(0,u.createElement)(h.NavigableMenu,null,T().map((e=>(0,u.createElement)(h.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{y(null),(e=>{const t=T();let o;o=e?(t.find((t=>t.url===e))||{linkDestination:kw}).linkDestination:_w,n({linkDestination:o,href:e})})(e.url),S()}},e.title))))},(!o||v)&&(0,u.createElement)(ES.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:N,onChangeInputValue:y,onSubmit:I(),autocompleteRef:E}),o&&!v&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ES.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:C,urlLabel:P}),(0,u.createElement)(h.Button,{icon:bw,label:(0,k.__)("Remove link"),onClick:x}))))};function Bw(e){let{children:t,viewLabel:n,className:o,isEnabled:r=!0,deviceType:l,setDeviceType:i}=e;if((0,m.useViewportMatch)("small","<"))return null;const s={className:p()(o,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:n},c={"aria-label":(0,k.__)("View options")};return(0,u.createElement)(h.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:s,toggleProps:a,menuProps:c,icon:null},(()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Desktop"),icon:"Desktop"===l&&$f},(0,k.__)("Desktop")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Tablet"),icon:"Tablet"===l&&$f},(0,k.__)("Tablet")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Mobile"),icon:"Mobile"===l&&$f},(0,k.__)("Mobile"))),t)))}function Iw(e){const[t,n]=(0,u.useState)(window.innerWidth);(0,u.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var xw=(0,g.withSelect)((e=>({selectedBlockClientId:e(To).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=er(t);return t?(0,u.createElement)(h.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,k.__)("Skip to the selected block")):null})),Tw=window.wp.wordcount;var Mw=(0,g.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(To);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Tw.count)((0,s.serialize)(t),"words");return(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,u.createElement)(xd,{icon:Ff,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,k.sprintf)((0,k._n)("%d block","%d blocks",t.length),t.length)),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,k.sprintf)((0,k._n)("%d word","%d words",n),n))))}));function Nw(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:r}=(0,g.useSelect)((e=>{var n,o;const r=e(To).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:e(s.store).getBlockStyles(t)}}),[t]),l=(0,u.useMemo)((()=>[{label:(0,k.__)("Not set"),value:""},...r.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[r]),i=(0,u.useMemo)((()=>{var e;return null===(e=qf(r))||void 0===e?void 0:e.name}),[r]),a=(0,u.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==i?o&&(0,u.createElement)("div",{className:"default-style-picker__default-switcher"},(0,u.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,options:l,value:n||"",label:(0,k.__)("Default Style"),onChange:a})):null}var Pw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 Lw=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const Rw={name:"settings",title:"Settings",value:"settings",icon:Pw,className:"block-editor-block-inspector__tab-item"},Aw={name:"styles",title:"Styles",value:"styles",icon:Lw,className:"block-editor-block-inspector__tab-item"},Ow={name:"list",title:"List View",value:"list-view",icon:Gy,className:"block-editor-block-inspector__tab-item"};var Dw=()=>{const e=(0,h.__experimentalUseSlotFills)($r.slotName);return Boolean(e&&e.length)?(0,u.createElement)(h.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,k.__)("Advanced"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"advanced"})):null};var zw=()=>{const e=(0,h.__experimentalUseSlotFills)(Lr.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,u.createElement)(h.PanelBody,{className:"block-editor-block-inspector__position",title:(0,k.__)("Position"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"position"})):null},Fw=window.wp.preferences;const Vw="isInspectorControlsTabsHintVisible";function Hw(){const e=(0,g.useSelect)((e=>{var t;return null===(t=e(Fw.store).get("core",Vw))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,g.useDispatch)(Fw.store);return e?(0,u.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,u.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,k.__)("Looking for other block settings? They've moved to the styles tab.")),(0,u.createElement)(h.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:bw,iconSize:"16",label:(0,k.__)("Dismiss hint"),onClick:()=>{const e=Ri.focus.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",Vw,!1)},showTooltip:!1})):null}var Gw=e=>{let{showAdvancedControls:t=!1}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(zw,null),t&&(0,u.createElement)("div",null,(0,u.createElement)(Dw,null)),(0,u.createElement)(Hw,null))};var Uw=e=>{let{blockName:t,clientId:n,hasBlockStyles:o}=e;return(0,u.createElement)(u.Fragment,null,o&&(0,u.createElement)("div",null,(0,u.createElement)(h.PanelBody,{title:(0,k.__)("Styles")},(0,u.createElement)(fE,{clientId:n}),(0,s.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,u.createElement)(Nw,{blockName:t}))),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}))};const $w=["core/navigation"];var jw=e=>!$w.includes(e);function Ww(e){let{blockName:t,clientId:n,hasBlockStyles:o,tabs:r}=e;const l=jw(t)?void 0:Ow.name;return(0,u.createElement)(h.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:r,initialTabName:l,key:n},(e=>e.name===Rw.name?(0,u.createElement)(Gw,{showAdvancedControls:!!t}):e.name===Aw.name?(0,u.createElement)(Uw,{blockName:t,clientId:n,hasBlockStyles:o}):e.name===Ow.name?(0,u.createElement)(jr.Slot,{group:"list"}):void 0))}const Kw=[];function qw(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:s,styles:a,typography:c}=Lr,u=jw(e),d=(0,h.__experimentalUseSlotFills)(i.Slot.__unstableName),p=!u&&!!d&&d.length,m=[...(0,h.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,f=(0,h.__experimentalUseSlotFills)($r.slotName)||[],v=[...(0,h.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...p&&m>1?f:[]];p&&t.push(Ow),v.length&&t.push(Rw),m&&t.push(Aw);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,g.useSelect)((e=>e(To).getSettings().blockInspectorTabs),[]));return b?t:Kw}function Yw(e,t){const n=(0,u.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),o=(0,u.useCallback)((e=>!!n[e]),[e]);return(0,u.useMemo)((()=>Zw([t],o)),[t,o])}function Zw(e,t){const n=[];for(const o of e)t(o.name)&&n.push(o),n.push(...Zw(o.innerBlocks,t));return n}function Qw(e){let{blockTypes:t,block:n,selectedBlock:o}=e;const{selectBlock:r}=(0,g.useDispatch)(To),l=t.find((e=>{let{name:t}=e;return t===n.name})),i=o&&o.clientId===n.clientId;return(0,u.createElement)(h.Button,{isPressed:i,onClick:()=>r(n.clientId)},(0,u.createElement)(h.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(xd,{icon:l.icon}),(0,u.createElement)(h.FlexItem,null,l.title)))}function Xw(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:o,selectedBlock:r}=(0,g.useSelect)((e=>({blockTypes:e(s.store).getBlockTypes(),block:e(To).getBlock(t),selectedBlock:e(To).getSelectedBlock()})),[t]),l=gf(t),i=Yw(n,o);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Td,c({},l,{className:l.isSynced&&"is-synced"})),(0,u.createElement)(ME,{blockClientId:t}),(0,u.createElement)(h.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},(0,k.__)("Content")),i.map((e=>(0,u.createElement)(Qw,{selectedBlock:r,key:e.clientId,block:e,blockTypes:n})))))}const Jw=e=>{let{animate:t,wrapper:n,children:o}=e;return t?n(o):o},eB=e=>{let{blockInspectorAnimationSettings:t,selectedBlockClientId:n,children:o}=e;const r=t&&"leftToRight"===t.enterDirection?-50:50;return(0,u.createElement)(h.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},key:n},o)},tB=e=>{let{clientId:t,blockName:n}=e;const o=qw(n),r=(null==o?void 0:o.length)>1,l=(0,g.useSelect)((e=>{const{getBlockStyles:t}=e(s.store),o=t(n);return o&&o.length>0}),[n]),i=gf(t);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Td,c({},i,{className:i.isSynced&&"is-synced"})),(0,u.createElement)(ME,{blockClientId:t}),r&&(0,u.createElement)(Ww,{hasBlockStyles:l,clientId:t,blockName:n,tabs:o}),!r&&(0,u.createElement)(u.Fragment,null,l&&(0,u.createElement)("div",null,(0,u.createElement)(h.PanelBody,{title:(0,k.__)("Styles")},(0,u.createElement)(fE,{clientId:t}),(0,s.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,u.createElement)(Nw,{blockName:n}))),(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}),(0,u.createElement)(zw,null),(0,u.createElement)("div",null,(0,u.createElement)(Dw,null))),(0,u.createElement)(xw,{key:"back"}))};var nB=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:o,selectedBlockClientId:r,blockType:l,topLevelLockedBlock:i}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(To),i=t(),a=i&&o(i),c=a&&(0,s.getBlockType)(a);return{count:n(),selectedBlockClientId:i,selectedBlockName:a,blockType:c,topLevelLockedBlock:r(i)||("contentOnly"===l(i)?i:void 0)}}),[]),a=qw(null==l?void 0:l.name),c=(null==a?void 0:a.length)>1,d=(0,g.useSelect)((e=>{if(l){const t=e(To).getSettings().blockInspectorAnimation;return null==t?void 0:t[l.name]}return null}),[r,l]);if(n>1)return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Mw,null),c?(0,u.createElement)(Ww,{tabs:a}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"})));const p=o===(0,s.getUnregisteredTypeHandlerName)();return l&&r&&!p?i?(0,u.createElement)(Xw,{topLevelLockedBlock:i}):(0,u.createElement)(Jw,{animate:d,wrapper:e=>(0,u.createElement)(eB,{blockInspectorAnimationSettings:d,selectedBlockClientId:r},e)},(0,u.createElement)(tB,{clientId:r,blockName:l.name})):t?(0,u.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,k.__)("No block selected.")):null};var oB=function(e){let{__unstableContentRef:t}=e;const[n,o]=(0,u.useState)(!1),r=(0,g.useSelect)((e=>e(To).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{o(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?r.map(((e,n)=>n===r.length-1?null:(0,u.createElement)(rf,{key:e,previousClientId:e,nextClientId:r[n+1],__unstableContentRef:t},(0,u.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,u.createElement)(Zg,{position:"bottom center",clientId:r[n+1],__experimentalIsQuick:!0}))))):null};function rB(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(To);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function lB(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,m.useViewportMatch)("medium"),{hasFixedToolbar:l,isZoomOutMode:i,isTyping:s}=(0,g.useSelect)(rB,[]),a=(0,Hd.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:d,getBlockRootClientId:p}=(0,g.useSelect)(To),{duplicateBlocks:f,removeBlocks:v,insertAfterBlock:b,insertBeforeBlock:_,clearSelectedBlock:k,moveBlocksUp:y,moveBlocksDown:E}=(0,g.useDispatch)(To);const C=qr(n),S=qr(n);return(0,u.createElement)("div",c({},o,{onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);y(t,n)}}else if(a("core/block-editor/move-down",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);E(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=d();t.length&&(e.preventDefault(),f(t))}else if(a("core/block-editor/remove",e)){const t=d();t.length&&(e.preventDefault(),v(t))}else if(a("core/block-editor/insert-after",e)){const t=d();t.length&&(e.preventDefault(),b(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=d();t.length&&(e.preventDefault(),_(t[0]))}else if(a("core/block-editor/unselect",e)){d().length&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,u.createElement)(af.Provider,{value:(0,u.useRef)(!1)},!s&&(0,u.createElement)(uf,{__unstableContentRef:n}),!i&&(l||!r)&&(0,u.createElement)(av,{isFixed:!0}),(0,u.createElement)(Mv,{__unstableContentRef:n}),(0,u.createElement)(h.Popover.Slot,{name:"block-toolbar",ref:C}),t,(0,u.createElement)(h.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),i&&(0,u.createElement)(oB,{__unstableContentRef:n})))}const iB=()=>{};var sB=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:a,onSelect:c=iB,shouldFocusBlock:d=!1}=e;const{destinationRootClientId:p,prioritizePatterns:m}=(0,g.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:r}=e(To);return{destinationRootClientId:n||t(o)||void 0,prioritizePatterns:r().__experimentalPreferPatternsOnRoot}}),[o,n]);return(0,u.createElement)(Wg,{onSelect:c,rootClientId:p,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalInsertionIndex:s,__experimentalFilterValue:a,shouldFocusBlock:d,prioritizePatterns:m,ref:t})}));function aB(){return null}aB.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(Hd.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,k.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,k.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,k.__)("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,k.__)("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,k.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,k.__)("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,k.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,k.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,k.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,k.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var cB=aB;function uB(){return W()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const dB=new Set([ud.UP,ud.RIGHT,ud.DOWN,ud.LEFT,ud.ENTER,ud.BACKSPACE]);function pB(){const e=(0,g.useSelect)((e=>e(To).isTyping()),[]),{stopTyping:t}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function mB(){const{isTyping:e,hasInlineToolbar:t}=(0,g.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(To);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=(0,g.useDispatch)(To),r=pB(),l=(0,m.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,s=i.getSelection();if(e){let c;function u(e){const{target:t}=e;c=i.setTimeout((()=>{(0,Ri.isTextField)(t)||o()}))}function d(e){const{keyCode:t}=e;t!==ud.ESCAPE&&t!==ud.TAB||o()}function p(){s.isCollapsed||o()}return r.addEventListener("focus",u),r.addEventListener("keydown",d),t||l.addEventListener("selectionchange",p),()=>{i.clearTimeout(c),r.removeEventListener("focus",u),r.removeEventListener("keydown",d),l.removeEventListener("selectionchange",p)}}function a(e){const{type:t,target:o}=e;(0,Ri.isTextField)(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&dB.has(t)}(e))&&n()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n,o]);return(0,m.useMergeRefs)([r,l])}var gB=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:mB()},t)};const fB=-1!==window.navigator.userAgent.indexOf("Trident"),hB=new Set([ud.UP,ud.DOWN,ud.LEFT,ud.RIGHT]);function vB(){const e=(0,g.useSelect)((e=>e(To).hasSelectedBlock()),[]);return(0,m.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,Ri.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(hB.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,Ri.getScrollContainer)(t);if(!a)return;const c=a===n.body||a===n.documentElement,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const g=c?o.innerHeight:a.clientHeight;i.top+i.height>d+g||i.top{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!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(l)}}),[e])}var bB=fB?e=>e.children:function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:vB(),className:"block-editor__typewriter"},t)};const _B=(0,u.createContext)({});function kB(e){let{children:t,uniqueId:n,blockName:o=""}=e;const r=(0,u.useContext)(_B),{name:l}=Ro();o=o||l;const i=(0,u.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(r,o,n)),[r,o,n]);return(0,u.createElement)(_B.Provider,{value:i},t)}function yB(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,u.useContext)(_B),{name:r}=Ro();return n=n||r,Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e))}var EB=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 CB(e){let{title:t,help:n,actions:o=[],onClose:r}=e;return(0,u.createElement)(h.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,u.createElement)(h.__experimentalHStack,{alignment:"center"},(0,u.createElement)(h.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,u.createElement)(h.__experimentalSpacer,null),o.map((e=>{let{label:t,icon:n,onClick:o}=e;return(0,u.createElement)(h.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:o},!n&&t)})),r&&(0,u.createElement)(h.Button,{className:"block-editor-inspector-popover-header__action",label:(0,k.__)("Close"),icon:EB,onClick:r})),n&&(0,u.createElement)(h.__experimentalText,null,n))}var SB=(0,u.forwardRef)((function(e,t){let{onClose:n,onChange:o,...r}=e;return(0,u.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,u.createElement)(CB,{title:(0,k.__)("Publish"),actions:[{label:(0,k.__)("Now"),onClick:()=>null==o?void 0:o(null)}],onClose:n}),(0,u.createElement)(h.DateTimePicker,c({startOfWeek:(0,RE.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:o},r)))}));const wB={button:"wp-element-button",caption:"wp-element-caption"},BB=e=>wB[e]?wB[e]:"";function IB(e,t){return Object.entries(t).every((t=>{let[n,o]=t;return"object"==typeof o&&"object"==typeof e[n]?IB(e[n],o):e[n]===o}))}const xB=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&IB(e,n)}));return 1===n.length?n[0]:void 0};function TB(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function MB(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>TB(AB(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function NB(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=MB(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return TB(e)}function PB(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}function AB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=TB(e);return n.unit||(n=NB(e)),PB(e)&&!n.unit?LB(e):RB(n,t)}const OB={};function DB(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var zB=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+DB(t);return OB[n]||(OB[n]=AB(e,t)),OB[n]};function FB(e,t){var n,o;const{size:r}=e;if(!r||"0"===r)return r;if(null==t||!t.fluid||"object"==typeof(null==t?void 0:t.fluid)&&0===Object.keys(t.fluid).length)return r;if(!1===(null==e?void 0:e.fluid))return r;const l="object"==typeof(null==t?void 0:t.fluid)?null==t?void 0:t.fluid:{},i=G_({minimumFontSize:null==e||null===(n=e.fluid)||void 0===n?void 0:n.min,maximumFontSize:null==e||null===(o=e.fluid)||void 0===o?void 0:o.max,fontSize:r,minimumFontSizeLimit:null==l?void 0:l.minFontSize});return i||r}const VB="body",HB=[{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"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return FB(e,n)},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",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],GB={"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.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 UB(e,t,n,o,r){const l=[(0,f.get)(e,["blocks",t,...n]),(0,f.get)(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const s of l){const l=i[s];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return UB(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function $B(e,t,n,o){if(!o)return o;const r=GB[n],l=HB.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:s}=l,a=UB(e,t,s,i,o);return a?`var:preset|${r}|${a.slug}`:o}function jB(e,t,n){if(!n||"string"!=typeof n){var o,r;if(null===(o=n)||void 0===o||!o.ref||"string"!=typeof(null===(r=n)||void 0===r?void 0:r.ref))return n;{var l;const t=n.ref.split(".");if(!(n=(0,f.get)(e,t))||null!==(l=n)&&void 0!==l&&l.ref)return n}}const i="var:",s="var(--wp--";let a;if(n.startsWith(i))a=n.slice(i.length).split("|");else{if(!n.startsWith(s)||!n.endsWith(")"))return n;a=n.slice(s.length,-")".length).split("--")}const[c,...u]=a;return"preset"===c?function(e,t,n,o){let[r,l]=o;const i=HB.find((e=>e.cssVarInfix===r));if(!i)return n;const s=UB(e.settings,t,i.path,"slug",l);if(s){const{valueKey:n}=i;return jB(e,t,s[n])}return n}(e,t,n,u):"custom"===c?function(e,t,n,o){var r;const l=null!==(r=(0,f.get)(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:(0,f.get)(e.settings,["custom",...o]);return l?jB(e,t,l):n}(e,t,n,u):n}const WB=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),KB={settings:{},styles:{}},qB=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(WB);return[!!e&&!_()(e,KB),(0,u.useCallback)((()=>t((()=>KB))),[t])]};function YB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(WB),a=t?`settings.blocks.${t}.${e}`:`settings.${e}`,c=e=>{s((t=>{const n=JSON.parse(JSON.stringify(t));return(0,f.set)(n,a,e),n}))},d=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`;let s;switch(o){case"all":s=(0,f.get)(r,n);break;case"user":s=(0,f.get)(i,n);break;case"base":s=(0,f.get)(l,n);break;default:throw"Unsupported source"}return s},p=null!==(n=d(t))&&void 0!==n?n:d();return[p,c]}function ZB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(WB),a=t?`styles.blocks.${t}.${e}`:`styles.${e}`,c=n=>{s((o=>{const l=JSON.parse(JSON.stringify(o));return(0,f.set)(l,a,$B(r.settings,t,e,n)),l}))};let d;switch(o){case"all":d=jB(r,t,"styles.css"===a?(0,f.get)(i,a):null!==(n=(0,f.get)(i,a))&&void 0!==n?n:(0,f.get)(l,a));break;case"user":d=jB(r,t,(0,f.get)(i,a));break;case"base":d=jB(l,t,(0,f.get)(l,a));break;default:throw"Unsupported source"}return[d,c]}const QB={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function XB(e){var t;const n="var:";if(null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)){return`var(--wp--${e.slice(n.length).split("|").join("--")})`}return e}function JB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return HB.reduce(((n,o)=>{let{path:r,cssVarInfix:l,classes:i}=o;if(!i)return n;const s=(0,f.get)(t,r,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((t=>{let{slug:o}=t;i.forEach((t=>{let{classSuffix:r,propertyName:i}=t;const s=`.has-${(0,f.kebabCase)(o)}-${r}`,a=e.split(",").map((e=>`${e}${s}`)).join(","),c=`var(--wp--preset--${l}--${(0,f.kebabCase)(o)})`;n+=`${a}{${i}: ${c} !important;}`}))}))})),n}),"")}function eI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=[];return Object.keys(e).forEach((r=>{const l=t+(0,f.kebabCase)(r.replace("/","-")),i=e[r];if(i instanceof Object){const e=l+n;o=[...o,...eI(i,e,n)]}else o.push(`${l}: ${i}`)})),o}function tI(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}function nI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=VB===t,l=Object.entries(s.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,o)=>{let[l,{value:i,properties:s,useEngine:a,rootOnly:c}]=o;if(c&&!r)return t;const u=i;if("elements"===u[0]||a)return t;const d=(0,f.get)(e,u);if("--wp--style--root--padding"===l&&("string"==typeof d||!n))return t;if(s&&"string"!=typeof d)Object.entries(s).forEach((e=>{const[n,o]=e;if(!(0,f.get)(d,[o],!1))return;const r=n.startsWith("--")?n:(0,f.kebabCase)(n);t.push(`${r}: ${XB((0,f.get)(d,[o]))}`)}));else if((0,f.get)(e,u,!1)){const n=l.startsWith("--")?l:(0,f.kebabCase)(l);t.push(`${n}: ${XB((0,f.get)(e,u))}`)}return t}),[]),i=(0,ni.getCSSRules)(e);return i.forEach((e=>{var t;if(r&&n&&e.key.startsWith("padding"))return;const i=e.key.startsWith("--")?e.key:(0,f.kebabCase)(e.key);let s=e.value;if("string"!=typeof s&&null!==(t=s)&&void 0!==t&&t.ref){var a;const e=s.ref.split(".");if(s=(0,f.get)(o,e),!s||null!==(a=s)&&void 0!==a&&a.ref)return}var c;"font-size"===i&&(s=FB({size:s},null==o||null===(c=o.settings)||void 0===c?void 0:c.typography));l.push(`${i}: ${s}`)})),l}function oI(e){var t,n,o,r,l;let{tree:i,style:s,selector:a,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:d}=e,p="",m=c?Bl(null==s||null===(t=s.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(a===VB?m=m||"0.5em":!c&&d&&(m=d)),m&&null!=i&&null!==(n=i.settings)&&void 0!==n&&null!==(o=n.layout)&&void 0!==o&&o.definitions&&(Object.values(i.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:o}=e;(c||"flex"===n)&&null!=o&&o.length&&o.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,o]=e;n.push(`${t}: ${o||m}`)})),n.length){let o="";o=c?a===VB?`${a} .${t}${(null==e?void 0:e.selector)||""}`:`${a}.${t}${(null==e?void 0:e.selector)||""}`:a===VB?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${a}.${t}${(null==e?void 0:e.selector)||""})`,p+=`${o} { ${n.join("; ")}; }`}}))})),a===VB&&c&&(p+=`${a} { --wp--style--block-gap: ${m}; }`)),a===VB&&null!=i&&null!==(r=i.settings)&&void 0!==r&&null!==(l=r.layout)&&void 0!==l&&l.definitions){const e=["block","flex","grid"];Object.values(i.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:o,baseStyles:r}=t;o&&e.includes(o)&&(p+=`${a} .${n} { display:${o}; }`),null!=r&&r.length&&r.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,o]=e;t.push(`${n}: ${o}`)})),t.length){const o=`${a} .${n}${(null==e?void 0:e.selector)||""}`;p+=`${o} { ${t.join("; ")}; }`}}))}))}return p}const rI=(e,t)=>{var n,o;const r=[];if(null==e||!e.styles)return r;const l=e=>Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["border","color","dimensions","spacing","typography","filter","outline","shadow"].includes(t)}))),i=l(e.styles);return i&&r.push({styles:i,selector:VB}),Object.entries(s.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n;let[o,l]=t;var i;null!==(n=e.styles)&&void 0!==n&&n.elements[o]&&r.push({styles:null===(i=e.styles)||void 0===i?void 0:i.elements[o],selector:l})})),Object.entries(null!==(n=null===(o=e.styles)||void 0===o?void 0:o.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,o;let[i,a]=e;const c=l(a);if(null!=a&&a.variations){const e={};Object.keys(a.variations).forEach((t=>{e[t]=l(a.variations[t])})),c.variations=e}c&&null!=t&&null!==(n=t[i])&&void 0!==n&&n.selector&&r.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:c,featureSelectors:t[i].featureSelectors,styleVariationSelectors:t[i].styleVariationSelectors}),Object.entries(null!==(o=null==a?void 0:a.elements)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;o&&null!=t&&t[i]&&null!==s.__EXPERIMENTAL_ELEMENTS&&void 0!==s.__EXPERIMENTAL_ELEMENTS&&s.__EXPERIMENTAL_ELEMENTS[n]&&r.push({styles:o,selector:t[i].selector.split(",").map((e=>s.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),r},lI=(e,t)=>{var n,o,r;const l=[];if(null==e||!e.settings)return l;const i=e=>{const t={};return HB.forEach((n=>{let{path:o}=n;const r=(0,f.get)(e,o,!1);!1!==r&&(0,f.set)(t,o,r)})),t},s=i(e.settings),a=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,f.isEmpty)(s)&&!a||l.push({presets:s,custom:a,selector:VB}),Object.entries(null!==(o=null===(r=e.settings)||void 0===r?void 0:r.blocks)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;const r=i(o),s=o.custom;(0,f.isEmpty)(r)&&!s||l.push({presets:r,custom:s,selector:t[n].selector})})),l},iI=(e,t)=>{const n=lI(e,t);let o="";return n.forEach((t=>{let{presets:n,custom:r,selector:l}=t;const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return HB.reduce(((n,o)=>{let{path:r,valueKey:l,valueFunc:i,cssVarInfix:s}=o;const a=(0,f.get)(e,r,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{l&&!i?n.push(`--wp--preset--${s}--${(0,f.kebabCase)(e.slug)}: ${e[l]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${(0,f.kebabCase)(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),s=eI(r,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${l}{${i.join(";")};}`)})),o};function sI(e,t){return lI(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return HB.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,f.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,u.createElement)(sm,{preset:e,key:e.slug})))))}))}(t)}))}const aI=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function cI(){let{merged:e}=(0,u.useContext)(WB);const[t]=YB("spacing.blockGap"),n=null!==t,o=!n,r=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return!!t().disableLayoutStyles})),l=(0,g.useSelect)((e=>e(s.store).getBlockStyles),[]);return(0,u.useMemo)((()=>{var t,i,a;if(null===(t=e)||void 0===t||!t.styles||null===(i=e)||void 0===i||!i.settings)return[];e=function(e){var t,n,o,r,l,i,s,a;return!(null===(t=e.styles)||void 0===t?void 0:t.blocks["core/separator"])||!(null===(n=e.styles)||void 0===n||null===(o=n.blocks["core/separator"].color)||void 0===o?void 0:o.background)||null!==(r=e.styles)&&void 0!==r&&null!==(l=r.blocks["core/separator"].color)&&void 0!==l&&l.text||null!==(i=e.styles)&&void 0!==i&&null!==(s=i.blocks["core/separator"].border)&&void 0!==s&&s.color?e:{...e,styles:{...e.styles,blocks:{...e.styles.blocks,"core/separator":{...e.styles.blocks["core/separator"],color:{...e.styles.blocks["core/separator"].color,text:null===(a=e.styles)||void 0===a?void 0:a.blocks["core/separator"].color.background}}}}}}(e);const c=((e,t)=>{const n={};return e.forEach((e=>{var o,r,l,i,s,a,c,u,d;const p=e.name,m=null!==(o=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==o?o:".wp-block-"+p.replace("core/","").replace("/","-"),g=null!==(l=null==e||null===(i=e.supports)||void 0===i||null===(s=i.color)||void 0===s?void 0:s.__experimentalDuotone)&&void 0!==l?l:null,f=!(null==e||null===(a=e.supports)||void 0===a||!a.__experimentalLayout),h=null==e||null===(c=e.supports)||void 0===c||null===(u=c.spacing)||void 0===u||null===(d=u.blockGap)||void 0===d?void 0:d.__experimentalDefault,v=t(p),b={};null!=v&&v.length&&v.forEach((e=>{const t=`.is-style-${e.name}${m}`;b[e.name]=t}));const _={};Object.entries(QB).forEach((t=>{var n,o;let[r,l]=t;const i=null==e||null===(n=e.supports)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.__experimentalSelector;i&&(_[l]=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(m,i))})),n[p]={duotoneSelector:g,fallbackGapValue:h,featureSelectors:Object.keys(_).length?_:void 0,hasLayoutSupport:f,name:p,selector:m,styleVariationSelectors:Object.keys(b).length?b:void 0}})),n})((0,s.getBlockTypes)(),l),u=iI(e,c),d=function(e,t,n,o){var r,l;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=rI(e,t),a=lI(e,t),c=null==e||null===(r=e.settings)||void 0===r?void 0:r.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=(null==e||null===(l=e.settings)||void 0===l?void 0:l.layout)||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),c&&(p+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),p+="}",s.forEach((t=>{let{selector:r,duotoneSelector:l,styles:s,fallbackGapValue:a,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m}=t;d&&Object.entries(d).forEach((e=>{let[t,n]=e;if(null!=s&&s[t]){const e=nI({[t]:s[t]});delete s[t],e.length&&(p+=`${n}{${e.join(";")} }`)}})),m&&Object.entries(m).forEach((t=>{var n;let[o,r]=t;if(null!=s&&null!==(n=s.variations)&&void 0!==n&&n[o]){var l;d&&Object.entries(d).forEach((e=>{var t,n;let[l,i]=e;if(null!=s&&null!==(t=s.variations)&&void 0!==t&&null!==(n=t[o])&&void 0!==n&&n[l]){const e=nI({[l]:s.variations[o][l]});delete s.variations[o][l],e.length&&(p+=`${tI(i,r)}{${e.join(";")} }`)}}));const t=nI(null==s||null===(l=s.variations)||void 0===l?void 0:l[o],r,c,e);t.length&&(p+=`${r}{${t.join(";")}}`)}}));const g={};if(null!=s&&s.filter&&(g.filter=s.filter,delete s.filter),l){const e=nI(g);e.length>0&&(p+=`${l}{${e.join(";")};}`)}i||VB!==r&&!u||(p+=oI({tree:e,style:s,selector:r,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:a}));const f=nI(s,r,c,e);null!=f&&f.length&&(p+=`${r}{${f.join(";")};}`);const h=Object.entries(s).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=h&&h.length&&h.forEach((e=>{let[t,n]=e;const o=nI(n);if(null==o||!o.length)return;const l=`${r.split(",").map((e=>e+t)).join(",")}{${o.join(";")};}`;p+=l}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var m,g;const t=Bl(null==e||null===(m=e.styles)||void 0===m||null===(g=m.spacing)||void 0===g?void 0:g.blockGap)||"0.5em";p+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",p+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return a.forEach((e=>{let{selector:t,presets:n}=e;VB===t&&(t="");const o=JB(t,n);(0,f.isEmpty)(o)||(p+=o)})),p}(e,c,n,o,r),p=sI(e,c),m=[{css:u,isGlobalStyles:!0},{css:d,isGlobalStyles:!0},{css:null!==(a=e.styles.css)&&void 0!==a?a:"",isGlobalStyles:!0}];return(0,s.getBlockTypes)().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var o;const n=c[t.name].selector;m.push({css:aI(null===(o=e.styles.blocks[t.name])||void 0===o?void 0:o.css,n),isGlobalStyles:!0})}})),[m,e.settings,p]}),[n,o,e,r])}const uI=(0,u.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:o,...r}=e;const[l,i]=(0,u.useState)(null),s=(0,m.useInstanceId)(uI),{hideInserter:a,clientId:d}=(0,g.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n,getSelectedBlockClientId:o}=e(To),r=o();return{clientId:o(),hideInserter:!!t(r)||"zoom-out"===n()}}),[]),p=ff({clientId:d,context:"list-view"}),f=ff({clientId:null==l?void 0:l.clientId,context:"list-view"});if((0,u.useEffect)((()=>{null!=f&&f.length&&(0,pn.speak)((0,k.sprintf)((0,k.__)("%s block inserted"),f),"assertive")}),[f]),a)return null;const h=`off-canvas-editor-appender__${s}`,v=(0,k.sprintf)((0,k.__)("Append to %1$s block at position %2$d, Level %3$d"),p,o+1,n);return(0,u.createElement)("div",{className:"offcanvas-editor-appender"},(0,u.createElement)(Zg,c({ref:t,rootClientId:d,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},r,{toggleProps:{"aria-describedby":h},onSelectOrClose:e=>{null!=e&&e.clientId&&i(e)}})),(0,u.createElement)("div",{className:"offcanvas-editor-appender__description",id:h},v))})),dI=Ku(h.__experimentalTreeGridRow);function pI(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:i,path:s,...a}=e;const d=Zu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s});return(0,u.createElement)(dI,c({ref:d,className:p()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r},a),l)}function mI(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Jl,{icon:(0,k.isRTL)()?Wy:Oy}))}var gI=(0,u.forwardRef)((function(e,t){let{className:n,block:o,onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:s,onDragStart:a,onDragEnd:c,draggable:d}=e;const{clientId:m}=o,g=gf(m),f=ff({clientId:m,context:"list-view"}),{isLocked:v}=Oh(m),b=g?(0,k.sprintf)((0,k.__)("Edit %s block"),g.title):(0,k.__)("Edit");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Button,{className:p()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==ud.ENTER&&e.keyCode!==ud.SPACE||r(e)},ref:t,tabIndex:i,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==a||a(e)},onDragEnd:c,draggable:d,href:`#block-${m}`,"aria-hidden":!0,title:b},(0,u.createElement)(mI,{onClick:l}),(0,u.createElement)(xd,{icon:null==g?void 0:g.icon,showColors:!0,context:"list-view"}),(0,u.createElement)(h.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(h.__experimentalTruncate,{ellipsizeMode:"auto"},f)),(null==g?void 0:g.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(h.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},g.anchor)),v&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Jl,{icon:jy})))))})),fI=window.wp.escapeHtml;function hI(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}:{}}}function vI(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:o}=(0,g.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:o,getBlockTransformItems:r}=e(To);return{getBlock:n,blockTransforms:r(n(t),o(t))}}),[t]),{replaceBlock:r}=(0,g.useDispatch)(To),l=["core/page-list","core/site-logo","core/social-links","core/search"],i=o.filter((e=>l.includes(e.name)));return null!=i&&i.length&&t?(0,u.createElement)("div",{className:"link-control-transform"},(0,u.createElement)("h3",{className:"link-control-transform__subheading"},(0,k.__)("Transform")),(0,u.createElement)("div",{className:"link-control-transform__items"},i.map((e=>(0,u.createElement)(h.Button,{key:`transform-${e.name}`,onClick:()=>r(t,(0,s.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,u.createElement)(xd,{icon:e.icon}),e.title))))):null}function bI(e){const{label:t,url:n,opensInNewTab:o,type:r,kind:l}=e.link,i={url:n,opensInNewTab:o,title:t&&(0,Ri.__unstableStripHTML)(t)};return(0,u.createElement)(h.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,u.createElement)(dS,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:i,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:hI(r,l),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:n?null:()=>(0,u.createElement)(vI,{clientId:e.clientId})}))}const _I=["core/navigation-link","core/navigation-submenu"],kI=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:i,siblingBlockCount:s,level:a,isExpanded:d,selectedClientIds:m,...f}=e;const{clientId:h}=r,[v,b]=(0,u.useState)(),{blockMovingClientId:_,selectedBlockInBlockEditor:k,lastInsertedBlockClientId:y}=(0,g.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n,getLastInsertedBlocksClientIds:o}=Io(e(To)),r=o();return{blockMovingClientId:t(),selectedBlockInBlockEditor:n(),lastInsertedBlockClientId:r&&r[0]}}),[h]),{insertedBlockAttributes:E,insertedBlockName:C,setInsertedBlockAttributes:S}=(e=>{const{insertedBlockAttributes:t,insertedBlockName:n}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(To);return{insertedBlockAttributes:o(e),insertedBlockName:n(e)}}),[e]),{updateBlockAttributes:o}=(0,g.useDispatch)(To),r=t=>{e&&o(e,t)};return e?{insertedBlockAttributes:t,insertedBlockName:n,setInsertedBlockAttributes:r}:{insertedBlockAttributes:void 0,insertedBlockName:void 0,setInsertedBlockAttributes:r}})(y),w=null==E?void 0:E.id;(0,u.useEffect)((()=>{h===y&&null!=_I&&_I.includes(C)&&!w&&b(!0)}),[y,h,C,w]);const B=_&&k===h,I=p()("block-editor-list-view-block-contents",{"is-dropping-before":B}),x=m.includes(h)?m:[h];return(0,u.createElement)(u.Fragment,null,v&&(0,u.createElement)(bI,{clientId:y,link:E,onClose:()=>b(!1),hasCreateSuggestion:!1,onChange:e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:o="",kind:r="",type:l=""}=n,{title:i="",url:s="",opensInNewTab:a,id:c,kind:u=r,type:d=l}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),g=i&&i!==o&&p!==m?(0,fI.escapeHTML)(i):o||(0,fI.escapeHTML)(m),f="post_tag"===d?"tag":d.replace("-","_"),h=["post","page","tag","category"].indexOf(f)>-1,v=!u&&!h||"custom"===u?"custom":u;t({...s&&{url:encodeURI((0,vg.safeDecodeURI)(s))},...g&&{label:g},...void 0!==a&&{opensInNewTab:a},...c&&Number.isInteger(c)&&{id:c},...v&&{kind:v},...f&&"URL"!==f&&{type:f}})}(e,S,E),b(!1)}}),(0,u.createElement)(vf,{clientIds:x},(e=>{let{draggable:p,onDragStart:m,onDragEnd:g}=e;return(0,u.createElement)(gI,c({ref:t,className:I,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:i,siblingBlockCount:s,level:a,draggable:p,onDragStart:m,onDragEnd:g,isExpanded:d},f))})))}));var yI=kI;const EI=(0,u.createContext)({}),CI=()=>(0,u.useContext)(EI);var SI=(0,u.memo)((function e(t){let{block:{clientId:n},isDragged:o,isSelected:r,isBranchSelected:l,selectBlock:i,position:a,level:c,rowCount:d,siblingBlockCount:f,showBlockMovers:v,path:b,isExpanded:_,selectedClientIds:y,preventAnnouncement:E}=t;const C=(0,u.useRef)(null),[S,w]=(0,u.useState)(!1),{isLocked:B,isContentLocked:I}=Oh(n),x=(0,g.useSelect)((e=>!r&&(!!I&&e(To).hasSelectedInnerBlock(n,!0))),[I,n,r]),T=x||r&&y[0]===n,M=x||r&&y[y.length-1]===n,{toggleBlockHighlight:N}=(0,g.useDispatch)(To),P=gf(n),L=(0,g.useSelect)((e=>e(To).getBlock(n)),[n]);(0,u.useEffect)((()=>{!z&&r&&C.current.focus()}),[]);const R=(0,u.useCallback)((()=>{w(!0),N(n,!0)}),[n,w,N]),A=(0,u.useCallback)((()=>{w(!1),N(n,!1)}),[n,w,N]),O=(0,u.useCallback)((e=>{i(e,n),e.preventDefault()}),[n,i]),D=(0,u.useCallback)((e=>{i(void 0,e)}),[i]),{isTreeGridMounted:z,expand:F,collapse:V,LeafMoreMenu:H}=CI(),G=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?V(n):!1===_&&F(n)}),[n,F,V,_]),U=(0,m.useInstanceId)(e);if(!L)return null;const $=!!L&&(0,s.hasBlockSupport)(L.name,"__experimentalToolbar",!0),j=`list-view-block-select-button__${U}`,W=((e,t,n)=>(0,k.sprintf)((0,k.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(a,f,c);let K=(0,k.__)("Link");P&&(K=B?(0,k.sprintf)((0,k.__)("%s link (locked)"),P.title):(0,k.sprintf)((0,k.__)("%s link"),P.title));const q=P?(0,k.sprintf)((0,k.__)("Options for %s block"),P.title):(0,k.__)("Options"),Y=v&&f>0,Z=p()("block-editor-list-view-block__mover-cell",{"is-visible":S||r}),Q=p()("block-editor-list-view-block__menu-cell",{"is-visible":S||T});let X;Y?X=1:$||(X=2);const J=p()({"is-selected":r||x,"is-first-selected":T,"is-last-selected":M,"is-branch-selected":l,"is-dragging":o,"has-single-cell":!$}),ee=y.includes(n)?y:[n],te=H||Qh;return(0,u.createElement)(pI,{className:J,onMouseEnter:R,onMouseLeave:A,onFocus:R,onBlur:A,level:c,position:a,rowCount:d,path:b,id:`list-view-block-${n}`,"data-block":n,isExpanded:I?void 0:_,"aria-selected":!!r||x},(0,u.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:X,ref:C,"aria-label":K,"aria-selected":!!r||x,"aria-expanded":I?void 0:_,"aria-describedby":j},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(yI,{block:L,onClick:O,onToggleExpanded:G,isSelected:r,position:a,siblingBlockCount:f,level:c,ref:t,tabIndex:n,onFocus:o,isExpanded:_,selectedClientIds:y,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},W))})),Y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalTreeGridCell,{className:Z,withoutGridItem:!0},(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(wf,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})),(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(Bf,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})))),$&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalTreeGridCell,{className:Q,"aria-selected":!!r||x},(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(te,{clientIds:ee,block:L,clientId:n,icon:yg,label:q,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:o,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:D}))}))))}));function wI(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(BI(t,n,o),0):1}const BI=(e,t,n)=>(o,r)=>{var l;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+wI(r,e,t,n):o+1},II=()=>{};var xI=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=II,showBlockMovers:r,selectedClientIds:l,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:d=0,fixedListWindow:p,isExpanded:m,parentId:f,shouldShowInnerBlocks:v=!0}=t,b=(0,g.useSelect)((e=>!(!f||"contentOnly"!==e(To).getTemplateLock(f))),[f]),{expandedState:_,draggedClientIds:k}=CI();if(b)return null;const y=1===i,E=n.filter(Boolean),C=E.length,S=y?C+1:C;let w=d;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:d,innerBlocks:f}=t;n>0&&(w+=wI(E[n-1],_,k,m));const{itemInView:h}=p,b=h(w),y=n+1,B=s.length>0?`${s}_${y}`:`${y}`,I=!(null==f||!f.length),x=I&&v?null!==(c=_[d])&&void 0!==c?c:m:void 0,T=!(null==k||!k.includes(d)),M=T||b,N=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(d,l),P=a||N&&I;return(0,u.createElement)(g.AsyncModeProvider,{key:d,value:!N},M&&(0,u.createElement)(SI,{block:t,selectBlock:o,isSelected:N,isBranchSelected:P,isDragged:T,level:i,position:y,rowCount:S,siblingBlockCount:C,showBlockMovers:r,path:B,isExpanded:x,listPosition:w,selectedClientIds:l}),!M&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,u.createElement)(e,{parentId:d,blocks:f,selectBlock:o,showBlockMovers:r,level:i+1,path:B,listPosition:w+1,fixedListWindow:p,isBranchSelected:P,selectedClientIds:l,isExpanded:m}))})),y&&(0,u.createElement)(h.__experimentalTreeGridRow,{level:i,setSize:S,positionInSet:S,isExpanded:!0},(0,u.createElement)(h.__experimentalTreeGridCell,null,(e=>(0,u.createElement)(uI,c({nestingLevel:i,blockCount:C},e))))))}));function TI(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,s]=(0,u.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),a=s||i,c=(0,u.useCallback)((()=>{if(!i)return 0;const e=a.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,a]),d=(0,u.useMemo)((()=>{if(!a)return{};const e=c();return{width:a.offsetWidth-e}}),[c,a]),p=(0,u.useMemo)((()=>{if(a&&("top"===l||"bottom"===l||"inside"===l))return{ownerDocument:a.ownerDocument,getBoundingClientRect(){const e=a.getBoundingClientRect(),t=c(),n=e.left+t,o=e.right;let r=0,i=0;"top"===l?(r=e.top,i=e.top):(r=e.bottom,i=e.bottom);const s=o-n,u=i-r;return new window.DOMRect(n,r,s,u)}}}),[a,l,c]);return a?(0,u.createElement)(h.Popover,{animate:!1,anchor:p,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function MI(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(To),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getBlockSelectionEnd:i,getSelectedBlockClientIds:a,hasMultiSelection:c,hasSelectedBlock:d}=(0,g.useSelect)(To),{getBlockType:p}=(0,g.useSelect)(s.store),m=(0,u.useCallback)((async(i,s,u)=>{if(null==i||!i.shiftKey)return void n(s);i.preventDefault();const m="keydown"===i.type&&(i.keyCode===ud.UP||i.keyCode===ud.DOWN||i.keyCode===ud.HOME||i.keyCode===ud.END);if(!m&&!d()&&!c())return void n(s,null);const g=a(),f=[...r(s),s];m&&!g.some((e=>f.includes(e)))&&await e();let h=l(),v=s;m&&(d()||c()||(h=s),u&&(v=u));const b=r(h),_=r(v),{start:y,end:E}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(h,v,b,_);await t(y,E,null);const C=a();if((i.keyCode===ud.HOME||i.keyCode===ud.END)&&C.length>1)return;const S=g.filter((e=>!C.includes(e)));let w;if(1===S.length){var B;const e=null===(B=p(o(S[0])))||void 0===B?void 0:B.title;e&&(w=(0,k.sprintf)((0,k.__)("%s deselected."),e))}else S.length>1&&(w=(0,k.sprintf)((0,k.__)("%s blocks deselected."),S.length));w&&(0,pn.speak)(w)}),[e,o,p,r,l,i,a,c,d,t,n]);return{updateBlockSelection:m}}const NI=["top","bottom"];function PI(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,g.useSelect)(To),[l,i]=(0,u.useState)(),{rootClientId:s,blockIndex:a}=l||{},c=Fv(s,a),d=o(),p=(0,m.useThrottle)((0,u.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==d||!d.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=Hv(t,s,NI),u=Gv(t,s);if(void 0===r||a0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l),element:o,isDraggedBlock:!!a&&d.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(d,i),canInsertDraggedBlocksAsChild:!a||r(d,l)}})),s);c&&i(c)}),[d]),200);return{ref:(0,m.__experimentalUseDropZone)({onDrop:c,onDragOver(e){p(e,e.currentTarget)},onDragEnd(){p.cancel(),i(null)}}),target:l}}const LI=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var RI=(0,u.forwardRef)((function(e,t){let{id:n,blocks:o,showBlockMovers:r=!1,isExpanded:l=!1,LeafMoreMenu:i,description:s=(0,k.__)("Block navigation structure"),onSelect:a}=e;const{getBlock:c}=(0,g.useSelect)(To),{clientIdsTree:d,draggedClientIds:p,selectedClientIds:f}=function(e){return(0,g.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(To);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(o),{visibleBlockCount:v,shouldShowInnerBlocks:b}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(To),r=(null==p?void 0:p.length)>0?n(p).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[p]),{updateBlockSelection:_}=MI(),[y,E]=(0,u.useReducer)(LI,{}),{ref:C,target:S}=PI(),w=(0,u.useRef)(),B=(0,m.useMergeRefs)([w,C,t]),I=(0,u.useRef)(!1),{setSelectedTreeId:x}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,u.useState)(null),{selectedBlockParentClientIds:l}=(0,g.useSelect)((e=>{const{getBlockParents:n}=e(To);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(l)&&l.length?l:null;return(0,u.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:l})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:f[0],setExpandedState:E}),T=(0,u.useCallback)(((e,t)=>{_(e,t),x(t),a&&a(c(t))}),[x,_,a,c]);(0,u.useEffect)((()=>{I.current=!0}),[]);const[M]=(0,m.__experimentalUseFixedWindowList)(w,36,v,{useWindowing:!0,windowOverscan:40}),N=(0,u.useCallback)((e=>{e&&E({type:"expand",clientIds:[e]})}),[E]),P=(0,u.useCallback)((e=>{e&&E({type:"collapse",clientIds:[e]})}),[E]),L=(0,u.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,u.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),A=(0,u.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&_(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[_]),O=(0,u.useMemo)((()=>({isTreeGridMounted:I.current,draggedClientIds:p,expandedState:y,expand:N,collapse:P,LeafMoreMenu:i})),[I.current,p,y,N,P,i]);return(0,u.createElement)(g.AsyncModeProvider,{value:!0},(0,u.createElement)(TI,{listViewRef:w,blockDropTarget:S}),(0,u.createElement)("div",{className:"offcanvas-editor-list-view-tree-wrapper"},(0,u.createElement)(h.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,k.__)("Block navigation structure"),ref:B,onCollapseRow:R,onExpandRow:L,onFocusRow:A,"aria-description":s},(0,u.createElement)(EI.Provider,{value:O},(0,u.createElement)(xI,{blocks:d,selectBlock:T,showBlockMovers:r,fixedListWindow:M,selectedClientIds:f,isExpanded:l,shouldShowInnerBlocks:b}),(0,u.createElement)(h.__experimentalTreeGridRow,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!d.length&&(0,u.createElement)(h.__experimentalTreeGridCell,{withoutGridItem:!0},(0,u.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},(0,k.__)("Your menu is currently empty. Add your first menu item to get started."))))))))}));const AI={};Bo(AI,{...i,ExperimentalBlockEditorProvider:Ld,OffCanvasEditor:RI})}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file +var jE=function(e,t){return jE=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])},jE(e,t)};var WE=function(){return WE=Object.assign||function(e){for(var t,n=1,o=arguments.length;nu*r?{width:u*r,height:u}:{width:c,height:c/r}}function ZE(e,t,n,o,r){void 0===r&&(r=0);var l=iC(t.width,t.height,r),i=l.width,s=l.height;return{x:QE(e.x,i,n.width,o),y:QE(e.y,s,n.height,o)}}function QE(e,t,n,o){var r=t*o/2-n/2;return sC(e,-r,r)}function XE(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function JE(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function eC(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i?tC:nC,a=iC(t.width,t.height,l),c=iC(t.naturalWidth,t.naturalHeight,l),u={x:s(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:s(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:s(100,n.width/a.width*100/r),height:s(100,n.height/a.height*100/r)},d=Math.round(s(c.width,u.width*c.width/100)),p=Math.round(s(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:WE(WE({},m),{x:Math.round(s(c.width-m.width,u.x*c.width/100)),y:Math.round(s(c.height-m.height,u.y*c.height/100))})}}function tC(e,t){return Math.min(e,Math.max(0,t))}function nC(e,t){return t}function oC(e,t,n,o,r,l){var i=iC(t.width,t.height,n),s=sC(o.width/i.width*(100/e.width),r,l);return{crop:{x:s*i.width/2-o.width/2-i.width*s*(e.x/100),y:s*i.height/2-o.height/2-i.height*s*(e.y/100)},zoom:s}}function rC(e,t,n,o,r,l){void 0===n&&(n=0);var i=iC(t.naturalWidth,t.naturalHeight,n),s=sC(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*a,y:((i.height-e.height)/2-e.y)*a},zoom:s}}function lC(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function iC(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 sC(e,t,n){return Math.min(Math.max(e,t),n)}function aC(){for(var e=[],t=0;t0})).join(" ").trim()}var cC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=_s().createRef(),n.videoRef=_s().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=oC(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=rC(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();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(s.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=WE(WE({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:YE(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=WE({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?ZE(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=qE()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=sC(e,n.props.minZoom,n.props.maxZoom);if(l){var s=n.getPointOnContainer(t),a=n.getPointOnMedia(s),c={x:a.x*i-s.x,y:a.y*i-s.y},u=n.props.restrictPosition?ZE(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?eC(n.props.restrictPosition?ZE(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?ZE(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}jE(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,s,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(s=e.crop)||void 0===s?void 0:s.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())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=XE(n,o),this.lastPinchRotation=JE(n,o),this.onDragStart(lC(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=lC(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=XE(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=JE(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,s=i.x,a=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,g=m.containerStyle,f=m.cropAreaStyle,h=m.mediaStyle,v=t.classes,b=v.containerClassName,_=v.cropAreaClassName,k=v.mediaClassName,y=t.objectFit;return _s().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:aC("reactEasyCrop_Container",b)},n?_s().createElement("img",WE({alt:"",className:aC("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{src:n,ref:this.imageRef,style:WE(WE({},h),{transform:l||"translate(".concat(s,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&_s().createElement("video",WE({autoPlay:!0,loop:!0,muted:!0,className:aC("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical","auto-cover"===y&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),k)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:WE(WE({},h),{transform:l||"translate(".concat(s,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return _s().createElement("source",WE({key:e.src},e))}))),this.state.cropSize&&_s().createElement("div",{style:WE(WE({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:aC("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(_s().Component);const uC={placement:"bottom-start",variant:"toolbar"};function dC(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,borderProps:s}=e;const{isInProgress:a,editedUrl:c,position:d,zoom:m,aspect:g,setPosition:f,setCrop:v,setZoom:b,rotation:_}=UE();let k=o||r*l/i;return _%180==90&&(k=r*i/l),(0,u.createElement)("div",{className:p()("wp-block-image__crop-area",null==s?void 0:s.className,{"is-applying":a}),style:{...null==s?void 0:s.style,width:n||r,height:k}},(0,u.createElement)(cC,{image:c||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:g,onCropChange:e=>{f(e)},onCropComplete:e=>{v(e)},onZoomChange:e=>{b(100*e)}}),a&&(0,u.createElement)(h.Spinner,null))}var pC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function mC(){const{isInProgress:e,zoom:t,setZoom:n}=UE();return(0,u.createElement)(h.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:uC,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,u.createElement)(h.ToolbarButton,{icon:pC,label:(0,k.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,u.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var gC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function fC(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,u.createElement)(h.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,u.createElement)(h.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?$f:void 0},t)})))}function hC(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=UE();return(0,u.createElement)(h.DropdownMenu,{icon:gC,label:(0,k.__)("Aspect Ratio"),popoverProps:uC,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(fC,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("Original"),aspect:l},{title:(0,k.__)("Square"),aspect:1}]}),(0,u.createElement)(fC,{label:(0,k.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("16:10"),aspect:1.6},{title:(0,k.__)("16:9"),aspect:16/9},{title:(0,k.__)("4:3"),aspect:4/3},{title:(0,k.__)("3:2"),aspect:1.5}]}),(0,u.createElement)(fC,{label:(0,k.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,k.__)("10:16"),aspect:.625},{title:(0,k.__)("9:16"),aspect:9/16},{title:(0,k.__)("3:4"),aspect:3/4},{title:(0,k.__)("2:3"),aspect:2/3}]}))}))}var vC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 bC(){const{isInProgress:e,rotateClockwise:t}=UE();return(0,u.createElement)(h.ToolbarButton,{icon:vC,label:(0,k.__)("Rotate"),onClick:t,disabled:e})}function _C(){const{isInProgress:e,apply:t,cancel:n}=UE();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarButton,{onClick:t,disabled:e},(0,k.__)("Apply")),(0,u.createElement)(h.ToolbarButton,{onClick:n},(0,k.__)("Cancel")))}function kC(e){let{id:t,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:s,onSaveImage:a,onFinishEditing:c,borderProps:d}=e;return(0,u.createElement)($E,{id:t,url:n,naturalWidth:s,naturalHeight:i,onSaveImage:a,onFinishEditing:c},(0,u.createElement)(dC,{borderProps:d,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:s}),(0,u.createElement)(Vo,null,(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(mC,null),(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(hC,{toggleProps:e}))),(0,u.createElement)(bC,null)),(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(_C,null))))}const yC=[25,50,75,100],EC=()=>{};function CC(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:o,imageSizeOptions:r=[],isResizable:l=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:d=EC}=e;const{currentHeight:p,currentWidth:m,updateDimension:g,updateDimensions:f}=function(e,t,n,o,r){var l,i;const[s,a]=(0,u.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[c,d]=(0,u.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==o&&a(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&a(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&d(e)}),[t,e]),{currentHeight:c,currentWidth:s,updateDimension:(e,t)=>{"width"===e?a(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),a(null!=t?t:o),r({height:e,width:t})}}}(a,s,o,n,c);return(0,u.createElement)(u.Fragment,null,r&&r.length>0&&(0,u.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Image size"),value:i,options:r,onChange:d,help:t}),l&&(0,u.createElement)("div",{className:"block-editor-image-size-control"},(0,u.createElement)("p",{className:"block-editor-image-size-control__row"},(0,k.__)("Image dimensions")),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,k.__)("Width"),value:m,min:1,onChange:e=>g("width",e)}),(0,u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,k.__)("Height"),value:p,min:1,onChange:e=>g("height",e)})),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(h.ButtonGroup,{"aria-label":(0,k.__)("Image size presets")},yC.map((e=>{const t=Math.round(n*(e/100)),r=Math.round(o*(e/100)),l=m===t&&p===r;return(0,u.createElement)(h.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>f(r,t)},e,"%")}))),(0,u.createElement)(h.Button,{isSmall:!0,onClick:()=>f()},(0,k.__)("Reset")))))}const SC=()=>{};var wC=e=>{let{value:t,onChange:n=SC,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,u.createElement)(h.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,u.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,u.createElement)(h.VisuallyHidden,{as:"legend"},(0,k.__)("Currently selected link settings")),l)},BC=n(5425),IC=n.n(BC);function xC(e){return"function"==typeof e}class TC extends u.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,u.createRef)(),this.inputRef=(0,u.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,isUpdatingSuggestions:!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.scrollingIntoView&&(this.scrollingIntoView=!0,IC()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.state.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),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(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);var l,i;if(t=t.trim(),!r&&(t.length<2||!o&&(0,vg.isURL)(t)))return null===(l=this.suggestionsRequest)||void 0===l||null===(i=l.cancel)||void 0===i||i.call(l),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:t,selectedSuggestion:null,loading:!1});this.setState({isUpdatingSuggestions:!0,selectedSuggestion:null,loading:!0});const s=n(t,{isInitialSuggestions:r});s.then((e=>{this.suggestionsRequest===s&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,k.sprintf)((0,k._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,k.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===s&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=s}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.state.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case ud.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case ud.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case ud.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case ud.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case ud.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case ud.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,k.__)("Link selected.")));break;case ud.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,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(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,u.createElement)(u.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:l=(0,k.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s=""}=this.props,{loading:a,showSuggestions:d,selectedSuggestion:m,suggestionsListboxId:g,suggestionOptionIdPrefix:f}=this.state,v=`url-input-control-${r}`,b={id:v,label:t,className:p()("block-editor-url-input",n,{"is-full-width":o})},_={id:v,value:s,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,k.__)("URL"),"aria-expanded":d,"aria-autocomplete":"list","aria-controls":g,"aria-activedescendant":null!==m?`${f}-${m}`:void 0,ref:this.inputRef};return i?i(b,_,a):(e||W()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,u.createElement)(h.BaseControl,c({__nextHasNoMarginBottom:e},b),(0,u.createElement)("input",_),a&&(0,u.createElement)(h.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:l,suggestionsListboxId:i,suggestionOptionIdPrefix:s,loading:a}=this.state;if(!n||0===o.length)return null;const d={id:i,ref:this.autocompleteRef,role:"listbox"},m=(e,t)=>({role:"option",tabIndex:"-1",id:`${s}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l});return xC(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:d,buildSuggestionItemProps:m,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!(null!=r&&r.length),currentInputValue:r}):(0,u.createElement)(h.Popover,{placement:"bottom",focusOnMount:!1},(0,u.createElement)("div",c({},d,{className:p()("block-editor-url-input__suggestions",`${e}__suggestions`)}),o.map(((e,t)=>(0,u.createElement)(h.Button,c({},m(0,t),{key:e.id,className:p()("block-editor-url-input__suggestion",{"is-selected":t===l}),onClick:()=>this.handleOnClick(e)}),e.title)))))}}var MC=(0,m.compose)(m.withSafeTimeout,h.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(xC(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(To);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(TC);var NC=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:i}=e;return n?(t=i?"function"==typeof i?i(n):i:(0,u.createInterpolateElement)((0,k.sprintf)((0,k.__)("Create: %s"),n),{mark:(0,u.createElement)("mark",null)}),(0,u.createElement)(h.Button,c({},r,{className:p()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,u.createElement)(Jl,{className:"block-editor-link-control__search-item-icon",icon:Ed}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var PC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.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 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var LC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var RC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.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"}));var AC=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var OC=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const DC={post:PC,page:By,post_tag:LC,category:RC,attachment:AC};function zC(e){let{isURL:t,suggestion:n}=e,o=null;return t?o=OC:n.type in DC&&(o=DC[n.type]),o?(0,u.createElement)(Jl,{className:"block-editor-link-control__search-item-icon",icon:o}):null}var FC=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:i="",shouldShowType:s=!1}=e;return(0,u.createElement)(h.Button,c({},t,{onClick:r,className:p()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),(0,u.createElement)(zC,{suggestion:n,isURL:l}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,u.createElement)(h.TextHighlight,{text:n.title,highlight:i})),(0,u.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(n.url))||""),l&&(0,k.__)("Press ENTER to add this link"))),s&&n.type&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const VC="__CREATE__",HC="mailto",GC="internal",UC=["URL",HC,"tel",GC],$C=[{id:"opensInNewTab",title:(0,k.__)("Open in new tab")}];function jC(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:i,suggestions:s,selectedSuggestion:a,isLoading:d,isInitialSuggestions:m,createSuggestionButtonText:g,suggestionsQuery:f}=e;const v=p()("block-editor-link-control__search-results",{"is-loading":d}),b=1===s.length&&UC.includes(s[0].type),_=n&&!b&&!m,y=!(null!=f&&f.type),E=`block-editor-link-control-search-results-label-${t}`,C=m?(0,k.__)("Recently updated"):(0,k.sprintf)((0,k.__)('Search results for "%s"'),o),S=(0,u.createElement)(m?u.Fragment:h.VisuallyHidden,{},(0,u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},C));return(0,u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,u.createElement)("div",c({},l,{className:v,"aria-labelledby":E}),s.map(((e,t)=>_&&VC===e.type?(0,u.createElement)(NC,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:i(e,t),isSelected:t===a}):VC===e.type?null:(0,u.createElement)(FC,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===a,isURL:UC.includes(e.type),searchTerm:o,shouldShowType:y,isFrontPage:null==e?void 0:e.isFrontPage})))))}function WC(e){const t=null==e?void 0:e.startsWith("#");return(0,vg.isURL)(e)||e&&e.includes("www.")||t}const KC=()=>Promise.resolve([]),qC=e=>{let t="URL";const n=(0,vg.getProtocol)(e)||"";return n.includes("mailto")&&(t=HC),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=GC),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,vg.prependHTTP)(e):e,type:t}])};function YC(e,t,n,o){const{fetchSearchSuggestions:r,pageOnFront:l}=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?qC:KC;return(0,u.useCallback)(((t,s)=>{let{isInitialSuggestions:a}=s;return WC(t)?i(t,{isInitialSuggestions:a}):(async(e,t,n,o,r,l,i)=>{const{isInitialSuggestions:s}=t;let a=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(a=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!a&&u&&l&&!s?c[0].concat(c[1]):c[0],s||WC(e)||!r?c:c.concat({title:e,url:e,type:VC})})(t,{...e,isInitialSuggestions:a},r,i,n,o,l)}),[i,r,n])}const ZC=()=>Promise.resolve([]),QC=()=>{},XC=(0,u.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:s=!1,onCreateSuggestion:a=QC,onChange:c=QC,onSelect:d=QC,showSuggestions:g=!0,renderSuggestions:f=(e=>(0,u.createElement)(jC,e)),fetchSuggestions:h=null,allowDirectEntry:v=!0,showInitialSuggestions:b=!1,suggestionsQuery:_={},withURLSuggestion:y=!0,createSuggestionButtonText:E,useLabel:C=!1}=e;const S=YC(_,v,s,y),w=g?h||S:ZC,B=(0,m.useInstanceId)(XC),[I,x]=(0,u.useState)(),T=async e=>{let t=e;if(VC!==e.type){if(v||t&&Object.keys(t).length>=1){const{id:e,url:n,...o}=null!=r?r:{};d({...o,...t},t)}}else try{var n;t=await a(e.title),null!==(n=t)&&void 0!==n&&n.url&&d(t)}catch(e){}},M=p()(l,{"has-no-label":!C});return(0,u.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,label:C?"URL":void 0,className:M,value:n,onChange:(e,t)=>{c(e),x(t)},placeholder:null!=i?i:(0,k.__)("Search or type url"),__experimentalRenderSuggestions:g?e=>f({...e,instanceId:B,withCreateSuggestion:s,createSuggestionButtonText:E,suggestionsQuery:_,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),T(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:b,onSubmit:(e,t)=>{var o;const r=e||I;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?T(r||{url:n}):t.preventDefault()},ref:t}),o)}));var JC=XC;var eS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var tS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:nS,Fill:oS}=(0,h.createSlotFill)("BlockEditorLinkControlViewer");function rS(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 lS=function(e){const[t,n]=(0,u.useReducer)(rS,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.useEffect)((()=>{if(null!=e&&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 iS(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:l=!1,onRemove:i}=e;const s=r?null==n?void 0:n.url:null,{richData:a,isFetching:c}=lS(s),d=a&&Object.keys(a).length,m=n&&(0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(n.url),16)||"",g=(null==a?void 0:a.title)||(null==n?void 0:n.title)||m,f=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let v;return v=null!=a&&a.icon?(0,u.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):f?(0,u.createElement)(Jl,{icon:eS,size:32}):(0,u.createElement)(Jl,{icon:OC}),(0,u.createElement)("div",{"aria-label":(0,k.__)("Currently selected"),className:p()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!c,"is-preview":!0,"is-error":f})},(0,u.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:p()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},v),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-details"},f?(0,u.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,k.__)("Link is empty")):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Ri.__unstableStripHTML)(g)),(null==n?void 0:n.url)&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-info"},m)))),(0,u.createElement)(h.Button,{icon:tS,label:(0,k.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),l&&(0,u.createElement)(h.Button,{icon:Cr,label:(0,k.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,u.createElement)(nS,{fillProps:n})),!!(d&&(null!=a&&a.image||null!=a&&a.description)||c)&&(0,u.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:p()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,u.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:p()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,u.createElement)(h.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}const sS=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}}};function aS(e){const[t,n]=(0,u.useState)(e||"");return(0,u.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const cS=()=>{};function uS(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=$C,onChange:s=cS,onRemove:a,onCancel:c,noDirectEntry:d=!1,showSuggestions:m=!0,showInitialSuggestions:g,forceIsEditingLink:f,createSuggestion:v,withCreateSuggestion:b,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===b&&v&&(b=!0);const I=(0,u.useRef)(!0),x=(0,u.useRef)(),T=(0,u.useRef)(),M=(0,u.useRef)(!1),[N,P]=aS((null==l?void 0:l.url)||""),[L,R]=aS((null==l?void 0:l.title)||""),[A,O]=(0,u.useState)(void 0!==f?f:!l||!l.url),{createPage:D,isCreatingPage:z,errorMessage:F}=function(e){const t=(0,u.useRef)(),[n,o]=(0,u.useState)(!1),[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=sS(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,k.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(v);(0,u.useEffect)((()=>{void 0!==f&&f!==A&&O(f)}),[f]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(Ri.focus.focusable.find(x.current)[e]||x.current).focus(),M.current=!1}),[A,z]);const V=(null==l||null===(t=l.url)||void 0===t||null===(n=t.trim())||void 0===n?void 0:n.length)>0,H=()=>{var e;M.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),O(!1)},G=()=>{U===(null==l?void 0:l.url)&&L===(null==l?void 0:l.title)||s({...l,url:U,title:L}),H()},U=_||N,$=!(null!=U&&null!==(o=U.trim())&&void 0!==o&&o.length),j=a&&l&&!A&&!z,W=!(null==i||!i.length),K=V&&w,q=(A||!l)&&!z;return(0,u.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},z&&(0,u.createElement)("div",{className:"block-editor-link-control__loading"},(0,u.createElement)(h.Spinner,null)," ",(0,k.__)("Creating"),"…"),q&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:p()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":K})},K&&(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:L,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==ud.ENTER||$||(e.preventDefault(),G())}}),(0,u.createElement)(JC,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:U,withCreateSuggestion:b,onCreateSuggestion:D,onChange:P,onSelect:e=>{s({...e,title:L||(null==e?void 0:e.title)}),H()},showInitialSuggestions:g,allowDirectEntry:!d,showSuggestions:m,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:K})),F&&(0,u.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),l&&!A&&!z&&(0,u.createElement)(iS,{key:null==l?void 0:l.url,value:l,onEditClick:()=>O(!0),hasRichPreviews:S,hasUnlinkControl:j,onRemove:a}),(0,u.createElement)("div",{className:"block-editor-link-control__drawer"},W&&(0,u.createElement)("div",{className:"block-editor-link-control__tools"},(0,u.createElement)(wC,{value:l,settings:i,onChange:s})),q&&(0,u.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,u.createElement)(h.Button,{variant:"primary",onClick:G,className:"xblock-editor-link-control__search-submit",disabled:$},(0,k.__)("Apply")),(0,u.createElement)(h.Button,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),P(null==l?void 0:l.url),R(null==l?void 0:l.title),V?H():null==a||a(),null==c||c()}},(0,k.__)("Cancel")))),B&&B())}uS.ViewerFill=oS;var dS=uS;var pS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));var mS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));var gS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 fS=()=>{};let hS=0;var vS=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Tm.store);return{createNotice:t,removeNotice:n}})),(0,h.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:o,allowedTypes:r,accept:l,onError:i,onSelect:s,onSelectURL:a,onToggleFeaturedImage:c,useFeaturedImage:d,onFilesUpload:p=fS,name:m=(0,k.__)("Replace"),createNotice:f,removeNotice:v,children:b,multiple:_=!1,addToGallery:y,handleUpload:E=!0}=e;const C=(0,g.useSelect)((e=>e(To).getSettings().mediaUpload),[]),S=(0,u.useRef)(),w="block-editor/media-replace-flow/error-notice/"+ ++hS,B=e=>{const t=(0,Ri.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{f("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},I=(e,t)=>{d&&c&&c(),t(),s(e),(0,pn.speak)((0,k.__)("The media file has been replaced")),v(w)},x=e=>{e.keyCode===ud.DOWN&&(e.preventDefault(),e.target.click())},T=_&&!(!r||0===r.length)&&r.every((e=>"image"===e||e.startsWith("image/")));return(0,u.createElement)(h.Dropdown,{popoverProps:{variant:"toolbar"},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,u.createElement)(h.ToolbarButton,{ref:S,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},m)},renderContent:e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Lg,{gallery:T,addToGallery:y,multiple:_,value:_?o:n,onSelect:e=>I(e,i),allowedTypes:r,render:e=>{let{open:t}=e;return(0,u.createElement)(h.MenuItem,{icon:pS,onClick:t},(0,k.__)("Open Media Library"))}}),(0,u.createElement)(Pg,null,(0,u.createElement)(h.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),s(n);p(n),C({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:B})})(e,i)},accept:l,multiple:_,render:e=>{let{openFileDialog:t}=e;return(0,u.createElement)(h.MenuItem,{icon:mS,onClick:()=>{t()}},(0,k.__)("Upload"))}}))),c&&(0,u.createElement)(h.MenuItem,{icon:gS,onClick:c,isPressed:d},(0,k.__)("Use featured image")),b),a&&(0,u.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,u.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,k.__)("Current media URL:")),(0,u.createElement)(h.Tooltip,{text:t,position:"bottom"},(0,u.createElement)("div",null,(0,u.createElement)(dS,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;a(t),S.current.focus()}})))))}})}));var bS=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,u.createElement)(G.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-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"}));function _S(e){let{url:t,urlLabel:n,className:o}=e;const r=p()(o,"block-editor-url-popover__link-viewer-url");return t?(0,u.createElement)(h.ExternalLink,{className:r,href:t},n||(0,vg.filterURLForDisplay)((0,vg.safeDecodeURI)(t))):(0,u.createElement)("span",{className:r})}const{__experimentalPopoverLegacyPositionToPlacement:kS}=Io(h.privateApis);function yS(e){let t,{additionalControls:n,children:o,renderSettings:r,placement:l,focusOnMount:i="firstElement",position:s,...a}=e;void 0!==s&&W()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==l?t=l:void 0!==s&&(t=kS(s)),t=t||"bottom";const[d,p]=(0,u.useState)(!1),m=!!r&&d;return(0,u.createElement)(h.Popover,c({className:"block-editor-url-popover",focusOnMount:i,placement:t,shift:!0},a),(0,u.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,u.createElement)("div",{className:"block-editor-url-popover__row"},o,!!r&&(0,u.createElement)(h.Button,{className:"block-editor-url-popover__settings-toggle",icon:_f,label:(0,k.__)("Link settings"),onClick:()=>{p(!d)},"aria-expanded":d})),m&&(0,u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),n&&!m&&(0,u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},n))}yS.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,u.createElement)("form",c({className:p()("block-editor-url-popover__link-editor",n)},l),(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,value:r,onChange:o,autocompleteRef:t}),(0,u.createElement)(h.Button,{icon:bS,label:(0,k.__)("Apply"),type:"submit"}))},yS.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...i}=e;return(0,u.createElement)("div",c({className:p()("block-editor-url-popover__link-viewer",t)},i),(0,u.createElement)(_S,{url:r,urlLabel:l,className:n}),o&&(0,u.createElement)(h.Button,{icon:tS,label:(0,k.__)("Edit"),onClick:o}))};var ES=yS;const CS=()=>{},SS=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,u.createElement)(ES,{onClose:r},(0,u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,k.__)("URL"),placeholder:(0,k.__)("Paste or type URL"),onChange:n,value:t}),(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bS,label:(0,k.__)("Apply"),type:"submit"})))};var wS=(0,h.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:d,multiple:m=!1,handleUpload:f=!0,disableDropZone:v,disableMediaButtons:b,onError:_,onSelect:y,onCancel:E,onSelectURL:C,onToggleFeaturedImage:S,onDoubleClick:w,onFilesPreUpload:B=CS,onHTMLDrop:I=CS,children:x,mediaLibraryButton:T,placeholder:M,style:N}=e;const P=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return t().mediaUpload}),[]),[L,R]=(0,u.useState)(""),[A,O]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var e;R(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const D=e=>{R(e.target.value)},z=()=>{O(!0)},F=()=>{O(!1)},V=e=>{e.preventDefault(),L&&C&&(C(L),F())},H=e=>{if(!f)return y(e);let o;if(B(e),m)if(d){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));y(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=y;else o=e=>{let[t]=e;return y(t)};P({allowedTypes:n,filesList:e,onFileChange:o,onError:_})},G=e=>{H(e.target.files)},U=null!=M?M:e=>{let{instructions:t,title:c}=l;if(P||C||(t=(0,k.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&P&&(t=(0,k.__)("Upload a media file or pick one from your media library."),l?t=(0,k.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,k.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,k.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=(0,k.__)("Media"),l?c=(0,k.__)("Audio"):i?c=(0,k.__)("Image"):s&&(c=(0,k.__)("Video")))}const d=p()("block-editor-media-placeholder",o,{"is-appender":a});return(0,u.createElement)(h.Placeholder,{icon:r,label:c,instructions:t,className:d,notices:s,onDoubleClick:w,preview:i,style:N},e,x)},$=()=>v?null:(0,u.createElement)(h.DropZone,{onFilesDrop:H,onHTMLDrop:I}),j=()=>E&&(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,k.__)("Cancel"),variant:"link",onClick:E},(0,k.__)("Cancel")),W=()=>C&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:z,isPressed:A,variant:"tertiary"},(0,k.__)("Insert from URL")),A&&(0,u.createElement)(SS,{src:L,onChange:D,onSubmit:V,onClose:F})),K=()=>S&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:S,variant:"tertiary"},(0,k.__)("Use featured image")));return b?(0,u.createElement)(Pg,null,$()):(0,u.createElement)(Pg,{fallback:U(W())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,u.createElement)(h.Button,{variant:"tertiary",onClick:()=>{t()}},(0,k.__)("Media Library"))},o=(0,u.createElement)(Lg,{addToGallery:d,gallery:m&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:m,onSelect:y,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(P&&a)return(0,u.createElement)(u.Fragment,null,$(),(0,u.createElement)(h.FormFileUpload,{onChange:G,accept:c,multiple:m,render:e=>{let{openFileDialog:t}=e;const n=(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Button,{variant:"primary",className:p()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,k.__)("Upload")),o,W(),K(),j());return U(n)}}));if(P){const e=(0,u.createElement)(u.Fragment,null,$(),(0,u.createElement)(h.FormFileUpload,{variant:"primary",className:p()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:c,multiple:m},(0,k.__)("Upload")),o,W(),K(),j());return U(e)}return U(o)})())}));var BS=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,u.createElement)(HE,c({settings:o,gradients:[],disableCustomGradients:!0},n))};const IS={position:"bottom right",variant:"toolbar"};var xS=()=>(0,u.createElement)(u.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,u.createElement)(h.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,u.createElement)(h.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,u.createElement)(h.ToolbarItem,null,(n=>(0,u.createElement)(h.DropdownMenu,{icon:_f,label:(0,k.__)("More"),toggleProps:{...n,className:p()(n.className,{"is-pressed":t}),describedBy:(0,k.__)("Displays more block tools")},controls:Y(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:IS})))})));function TS(e){let{value:t,editableContentElement:n,activeFormats:o}=e;const r=o[o.length-1],l=null==r?void 0:r.type,i=(0,g.useSelect)((e=>e($.store).getFormatType(l)),[l]),s=(0,$.useAnchor)({editableContentElement:n,value:t,settings:i});return(0,u.createElement)(MS,{popoverAnchor:s})}function MS(e){let{popoverAnchor:t}=e;return(0,u.createElement)(h.Popover,{placement:"top",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,u.createElement)(Nf,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,k.__)("Format tools")},(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(xS,null))))}var NS=e=>{let{inline:t,editableContentElement:n,value:o}=e;const r=(0,g.useSelect)((e=>e(To).getSettings().hasInlineToolbar),[]);if(t)return(0,u.createElement)(MS,{popoverAnchor:n});if(r){const e=(0,$.getActiveFormats)(o);return(0,$.isCollapsed)(o)&&!e.length?null:(0,u.createElement)(TS,{editableContentElement:n,value:o,activeFormats:e})}return(0,u.createElement)(Vo,{group:"inline"},(0,u.createElement)(xS,null))};function PS(){const{didAutomaticChange:e,getSettings:t}=(0,g.useSelect)(To);return(0,m.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==ud.DELETE&&o!==ud.BACKSPACE&&o!==ud.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}var LS=window.wp.shortcode;function RS(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function AS(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function OS(e){let{allowedFormats:t,disableFormats:n}=e;return n?OS.EMPTY_ARRAY:t}OS.EMPTY_ARRAY=[];function DS(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const{start:s=0,end:a=0}=t,c={...t,start:s,end:a},u=[],[d,p]=(0,$.split)(c),m=n.length>0;let g=-1;const f=(0,$.isEmpty)(d)&&!(0,$.isEmpty)(p);m&&(0,$.isEmpty)(d)||(u.push(r((0,$.toHTMLString)({value:d,multilineTag:i}),!f)),g+=1),m?(u.push(...n),g+=n.length):l&&u.push(l()),(m||l)&&(0,$.isEmpty)(p)||u.push(r((0,$.toHTMLString)({value:p,multilineTag:i}),f));o(u,m?g:1,m?-1:0)}function zS(e,t){return t?(0,$.replace)(e,/\n+/g,$.__UNSTABLE_LINE_SEPARATOR):(0,$.replace)(e,new RegExp($.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function FS(e){const t=(0,u.useRef)(e);return t.current=e,(0,m.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:g,pastePlainText:f}=t.current;if(!n)return;const{clipboardData:h}=e;let v="",b="";try{v=h.getData("text/plain"),b=h.getData("text/html")}catch(e){try{b=h.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void r((0,$.insert)(l,v));const _=i.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:v})),e}),l);if(_!==l)return void r(_);const k=[...(0,Ri.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=h.getData("rich-text-multi-line-tag")||void 0;let t=(0,$.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:g});return t=zS(t,!!m),RS(t,l.activeFormats),void r((0,$.insert)(l,t))}if(f)return void r((0,$.insert)(l,(0,$.create)({text:v})));if(null!=k&&k.length&&window.console.log("Received items:\n\n",k),null!=k&&k.length&&!dh(k,b)){const e=(0,s.getBlockTransforms)("from"),t=k.reduce(((t,n)=>{const o=(0,s.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,$.isEmpty)(l)?c(t):DS({value:l,pastedBlocks:t,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,$.isEmpty)(l)&&(E=v,(0,LS.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,$.isEmpty)(l)&&(0,vg.isURL)(v.trim())&&(y="BLOCKS");const C=(0,s.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:g});if("string"==typeof C){let e=(0,$.create)({html:C});e=zS(e,!!m),RS(e,l.activeFormats),r((0,$.insert)(l,e))}else C.length>0&&(c&&(0,$.isEmpty)(l)?c(C,C.length-1,-1):DS({value:l,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const VS=["`",'"',"'","“”","‘’"];function HS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,g.useDispatch)(To),o=(0,u.useRef)(e);return o.current=e,(0,m.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:s,onChange:c}=o.current;if("insertText"!==l)return;if((0,$.isCollapsed)(s))return;const u=(0,a.applyFilters)("blockEditor.wrapSelectionSettings",VS).find((e=>{let[t,n]=e;return t===i||n===i}));if(!u)return;const[d,p=d]=u,m=s.start,g=s.end+d.length;let f=(0,$.insert)(s,d,m,m);f=(0,$.insert)(f,p,g,g),t(),c(f),n();const h={};for(const e in r)h[e]=r[e];h.data=p;const{ownerDocument:v}=e,{defaultView:b}=v,_=new b.InputEvent("input",h);window.queueMicrotask((()=>{r.target.dispatchEvent(_)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function GS(e){let t=e.length;for(;t--;){const n=gn(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(mn,""),e[t].clientId;const o=GS(e[t].innerBlocks);if(o)return o}}function US(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,g.useDispatch)(To),o=(0,u.useRef)(e);return o.current=e,(0,m.useRefEffect)((e=>{function r(){const{value:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const a=i.slice(0,l).trim(),c=(0,s.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,s.findTransform)(c,(e=>{let{prefix:t}=e;return a===t}));if(!u)return;const d=(0,$.toHTMLString)({value:(0,$.insert)(e,mn,0,l)}),p=u.transform(d);r(GS([p])),t([p]),n()}function l(e){const{inputType:l,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;c&&r&&r();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function $S(e){const{__unstableMarkAutomaticChange:t}=(0,g.useDispatch)(To),n=(0,u.useRef)(e);return n.current=e,(0,m.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;if(e.keyCode!==ud.ENTER)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;e.preventDefault();const m={...r};m.formats=o(r);const g=l&&i;if(l){const e=(0,s.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,s.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(l([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,$.insert)(m,"\n")):g&&(0,$.__unstableIsEmptyLine)(m)?DS({value:m,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c}):u((0,$.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!g&&!r?d||u((0,$.insert)(m,"\n")):!g&&r?p():g&&DS({value:m,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function jS(e){return e($.store).getFormatTypes()}const WS=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function KS(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,o]=e;return[`${t}.${n}`,o]})))}function qS(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function YS(e){return(0,m.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function ZS(e){return(0,m.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function QS(){const{__unstableMarkLastChangeAsPersistent:e}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function XS(){const{isMultiSelecting:e}=(0,g.useSelect)(To);return(0,m.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function JS(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const s=(0,$.getActiveFormat)(r,t);let a=void 0!==s;const c=(0,$.getActiveObject)(r),d=void 0!==c&&c.type===t;if("core/link"===t&&!(0,$.isCollapsed)(r)){var p,m;const e=r.formats,t=null===(p=e[r.start])||void 0===p?void 0:p.find((e=>{let{type:t}=e;return"core/link"===t})),n=null===(m=e[r.end-1])||void 0===m?void 0:m.find((e=>{let{type:t}=e;return"core/link"===t}));t&&n&&t===n||(a=!1)}return(0,u.createElement)(i,{key:t,isActive:a,activeAttributes:a&&s.attributes||{},isObjectActive:d,activeObjectAttributes:d&&c.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const ew=(0,u.createContext)(),tw=(0,u.createContext)();const nw=(0,u.forwardRef)((function e(t,n){let{children:o,tagName:r="div",value:l="",onChange:i,isSelected:a,multiline:d,inlineToolbar:f,wrapperClassName:v,autocompleters:b,onReplace:_,placeholder:k,allowedFormats:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:N,__unstableDisableFormats:P,disableLineBreaks:L,unstableOnFocus:R,__unstableAllowPrefixTransformations:A,...O}=t;d&&W()("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 D=(0,m.useInstanceId)(e);x=x||D,O=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,rootTagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:p,minWidth:m,maxWidth:g,setRef:f,disableSuggestions:h,disableAutocorrection:v,...b}=e;return b}(O);const z=(0,u.useRef)(),{clientId:F}=Ro(),{selectionStart:V,selectionEnd:H,isSelected:G}=(0,g.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(To),o=t(),r=n();let l;return void 0===a?l=o.clientId===F&&r.clientId===F&&o.attributeKey===x:a&&(l=o.clientId===F),{selectionStart:l?o.offset:void 0,selectionEnd:l?r.offset:void 0,isSelected:l}})),{getSelectionStart:U,getSelectionEnd:j,getBlockRootClientId:K}=(0,g.useSelect)(To),{selectionChange:q}=(0,g.useDispatch)(To),Y=AS(d),Z=OS({allowedFormats:y,disableFormats:P}),Q=!Z||Z.length>0;let X=l,J=i;Array.isArray(l)&&(W()("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/"}),X=s.children.toHTML(l),J=e=>i(s.children.fromDOM((0,$.__unstableCreateElement)(document,e).childNodes)));const ee=(0,u.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&K(F)!==K(j().clientId))return;n.start={clientId:F,attributeKey:x,offset:e}}if("number"==typeof t||o){if(void 0===e&&K(F)!==K(U().clientId))return;n.end={clientId:F,attributeKey:x,offset:t}}q(n)}),[F,x]),{formatTypes:te,prepareHandlers:ne,valueHandlers:oe,changeHandlers:re,dependencies:le}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,g.useSelect)(jS,[]),i=(0,u.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&WS.has(n))}))),[l,r,WS]),s=(0,g.useSelect)((e=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...KS(r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),r.name)}:o),{})),[i,t,n]),a=(0,g.useDispatch)(),c=[],d=[],p=[],m=[];for(const e in s)m.push(s[e]);return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=e.__experimentalCreatePrepareEditableTree(qS(s,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(o):c.push(o)}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:n,blockClientId:t}));const r=qS(s,e.name);p.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:c,valueHandlers:d,changeHandlers:p,dependencies:m}}({clientId:F,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Z});function ie(e){return te.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,$.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:se,onChange:ae,ref:ce}=(0,$.__unstableUseRichText)({value:X,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;J(e),Object.values(re).forEach((e=>{e(n,o)}))},selectionStart:V,selectionEnd:H,onSelectionChange:ee,placeholder:k,__unstableIsSelected:G,__unstableMultilineTag:Y,__unstableDisableFormats:P,preserveWhiteSpace:T,__unstableDependencies:[...le,r],__unstableAfterParse:function(e){return oe.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:ie,__unstableAddInvisibleFormats:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ue=function(e){return(0,h.__unstableUseAutocompleteProps)({...e,completers:My(e)})}({onReplace:_,completers:b,record:se,onChange:ae});!function(e){let{html:t,value:n}=e;const o=(0,u.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,g.useDispatch)(To);(0,u.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:X,value:se});const de=(0,u.useRef)(new Set),pe=(0,u.useRef)(new Set);function me(){var e;null===(e=z.current)||void 0===e||e.focus()}const ge=r;return(0,u.createElement)(u.Fragment,null,G&&(0,u.createElement)(ew.Provider,{value:de},(0,u.createElement)(tw.Provider,{value:pe},(0,u.createElement)(h.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:se,onChange:ae,onFocus:me}),(0,u.createElement)(JS,{value:se,onChange:ae,onFocus:me,formatTypes:te,forwardedRef:z})))),G&&Q&&(0,u.createElement)(NS,{inline:f,editableContentElement:z.current,value:se}),(0,u.createElement)(ge,c({role:"textbox","aria-multiline":!L,"aria-label":k},O,ue,{ref:(0,m.useMergeRefs)([n,ue.ref,O.ref,ce,HS({value:se,onChange:ae}),US({value:se,onChange:ae,__unstableAllowPrefixTransformations:A,formatTypes:te,onReplace:_,selectionChange:q}),QS(),(0,m.useRefEffect)((e=>{function t(e){(ud.isKeyboardEvent.primary(e,"z")||ud.isKeyboardEvent.primary(e,"y")||ud.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),YS(de),ZS(pe),PS(),FS({isSelected:G,disableFormats:P,onChange:ae,value:se,formatTypes:te,tagName:r,onReplace:_,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:N,multilineTag:Y,preserveWhiteSpace:T,pastePlainText:M}),$S({removeEditorOnlyFormats:ie,value:se,onReplace:_,onSplit:w,onSplitMiddle:I,multilineTag:Y,onChange:ae,disableLineBreaks:L,onSplitAtEnd:B}),XS(),z]),contentEditable:!0,suppressContentEditableWarning:!0,className:p()("block-editor-rich-text__editable",O.className,"rich-text"),onFocus:R,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===ud.DELETE||t===ud.BACKSPACE)){const{start:n,end:o,text:r}=se,l=t===ud.BACKSPACE,i=se.activeFormats&&!!se.activeFormats.length;if(!(0,$.isCollapsed)(se)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&(0,$.isEmpty)(se)&&l&&C(!l),e.preventDefault()}}})))}));nw.Content=e=>{let{value:t,tagName:n,multiline:o,...r}=e;Array.isArray(t)&&(W()("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/"}),t=s.children.toHTML(t));const l=AS(o);!t&&l&&(t=`<${l}>`);const i=(0,u.createElement)(u.RawHTML,null,t);if(n){const{format:e,...t}=r;return(0,u.createElement)(n,t,i)}return i},nw.isEmpty=e=>!e||0===e.length;var ow=nw;const rw=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(ow,c({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));rw.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,u.createElement)(n,o,t)};var lw=rw;var iw=(0,u.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,u.createElement)(lw,c({ref:t},o));const{className:r,onChange:l,...i}=o;return(0,u.createElement)(Xi.Z,c({ref:t,className:p()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},i))}));function sw(e){let{property:t,viewport:n,desc:o}=e;const r=(0,m.useInstanceId)(sw),l=o||(0,k.sprintf)((0,k._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."),t,n.label);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,u.createElement)(h.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var aw=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:s=!1,defaultLabel:a={id:"all",label:(0,k.__)("All")},viewports:c=[{id:"small",label:(0,k.__)("Small screens")},{id:"medium",label:(0,k.__)("Medium screens")},{id:"large",label:(0,k.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const d=o||(0,k.sprintf)((0,k.__)("Use the same %s on all screensizes."),n),m=(0,k.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,u.createElement)(sw,{property:n,viewport:a}),a);return(0,u.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,u.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,u.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,u.createElement)(h.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!s,onChange:r,help:m}),(0,u.createElement)("div",{className:p()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(i?i(c):c.map((e=>(0,u.createElement)(u.Fragment,{key:e.id},l((0,u.createElement)(sw,{property:n,viewport:e}),e))))))))};function cw(e){let{character:t,type:n,onUse:o}=e;const r=(0,u.useContext)(ew),l=(0,u.useRef)();return l.current=o,(0,u.useEffect)((()=>{function e(e){ud.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function uw(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,i="RichText.ToolbarControls";return n&&(i+=`.${n}`),o&&r&&(t=ud.displayShortcut[o](r)),(0,u.createElement)(h.Fill,{name:i},(0,u.createElement)(h.ToolbarButton,c({},l,{shortcut:t})))}function dw(e){let{inputType:t,onInput:n}=e;const o=(0,u.useContext)(tw),r=(0,u.useRef)();return r.current=n,(0,u.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const pw=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var mw=(0,u.forwardRef)((function(e,t){const n=(0,g.useSelect)((e=>e(To).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,g.useDispatch)(To);return(0,u.createElement)(h.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,u.createElement)(h.Button,c({},e,{ref:t,icon:"navigation"===n?pw:tS,"aria-expanded":r,"aria-haspopup":"true",onClick:l,label:(0,k.__)("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.NavigableMenu,{role:"menu","aria-label":(0,k.__)("Tools")},(0,u.createElement)(h.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jl,{icon:tS}),(0,k.__)("Edit"))},{value:"navigation",label:(0,u.createElement)(u.Fragment,null,pw,(0,k.__)("Select"))}]})),(0,u.createElement)("div",{className:"block-editor-tool-selector__help"},(0,k.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function gw(e){let{units:t,...n}=e;const o=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,u.createElement)(h.__experimentalUnitControl,c({units:o},n))}var fw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class hw extends u.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,k.__)("Edit link"):(0,k.__)("Insert link");return(0,u.createElement)("div",{className:"block-editor-url-input__button"},(0,u.createElement)(h.Button,{icon:Er,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,u.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,u.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,u.createElement)(h.Button,{className:"block-editor-url-input__back",icon:fw,label:(0,k.__)("Close"),onClick:this.toggle}),(0,u.createElement)(MC,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,u.createElement)(h.Button,{icon:bS,label:(0,k.__)("Submit"),type:"submit"}))))}}var vw=hw;var bw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const _w="none",kw="custom",yw="media",Ew="attachment",Cw=["noreferrer","noopener"],Sw=(0,u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(h.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,u.createElement)(h.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,u.createElement)(h.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),ww=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:s,linkClass:a,rel:c}=e;const[d,p]=(0,u.useState)(!1),[m,g]=(0,u.useState)(null),f=(0,u.useCallback)((()=>{p(!0)})),[v,b]=(0,u.useState)(!1),[_,y]=(0,u.useState)(null),E=(0,u.useRef)(null),C=(0,u.useCallback)((()=>{t!==yw&&t!==Ew||y(""),b(!0)})),S=(0,u.useCallback)((()=>{b(!1)})),w=(0,u.useCallback)((()=>{y(null),S(),p(!1)})),B=(0,u.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(p(!1),y(null),S())})),I=(0,u.useCallback)((()=>e=>{if(_){var t;const e=(null===(t=T().find((e=>e.url===_)))||void 0===t?void 0:t.linkDestination)||kw;n({href:_,linkDestination:e})}S(),y(null),e.preventDefault()})),x=(0,u.useCallback)((()=>{n({linkDestination:_w,href:""})})),T=()=>{const e=[{linkDestination:yw,title:(0,k.__)("Media File"),url:"image"===r?l:void 0,icon:Sw}];return"image"===r&&i&&e.push({linkDestination:Ew,title:(0,k.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(h.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,u.createElement)(h.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},M=(0,u.createElement)(h.__experimentalVStack,{spacing:"3"},(0,u.createElement)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");Cw.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===Cw.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,k.__)("Link CSS Class"),value:a||"",onChange:e=>{n({linkClass:e})}})),N=null!==_?_:o,P=(T().find((e=>e.linkDestination===t))||{}).title;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarButton,{icon:Er,className:"components-toolbar__control",label:o?(0,k.__)("Edit link"):(0,k.__)("Insert link"),"aria-expanded":d,onClick:f,ref:g}),d&&(0,u.createElement)(ES,{anchor:m,onFocusOutside:B(),onClose:w,renderSettings:()=>M,additionalControls:!N&&(0,u.createElement)(h.NavigableMenu,null,T().map((e=>(0,u.createElement)(h.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{y(null),(e=>{const t=T();let o;o=e?(t.find((t=>t.url===e))||{linkDestination:kw}).linkDestination:_w,n({linkDestination:o,href:e})})(e.url),S()}},e.title))))},(!o||v)&&(0,u.createElement)(ES.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:N,onChangeInputValue:y,onSubmit:I(),autocompleteRef:E}),o&&!v&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ES.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:C,urlLabel:P}),(0,u.createElement)(h.Button,{icon:bw,label:(0,k.__)("Remove link"),onClick:x}))))};function Bw(e){let{children:t,viewLabel:n,className:o,isEnabled:r=!0,deviceType:l,setDeviceType:i}=e;if((0,m.useViewportMatch)("small","<"))return null;const s={className:p()(o,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:n},c={"aria-label":(0,k.__)("View options")};return(0,u.createElement)(h.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:s,toggleProps:a,menuProps:c,icon:null},(()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Desktop"),icon:"Desktop"===l&&$f},(0,k.__)("Desktop")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Tablet"),icon:"Tablet"===l&&$f},(0,k.__)("Tablet")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Mobile"),icon:"Mobile"===l&&$f},(0,k.__)("Mobile"))),t)))}function Iw(e){const[t,n]=(0,u.useState)(window.innerWidth);(0,u.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var xw=(0,g.withSelect)((e=>({selectedBlockClientId:e(To).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=er(t);return t?(0,u.createElement)(h.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,k.__)("Skip to the selected block")):null})),Tw=window.wp.wordcount;var Mw=(0,g.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(To);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Tw.count)((0,s.serialize)(t),"words");return(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,u.createElement)(xd,{icon:Ff,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,k.sprintf)((0,k._n)("%d block","%d blocks",t.length),t.length)),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,k.sprintf)((0,k._n)("%d word","%d words",n),n))))}));function Nw(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:r}=(0,g.useSelect)((e=>{var n,o;const r=e(To).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:e(s.store).getBlockStyles(t)}}),[t]),l=(0,u.useMemo)((()=>[{label:(0,k.__)("Not set"),value:""},...r.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[r]),i=(0,u.useMemo)((()=>{var e;return null===(e=qf(r))||void 0===e?void 0:e.name}),[r]),a=(0,u.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==i?o&&(0,u.createElement)("div",{className:"default-style-picker__default-switcher"},(0,u.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,options:l,value:n||"",label:(0,k.__)("Default Style"),onChange:a})):null}var Pw=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 Lw=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const Rw={name:"settings",title:"Settings",value:"settings",icon:Pw,className:"block-editor-block-inspector__tab-item"},Aw={name:"styles",title:"Styles",value:"styles",icon:Lw,className:"block-editor-block-inspector__tab-item"},Ow={name:"list",title:"List View",value:"list-view",icon:Gy,className:"block-editor-block-inspector__tab-item"};var Dw=()=>{const e=(0,h.__experimentalUseSlotFills)($r.slotName);return Boolean(e&&e.length)?(0,u.createElement)(h.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,k.__)("Advanced"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"advanced"})):null};var zw=()=>{const e=(0,h.__experimentalUseSlotFills)(Lr.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,u.createElement)(h.PanelBody,{className:"block-editor-block-inspector__position",title:(0,k.__)("Position"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"position"})):null},Fw=window.wp.preferences;const Vw="isInspectorControlsTabsHintVisible";function Hw(){const e=(0,g.useSelect)((e=>{var t;return null===(t=e(Fw.store).get("core",Vw))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,g.useDispatch)(Fw.store);return e?(0,u.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,u.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,k.__)("Looking for other block settings? They've moved to the styles tab.")),(0,u.createElement)(h.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:bw,iconSize:"16",label:(0,k.__)("Dismiss hint"),onClick:()=>{const e=Ri.focus.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",Vw,!1)},showTooltip:!1})):null}var Gw=e=>{let{showAdvancedControls:t=!1}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(zw,null),t&&(0,u.createElement)("div",null,(0,u.createElement)(Dw,null)),(0,u.createElement)(Hw,null))};var Uw=e=>{let{blockName:t,clientId:n,hasBlockStyles:o}=e;return(0,u.createElement)(u.Fragment,null,o&&(0,u.createElement)("div",null,(0,u.createElement)(h.PanelBody,{title:(0,k.__)("Styles")},(0,u.createElement)(fE,{clientId:n}),(0,s.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,u.createElement)(Nw,{blockName:t}))),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}))};const $w=["core/navigation"];var jw=e=>!$w.includes(e);function Ww(e){let{blockName:t,clientId:n,hasBlockStyles:o,tabs:r}=e;const l=jw(t)?void 0:Ow.name;return(0,u.createElement)(h.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:r,initialTabName:l,key:n},(e=>e.name===Rw.name?(0,u.createElement)(Gw,{showAdvancedControls:!!t}):e.name===Aw.name?(0,u.createElement)(Uw,{blockName:t,clientId:n,hasBlockStyles:o}):e.name===Ow.name?(0,u.createElement)(jr.Slot,{group:"list"}):void 0))}const Kw=[];function qw(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:s,styles:a,typography:c}=Lr,u=jw(e),d=(0,h.__experimentalUseSlotFills)(i.Slot.__unstableName),p=!u&&!!d&&d.length,m=[...(0,h.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,f=(0,h.__experimentalUseSlotFills)($r.slotName)||[],v=[...(0,h.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,h.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...p&&m>1?f:[]];p&&t.push(Ow),v.length&&t.push(Rw),m&&t.push(Aw);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,g.useSelect)((e=>e(To).getSettings().blockInspectorTabs),[]));return b?t:Kw}function Yw(e,t){const n=(0,u.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),o=(0,u.useCallback)((e=>!!n[e]),[e]);return(0,u.useMemo)((()=>Zw([t],o)),[t,o])}function Zw(e,t){const n=[];for(const o of e)t(o.name)&&n.push(o),n.push(...Zw(o.innerBlocks,t));return n}function Qw(e){let{blockTypes:t,block:n,selectedBlock:o}=e;const{selectBlock:r}=(0,g.useDispatch)(To),l=t.find((e=>{let{name:t}=e;return t===n.name})),i=o&&o.clientId===n.clientId;return(0,u.createElement)(h.Button,{isPressed:i,onClick:()=>r(n.clientId)},(0,u.createElement)(h.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(xd,{icon:l.icon}),(0,u.createElement)(h.FlexItem,null,l.title)))}function Xw(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:o,selectedBlock:r}=(0,g.useSelect)((e=>({blockTypes:e(s.store).getBlockTypes(),block:e(To).getBlock(t),selectedBlock:e(To).getSelectedBlock()})),[t]),l=gf(t),i=Yw(n,o);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Td,c({},l,{className:l.isSynced&&"is-synced"})),(0,u.createElement)(ME,{blockClientId:t}),(0,u.createElement)(h.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},(0,k.__)("Content")),i.map((e=>(0,u.createElement)(Qw,{selectedBlock:r,key:e.clientId,block:e,blockTypes:n})))))}const Jw=e=>{let{animate:t,wrapper:n,children:o}=e;return t?n(o):o},eB=e=>{let{blockInspectorAnimationSettings:t,selectedBlockClientId:n,children:o}=e;const r=t&&"leftToRight"===t.enterDirection?-50:50;return(0,u.createElement)(h.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},key:n},o)},tB=e=>{let{clientId:t,blockName:n}=e;const o=qw(n),r=(null==o?void 0:o.length)>1,l=(0,g.useSelect)((e=>{const{getBlockStyles:t}=e(s.store),o=t(n);return o&&o.length>0}),[n]),i=gf(t);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Td,c({},i,{className:i.isSynced&&"is-synced"})),(0,u.createElement)(ME,{blockClientId:t}),r&&(0,u.createElement)(Ww,{hasBlockStyles:l,clientId:t,blockName:n,tabs:o}),!r&&(0,u.createElement)(u.Fragment,null,l&&(0,u.createElement)("div",null,(0,u.createElement)(h.PanelBody,{title:(0,k.__)("Styles")},(0,u.createElement)(fE,{clientId:t}),(0,s.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,u.createElement)(Nw,{blockName:n}))),(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}),(0,u.createElement)(zw,null),(0,u.createElement)("div",null,(0,u.createElement)(Dw,null))),(0,u.createElement)(xw,{key:"back"}))};var nB=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:o,selectedBlockClientId:r,blockType:l,topLevelLockedBlock:i}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(To),i=t(),a=i&&o(i),c=a&&(0,s.getBlockType)(a);return{count:n(),selectedBlockClientId:i,selectedBlockName:a,blockType:c,topLevelLockedBlock:r(i)||("contentOnly"===l(i)?i:void 0)}}),[]),a=qw(null==l?void 0:l.name),c=(null==a?void 0:a.length)>1,d=(0,g.useSelect)((e=>{if(l){const t=e(To).getSettings().blockInspectorAnimation;return null==t?void 0:t[l.name]}return null}),[r,l]);if(n>1)return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(Mw,null),c?(0,u.createElement)(Ww,{tabs:a}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,k.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,k.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,k.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,k.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"})));const p=o===(0,s.getUnregisteredTypeHandlerName)();return l&&r&&!p?i?(0,u.createElement)(Xw,{topLevelLockedBlock:i}):(0,u.createElement)(Jw,{animate:d,wrapper:e=>(0,u.createElement)(eB,{blockInspectorAnimationSettings:d,selectedBlockClientId:r},e)},(0,u.createElement)(tB,{clientId:r,blockName:l.name})):t?(0,u.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,k.__)("No block selected.")):null};var oB=function(e){let{__unstableContentRef:t}=e;const[n,o]=(0,u.useState)(!1),r=(0,g.useSelect)((e=>e(To).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{o(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?r.map(((e,n)=>n===r.length-1?null:(0,u.createElement)(rf,{key:e,previousClientId:e,nextClientId:r[n+1],__unstableContentRef:t},(0,u.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,u.createElement)(Zg,{position:"bottom center",clientId:r[n+1],__experimentalIsQuick:!0}))))):null};function rB(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(To);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function lB(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,m.useViewportMatch)("medium"),{hasFixedToolbar:l,isZoomOutMode:i,isTyping:s}=(0,g.useSelect)(rB,[]),a=(0,Hd.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:d,getBlockRootClientId:p}=(0,g.useSelect)(To),{duplicateBlocks:f,removeBlocks:v,insertAfterBlock:b,insertBeforeBlock:_,clearSelectedBlock:k,moveBlocksUp:y,moveBlocksDown:E}=(0,g.useDispatch)(To);const C=qr(n),S=qr(n);return(0,u.createElement)("div",c({},o,{onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);y(t,n)}}else if(a("core/block-editor/move-down",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);E(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=d();t.length&&(e.preventDefault(),f(t))}else if(a("core/block-editor/remove",e)){const t=d();t.length&&(e.preventDefault(),v(t))}else if(a("core/block-editor/insert-after",e)){const t=d();t.length&&(e.preventDefault(),b(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=d();t.length&&(e.preventDefault(),_(t[0]))}else if(a("core/block-editor/unselect",e)){d().length&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,u.createElement)(af.Provider,{value:(0,u.useRef)(!1)},!s&&(0,u.createElement)(uf,{__unstableContentRef:n}),!i&&(l||!r)&&(0,u.createElement)(av,{isFixed:!0}),(0,u.createElement)(Mv,{__unstableContentRef:n}),(0,u.createElement)(h.Popover.Slot,{name:"block-toolbar",ref:C}),t,(0,u.createElement)(h.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),i&&(0,u.createElement)(oB,{__unstableContentRef:n})))}const iB=()=>{};var sB=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:a,onSelect:c=iB,shouldFocusBlock:d=!1}=e;const{destinationRootClientId:p,prioritizePatterns:m}=(0,g.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:r}=e(To);return{destinationRootClientId:n||t(o)||void 0,prioritizePatterns:r().__experimentalPreferPatternsOnRoot}}),[o,n]);return(0,u.createElement)(Wg,{onSelect:c,rootClientId:p,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalInsertionIndex:s,__experimentalFilterValue:a,shouldFocusBlock:d,prioritizePatterns:m,ref:t})}));function aB(){return null}aB.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(Hd.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,k.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,k.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,k.__)("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,k.__)("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,k.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,k.__)("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,k.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,k.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,k.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,k.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var cB=aB;function uB(){return W()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const dB=new Set([ud.UP,ud.RIGHT,ud.DOWN,ud.LEFT,ud.ENTER,ud.BACKSPACE]);function pB(){const e=(0,g.useSelect)((e=>e(To).isTyping()),[]),{stopTyping:t}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function mB(){const{isTyping:e,hasInlineToolbar:t}=(0,g.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(To);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=(0,g.useDispatch)(To),r=pB(),l=(0,m.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,s=i.getSelection();if(e){let c;function u(e){const{target:t}=e;c=i.setTimeout((()=>{(0,Ri.isTextField)(t)||o()}))}function d(e){const{keyCode:t}=e;t!==ud.ESCAPE&&t!==ud.TAB||o()}function p(){s.isCollapsed||o()}return r.addEventListener("focus",u),r.addEventListener("keydown",d),t||l.addEventListener("selectionchange",p),()=>{i.clearTimeout(c),r.removeEventListener("focus",u),r.removeEventListener("keydown",d),l.removeEventListener("selectionchange",p)}}function a(e){const{type:t,target:o}=e;(0,Ri.isTextField)(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&dB.has(t)}(e))&&n()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n,o]);return(0,m.useMergeRefs)([r,l])}var gB=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:mB()},t)};const fB=-1!==window.navigator.userAgent.indexOf("Trident"),hB=new Set([ud.UP,ud.DOWN,ud.LEFT,ud.RIGHT]);function vB(){const e=(0,g.useSelect)((e=>e(To).hasSelectedBlock()),[]);return(0,m.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,Ri.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(hB.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,Ri.getScrollContainer)(t);if(!a)return;const c=a===n.body||a===n.documentElement,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const g=c?o.innerHeight:a.clientHeight;i.top+i.height>d+g||i.top{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!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(l)}}),[e])}var bB=fB?e=>e.children:function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:vB(),className:"block-editor__typewriter"},t)};const _B=(0,u.createContext)({});function kB(e){let{children:t,uniqueId:n,blockName:o=""}=e;const r=(0,u.useContext)(_B),{name:l}=Ro();o=o||l;const i=(0,u.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(r,o,n)),[r,o,n]);return(0,u.createElement)(_B.Provider,{value:i},t)}function yB(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,u.useContext)(_B),{name:r}=Ro();return n=n||r,Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e))}var EB=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 CB(e){let{title:t,help:n,actions:o=[],onClose:r}=e;return(0,u.createElement)(h.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,u.createElement)(h.__experimentalHStack,{alignment:"center"},(0,u.createElement)(h.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,u.createElement)(h.__experimentalSpacer,null),o.map((e=>{let{label:t,icon:n,onClick:o}=e;return(0,u.createElement)(h.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:o},!n&&t)})),r&&(0,u.createElement)(h.Button,{className:"block-editor-inspector-popover-header__action",label:(0,k.__)("Close"),icon:EB,onClick:r})),n&&(0,u.createElement)(h.__experimentalText,null,n))}var SB=(0,u.forwardRef)((function(e,t){let{onClose:n,onChange:o,...r}=e;return(0,u.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,u.createElement)(CB,{title:(0,k.__)("Publish"),actions:[{label:(0,k.__)("Now"),onClick:()=>null==o?void 0:o(null)}],onClose:n}),(0,u.createElement)(h.DateTimePicker,c({startOfWeek:(0,RE.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:o},r)))}));const wB={button:"wp-element-button",caption:"wp-element-caption"},BB=e=>wB[e]?wB[e]:"";function IB(e,t){return Object.entries(t).every((t=>{let[n,o]=t;return"object"==typeof o&&"object"==typeof e[n]?IB(e[n],o):e[n]===o}))}const xB=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&IB(e,n)}));return 1===n.length?n[0]:void 0};function TB(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function MB(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>TB(AB(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function NB(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=MB(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return TB(e)}function PB(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}function AB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=TB(e);return n.unit||(n=NB(e)),PB(e)&&!n.unit?LB(e):RB(n,t)}const OB={};function DB(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var zB=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+DB(t);return OB[n]||(OB[n]=AB(e,t)),OB[n]};function FB(e,t){var n,o;const{size:r}=e;if(!r||"0"===r)return r;if(null==t||!t.fluid||"object"==typeof(null==t?void 0:t.fluid)&&0===Object.keys(t.fluid).length)return r;if(!1===(null==e?void 0:e.fluid))return r;const l="object"==typeof(null==t?void 0:t.fluid)?null==t?void 0:t.fluid:{},i=G_({minimumFontSize:null==e||null===(n=e.fluid)||void 0===n?void 0:n.min,maximumFontSize:null==e||null===(o=e.fluid)||void 0===o?void 0:o.max,fontSize:r,minimumFontSizeLimit:null==l?void 0:l.minFontSize});return i||r}const VB="body",HB=[{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"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return FB(e,n)},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",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],GB={"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.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 UB(e,t,n,o,r){const l=[(0,f.get)(e,["blocks",t,...n]),(0,f.get)(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const s of l){const l=i[s];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return UB(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function $B(e,t,n,o){if(!o)return o;const r=GB[n],l=HB.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:s}=l,a=UB(e,t,s,i,o);return a?`var:preset|${r}|${a.slug}`:o}function jB(e,t,n){if(!n||"string"!=typeof n){var o,r;if(null===(o=n)||void 0===o||!o.ref||"string"!=typeof(null===(r=n)||void 0===r?void 0:r.ref))return n;{var l;const t=n.ref.split(".");if(!(n=(0,f.get)(e,t))||null!==(l=n)&&void 0!==l&&l.ref)return n}}const i="var:",s="var(--wp--";let a;if(n.startsWith(i))a=n.slice(i.length).split("|");else{if(!n.startsWith(s)||!n.endsWith(")"))return n;a=n.slice(s.length,-")".length).split("--")}const[c,...u]=a;return"preset"===c?function(e,t,n,o){let[r,l]=o;const i=HB.find((e=>e.cssVarInfix===r));if(!i)return n;const s=UB(e.settings,t,i.path,"slug",l);if(s){const{valueKey:n}=i;return jB(e,t,s[n])}return n}(e,t,n,u):"custom"===c?function(e,t,n,o){var r;const l=null!==(r=(0,f.get)(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:(0,f.get)(e.settings,["custom",...o]);return l?jB(e,t,l):n}(e,t,n,u):n}const WB=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),KB={settings:{},styles:{}},qB=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(WB);return[!!e&&!_()(e,KB),(0,u.useCallback)((()=>t((()=>KB))),[t])]};function YB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(WB),a=t?`settings.blocks.${t}.${e}`:`settings.${e}`,c=e=>{s((t=>{const n=JSON.parse(JSON.stringify(t));return(0,f.set)(n,a,e),n}))},d=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`;let s;switch(o){case"all":s=(0,f.get)(r,n);break;case"user":s=(0,f.get)(i,n);break;case"base":s=(0,f.get)(l,n);break;default:throw"Unsupported source"}return s},p=null!==(n=d(t))&&void 0!==n?n:d();return[p,c]}function ZB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(WB),a=t?`styles.blocks.${t}.${e}`:`styles.${e}`,c=n=>{s((o=>{const l=JSON.parse(JSON.stringify(o));return(0,f.set)(l,a,$B(r.settings,t,e,n)),l}))};let d;switch(o){case"all":d=jB(r,t,"styles.css"===a?(0,f.get)(i,a):null!==(n=(0,f.get)(i,a))&&void 0!==n?n:(0,f.get)(l,a));break;case"user":d=jB(r,t,(0,f.get)(i,a));break;case"base":d=jB(l,t,(0,f.get)(l,a));break;default:throw"Unsupported source"}return[d,c]}const QB={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function XB(e){var t;const n="var:";if(null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)){return`var(--wp--${e.slice(n.length).split("|").join("--")})`}return e}function JB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return HB.reduce(((n,o)=>{let{path:r,cssVarInfix:l,classes:i}=o;if(!i)return n;const s=(0,f.get)(t,r,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((t=>{let{slug:o}=t;i.forEach((t=>{let{classSuffix:r,propertyName:i}=t;const s=`.has-${(0,f.kebabCase)(o)}-${r}`,a=e.split(",").map((e=>`${e}${s}`)).join(","),c=`var(--wp--preset--${l}--${(0,f.kebabCase)(o)})`;n+=`${a}{${i}: ${c} !important;}`}))}))})),n}),"")}function eI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=[];return Object.keys(e).forEach((r=>{const l=t+(0,f.kebabCase)(r.replace("/","-")),i=e[r];if(i instanceof Object){const e=l+n;o=[...o,...eI(i,e,n)]}else o.push(`${l}: ${i}`)})),o}function tI(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}function nI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=VB===t,l=Object.entries(s.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,o)=>{let[l,{value:i,properties:s,useEngine:a,rootOnly:c}]=o;if(c&&!r)return t;const u=i;if("elements"===u[0]||a)return t;const d=(0,f.get)(e,u);if("--wp--style--root--padding"===l&&("string"==typeof d||!n))return t;if(s&&"string"!=typeof d)Object.entries(s).forEach((e=>{const[n,o]=e;if(!(0,f.get)(d,[o],!1))return;const r=n.startsWith("--")?n:(0,f.kebabCase)(n);t.push(`${r}: ${XB((0,f.get)(d,[o]))}`)}));else if((0,f.get)(e,u,!1)){const n=l.startsWith("--")?l:(0,f.kebabCase)(l);t.push(`${n}: ${XB((0,f.get)(e,u))}`)}return t}),[]),i=(0,ni.getCSSRules)(e);return i.forEach((e=>{var t;if(r&&n&&e.key.startsWith("padding"))return;const i=e.key.startsWith("--")?e.key:(0,f.kebabCase)(e.key);let s=e.value;if("string"!=typeof s&&null!==(t=s)&&void 0!==t&&t.ref){var a;const e=s.ref.split(".");if(s=(0,f.get)(o,e),!s||null!==(a=s)&&void 0!==a&&a.ref)return}var c;"font-size"===i&&(s=FB({size:s},null==o||null===(c=o.settings)||void 0===c?void 0:c.typography));l.push(`${i}: ${s}`)})),l}function oI(e){var t,n,o,r,l;let{tree:i,style:s,selector:a,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:d}=e,p="",m=c?Bl(null==s||null===(t=s.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(a===VB?m=m||"0.5em":!c&&d&&(m=d)),m&&null!=i&&null!==(n=i.settings)&&void 0!==n&&null!==(o=n.layout)&&void 0!==o&&o.definitions&&(Object.values(i.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:o}=e;(c||"flex"===n)&&null!=o&&o.length&&o.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,o]=e;n.push(`${t}: ${o||m}`)})),n.length){let o="";o=c?a===VB?`${a} .${t}${(null==e?void 0:e.selector)||""}`:`${a}.${t}${(null==e?void 0:e.selector)||""}`:a===VB?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${a}.${t}${(null==e?void 0:e.selector)||""})`,p+=`${o} { ${n.join("; ")}; }`}}))})),a===VB&&c&&(p+=`${a} { --wp--style--block-gap: ${m}; }`)),a===VB&&null!=i&&null!==(r=i.settings)&&void 0!==r&&null!==(l=r.layout)&&void 0!==l&&l.definitions){const e=["block","flex","grid"];Object.values(i.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:o,baseStyles:r}=t;o&&e.includes(o)&&(p+=`${a} .${n} { display:${o}; }`),null!=r&&r.length&&r.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,o]=e;t.push(`${n}: ${o}`)})),t.length){const o=`${a} .${n}${(null==e?void 0:e.selector)||""}`;p+=`${o} { ${t.join("; ")}; }`}}))}))}return p}const rI=(e,t)=>{var n,o;const r=[];if(null==e||!e.styles)return r;const l=e=>Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["border","color","dimensions","spacing","typography","filter","outline","shadow"].includes(t)}))),i=l(e.styles);return i&&r.push({styles:i,selector:VB}),Object.entries(s.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n;let[o,l]=t;var i;null!==(n=e.styles)&&void 0!==n&&n.elements[o]&&r.push({styles:null===(i=e.styles)||void 0===i?void 0:i.elements[o],selector:l})})),Object.entries(null!==(n=null===(o=e.styles)||void 0===o?void 0:o.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,o;let[i,a]=e;const c=l(a);if(null!=a&&a.variations){const e={};Object.keys(a.variations).forEach((t=>{e[t]=l(a.variations[t])})),c.variations=e}c&&null!=t&&null!==(n=t[i])&&void 0!==n&&n.selector&&r.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:c,featureSelectors:t[i].featureSelectors,styleVariationSelectors:t[i].styleVariationSelectors}),Object.entries(null!==(o=null==a?void 0:a.elements)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;o&&null!=t&&t[i]&&null!==s.__EXPERIMENTAL_ELEMENTS&&void 0!==s.__EXPERIMENTAL_ELEMENTS&&s.__EXPERIMENTAL_ELEMENTS[n]&&r.push({styles:o,selector:t[i].selector.split(",").map((e=>s.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),r},lI=(e,t)=>{var n,o,r;const l=[];if(null==e||!e.settings)return l;const i=e=>{const t={};return HB.forEach((n=>{let{path:o}=n;const r=(0,f.get)(e,o,!1);!1!==r&&(0,f.set)(t,o,r)})),t},s=i(e.settings),a=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,f.isEmpty)(s)&&!a||l.push({presets:s,custom:a,selector:VB}),Object.entries(null!==(o=null===(r=e.settings)||void 0===r?void 0:r.blocks)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;const r=i(o),s=o.custom;(0,f.isEmpty)(r)&&!s||l.push({presets:r,custom:s,selector:t[n].selector})})),l},iI=(e,t)=>{const n=lI(e,t);let o="";return n.forEach((t=>{let{presets:n,custom:r,selector:l}=t;const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return HB.reduce(((n,o)=>{let{path:r,valueKey:l,valueFunc:i,cssVarInfix:s}=o;const a=(0,f.get)(e,r,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{l&&!i?n.push(`--wp--preset--${s}--${(0,f.kebabCase)(e.slug)}: ${e[l]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${(0,f.kebabCase)(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),s=eI(r,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${l}{${i.join(";")};}`)})),o};function sI(e,t){return lI(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return HB.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,f.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,u.createElement)(sm,{preset:e,key:e.slug})))))}))}(t)}))}const aI=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function cI(){let{merged:e}=(0,u.useContext)(WB);const[t]=YB("spacing.blockGap"),n=null!==t,o=!n,r=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return!!t().disableLayoutStyles})),l=(0,g.useSelect)((e=>e(s.store).getBlockStyles),[]);return(0,u.useMemo)((()=>{var t,i,a;if(null===(t=e)||void 0===t||!t.styles||null===(i=e)||void 0===i||!i.settings)return[];e=function(e){var t,n,o,r,l,i,s,a;return!(null===(t=e.styles)||void 0===t?void 0:t.blocks["core/separator"])||!(null===(n=e.styles)||void 0===n||null===(o=n.blocks["core/separator"].color)||void 0===o?void 0:o.background)||null!==(r=e.styles)&&void 0!==r&&null!==(l=r.blocks["core/separator"].color)&&void 0!==l&&l.text||null!==(i=e.styles)&&void 0!==i&&null!==(s=i.blocks["core/separator"].border)&&void 0!==s&&s.color?e:{...e,styles:{...e.styles,blocks:{...e.styles.blocks,"core/separator":{...e.styles.blocks["core/separator"],color:{...e.styles.blocks["core/separator"].color,text:null===(a=e.styles)||void 0===a?void 0:a.blocks["core/separator"].color.background}}}}}}(e);const c=((e,t)=>{const n={};return e.forEach((e=>{var o,r,l,i,s,a,c,u,d;const p=e.name,m=null!==(o=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==o?o:".wp-block-"+p.replace("core/","").replace("/","-"),g=null!==(l=null==e||null===(i=e.supports)||void 0===i||null===(s=i.color)||void 0===s?void 0:s.__experimentalDuotone)&&void 0!==l?l:null,f=!(null==e||null===(a=e.supports)||void 0===a||!a.__experimentalLayout),h=null==e||null===(c=e.supports)||void 0===c||null===(u=c.spacing)||void 0===u||null===(d=u.blockGap)||void 0===d?void 0:d.__experimentalDefault,v=t(p),b={};null!=v&&v.length&&v.forEach((e=>{const t=`.is-style-${e.name}${m}`;b[e.name]=t}));const _={};Object.entries(QB).forEach((t=>{var n,o;let[r,l]=t;const i=null==e||null===(n=e.supports)||void 0===n||null===(o=n[r])||void 0===o?void 0:o.__experimentalSelector;i&&(_[l]=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(m,i))})),n[p]={duotoneSelector:g,fallbackGapValue:h,featureSelectors:Object.keys(_).length?_:void 0,hasLayoutSupport:f,name:p,selector:m,styleVariationSelectors:Object.keys(b).length?b:void 0}})),n})((0,s.getBlockTypes)(),l),u=iI(e,c),d=function(e,t,n,o){var r,l;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=rI(e,t),a=lI(e,t),c=null==e||null===(r=e.settings)||void 0===r?void 0:r.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=(null==e||null===(l=e.settings)||void 0===l?void 0:l.layout)||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),c&&(p+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),p+="}",s.forEach((t=>{let{selector:r,duotoneSelector:l,styles:s,fallbackGapValue:a,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m}=t;d&&Object.entries(d).forEach((e=>{let[t,n]=e;if(null!=s&&s[t]){const e=nI({[t]:s[t]});delete s[t],e.length&&(p+=`${n}{${e.join(";")} }`)}})),m&&Object.entries(m).forEach((t=>{var n;let[o,r]=t;if(null!=s&&null!==(n=s.variations)&&void 0!==n&&n[o]){var l;d&&Object.entries(d).forEach((e=>{var t,n;let[l,i]=e;if(null!=s&&null!==(t=s.variations)&&void 0!==t&&null!==(n=t[o])&&void 0!==n&&n[l]){const e=nI({[l]:s.variations[o][l]});delete s.variations[o][l],e.length&&(p+=`${tI(i,r)}{${e.join(";")} }`)}}));const t=nI(null==s||null===(l=s.variations)||void 0===l?void 0:l[o],r,c,e);t.length&&(p+=`${r}{${t.join(";")}}`)}}));const g={};if(null!=s&&s.filter&&(g.filter=s.filter,delete s.filter),l){const e=nI(g);e.length>0&&(p+=`${l}{${e.join(";")};}`)}i||VB!==r&&!u||(p+=oI({tree:e,style:s,selector:r,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:a}));const f=nI(s,r,c,e);null!=f&&f.length&&(p+=`${r}{${f.join(";")};}`);const h=Object.entries(s).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=h&&h.length&&h.forEach((e=>{let[t,n]=e;const o=nI(n);if(null==o||!o.length)return;const l=`${r.split(",").map((e=>e+t)).join(",")}{${o.join(";")};}`;p+=l}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var m,g;const t=Bl(null==e||null===(m=e.styles)||void 0===m||null===(g=m.spacing)||void 0===g?void 0:g.blockGap)||"0.5em";p+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",p+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return a.forEach((e=>{let{selector:t,presets:n}=e;VB===t&&(t="");const o=JB(t,n);(0,f.isEmpty)(o)||(p+=o)})),p}(e,c,n,o,r),p=sI(e,c),m=[{css:u,isGlobalStyles:!0},{css:d,isGlobalStyles:!0},{css:null!==(a=e.styles.css)&&void 0!==a?a:"",isGlobalStyles:!0}];return(0,s.getBlockTypes)().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var o;const n=c[t.name].selector;m.push({css:aI(null===(o=e.styles.blocks[t.name])||void 0===o?void 0:o.css,n),isGlobalStyles:!0})}})),[m,e.settings,p]}),[n,o,e,r])}const uI=(0,u.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:o,...r}=e;const[l,i]=(0,u.useState)(null),s=(0,m.useInstanceId)(uI),{hideInserter:a,clientId:d}=(0,g.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n,getSelectedBlockClientId:o}=e(To),r=o();return{clientId:o(),hideInserter:!!t(r)||"zoom-out"===n()}}),[]),p=ff({clientId:d,context:"list-view"}),f=ff({clientId:null==l?void 0:l.clientId,context:"list-view"});if((0,u.useEffect)((()=>{null!=f&&f.length&&(0,pn.speak)((0,k.sprintf)((0,k.__)("%s block inserted"),f),"assertive")}),[f]),a)return null;const h=`off-canvas-editor-appender__${s}`,v=(0,k.sprintf)((0,k.__)("Append to %1$s block at position %2$d, Level %3$d"),p,o+1,n);return(0,u.createElement)("div",{className:"offcanvas-editor-appender"},(0,u.createElement)(Zg,c({ref:t,rootClientId:d,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},r,{toggleProps:{"aria-describedby":h},onSelectOrClose:e=>{null!=e&&e.clientId&&i(e)}})),(0,u.createElement)("div",{className:"offcanvas-editor-appender__description",id:h},v))})),dI=Ku(h.__experimentalTreeGridRow);function pI(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:i,path:s,...a}=e;const d=Zu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s});return(0,u.createElement)(dI,c({ref:d,className:p()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r},a),l)}function mI(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Jl,{icon:(0,k.isRTL)()?Wy:Oy}))}var gI=(0,u.forwardRef)((function(e,t){let{className:n,block:o,onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:s,onDragStart:a,onDragEnd:c,draggable:d}=e;const{clientId:m}=o,g=gf(m),f=ff({clientId:m,context:"list-view"}),{isLocked:v}=Oh(m),b=g?(0,k.sprintf)((0,k.__)("Edit %s block"),g.title):(0,k.__)("Edit");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Button,{className:p()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==ud.ENTER&&e.keyCode!==ud.SPACE||r(e)},ref:t,tabIndex:i,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==a||a(e)},onDragEnd:c,draggable:d,href:`#block-${m}`,"aria-hidden":!0,title:b},(0,u.createElement)(mI,{onClick:l}),(0,u.createElement)(xd,{icon:null==g?void 0:g.icon,showColors:!0,context:"list-view"}),(0,u.createElement)(h.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(h.__experimentalTruncate,{ellipsizeMode:"auto"},f)),(null==g?void 0:g.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(h.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},g.anchor)),v&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Jl,{icon:jy})))))})),fI=window.wp.escapeHtml;function hI(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}:{}}}function vI(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:o}=(0,g.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:o,getBlockTransformItems:r}=e(To);return{getBlock:n,blockTransforms:r(n(t),o(t))}}),[t]),{replaceBlock:r}=(0,g.useDispatch)(To),l=["core/page-list","core/site-logo","core/social-links","core/search"],i=o.filter((e=>l.includes(e.name)));return null!=i&&i.length&&t?(0,u.createElement)("div",{className:"link-control-transform"},(0,u.createElement)("h3",{className:"link-control-transform__subheading"},(0,k.__)("Transform")),(0,u.createElement)("div",{className:"link-control-transform__items"},i.map((e=>(0,u.createElement)(h.Button,{key:`transform-${e.name}`,onClick:()=>r(t,(0,s.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,u.createElement)(xd,{icon:e.icon}),e.title))))):null}function bI(e){const{label:t,url:n,opensInNewTab:o,type:r,kind:l}=e.link,i={url:n,opensInNewTab:o,title:t&&(0,Ri.__unstableStripHTML)(t)};return(0,u.createElement)(h.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,u.createElement)(dS,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:i,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:hI(r,l),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:n?null:()=>(0,u.createElement)(vI,{clientId:e.clientId})}))}const _I=["core/navigation-link","core/navigation-submenu"],kI=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:i,siblingBlockCount:s,level:a,isExpanded:d,selectedClientIds:m,...f}=e;const{clientId:h}=r,[v,b]=(0,u.useState)(),{blockMovingClientId:_,selectedBlockInBlockEditor:k,lastInsertedBlockClientId:y}=(0,g.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n,getLastInsertedBlocksClientIds:o}=Io(e(To)),r=o();return{blockMovingClientId:t(),selectedBlockInBlockEditor:n(),lastInsertedBlockClientId:r&&r[0]}}),[h]),{insertedBlockAttributes:E,insertedBlockName:C,setInsertedBlockAttributes:S}=(e=>{const{insertedBlockAttributes:t,insertedBlockName:n}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(To);return{insertedBlockAttributes:o(e),insertedBlockName:n(e)}}),[e]),{updateBlockAttributes:o}=(0,g.useDispatch)(To),r=t=>{e&&o(e,t)};return e?{insertedBlockAttributes:t,insertedBlockName:n,setInsertedBlockAttributes:r}:{insertedBlockAttributes:void 0,insertedBlockName:void 0,setInsertedBlockAttributes:r}})(y),w=null==E?void 0:E.id;(0,u.useEffect)((()=>{h===y&&null!=_I&&_I.includes(C)&&!w&&b(!0)}),[y,h,C,w]);const B=_&&k===h,I=p()("block-editor-list-view-block-contents",{"is-dropping-before":B}),x=m.includes(h)?m:[h];return(0,u.createElement)(u.Fragment,null,v&&(0,u.createElement)(bI,{clientId:y,link:E,onClose:()=>b(!1),hasCreateSuggestion:!1,onChange:e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:o="",kind:r="",type:l=""}=n,{title:i="",url:s="",opensInNewTab:a,id:c,kind:u=r,type:d=l}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),g=i&&i!==o&&p!==m?(0,fI.escapeHTML)(i):o||(0,fI.escapeHTML)(m),f="post_tag"===d?"tag":d.replace("-","_"),h=["post","page","tag","category"].indexOf(f)>-1,v=!u&&!h||"custom"===u?"custom":u;t({...s&&{url:encodeURI((0,vg.safeDecodeURI)(s))},...g&&{label:g},...void 0!==a&&{opensInNewTab:a},...c&&Number.isInteger(c)&&{id:c},...v&&{kind:v},...f&&"URL"!==f&&{type:f}})}(e,S,E),b(!1)}}),(0,u.createElement)(vf,{clientIds:x},(e=>{let{draggable:p,onDragStart:m,onDragEnd:g}=e;return(0,u.createElement)(gI,c({ref:t,className:I,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:i,siblingBlockCount:s,level:a,draggable:p,onDragStart:m,onDragEnd:g,isExpanded:d},f))})))}));var yI=kI;const EI=(0,u.createContext)({}),CI=()=>(0,u.useContext)(EI);var SI=(0,u.memo)((function e(t){let{block:{clientId:n},isDragged:o,isSelected:r,isBranchSelected:l,selectBlock:i,position:a,level:c,rowCount:d,siblingBlockCount:f,showBlockMovers:v,path:b,isExpanded:_,selectedClientIds:y,preventAnnouncement:E}=t;const C=(0,u.useRef)(null),[S,w]=(0,u.useState)(!1),{isLocked:B,isContentLocked:I}=Oh(n),x=(0,g.useSelect)((e=>!r&&(!!I&&e(To).hasSelectedInnerBlock(n,!0))),[I,n,r]),T=x||r&&y[0]===n,M=x||r&&y[y.length-1]===n,{toggleBlockHighlight:N}=(0,g.useDispatch)(To),P=gf(n),L=(0,g.useSelect)((e=>e(To).getBlock(n)),[n]);(0,u.useEffect)((()=>{!z&&r&&C.current.focus()}),[]);const R=(0,u.useCallback)((()=>{w(!0),N(n,!0)}),[n,w,N]),A=(0,u.useCallback)((()=>{w(!1),N(n,!1)}),[n,w,N]),O=(0,u.useCallback)((e=>{i(e,n),e.preventDefault()}),[n,i]),D=(0,u.useCallback)((e=>{i(void 0,e)}),[i]),{isTreeGridMounted:z,expand:F,collapse:V,LeafMoreMenu:H}=CI(),G=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?V(n):!1===_&&F(n)}),[n,F,V,_]),U=(0,m.useInstanceId)(e);if(!L)return null;const $=!!L&&(0,s.hasBlockSupport)(L.name,"__experimentalToolbar",!0),j=`list-view-block-select-button__${U}`,W=((e,t,n)=>(0,k.sprintf)((0,k.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(a,f,c);let K=(0,k.__)("Link");P&&(K=B?(0,k.sprintf)((0,k.__)("%s link (locked)"),P.title):(0,k.sprintf)((0,k.__)("%s link"),P.title));const q=P?(0,k.sprintf)((0,k.__)("Options for %s block"),P.title):(0,k.__)("Options"),Y=v&&f>0,Z=p()("block-editor-list-view-block__mover-cell",{"is-visible":S||r}),Q=p()("block-editor-list-view-block__menu-cell",{"is-visible":S||T});let X;Y?X=1:$||(X=2);const J=p()({"is-selected":r||x,"is-first-selected":T,"is-last-selected":M,"is-branch-selected":l,"is-dragging":o,"has-single-cell":!$}),ee=y.includes(n)?y:[n],te=H||Qh;return(0,u.createElement)(pI,{className:J,onMouseEnter:R,onMouseLeave:A,onFocus:R,onBlur:A,level:c,position:a,rowCount:d,path:b,id:`list-view-block-${n}`,"data-block":n,isExpanded:I?void 0:_,"aria-selected":!!r||x},(0,u.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:X,ref:C,"aria-label":K,"aria-selected":!!r||x,"aria-expanded":I?void 0:_,"aria-describedby":j},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(yI,{block:L,onClick:O,onToggleExpanded:G,isSelected:r,position:a,siblingBlockCount:f,level:c,ref:t,tabIndex:n,onFocus:o,isExpanded:_,selectedClientIds:y,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},W))})),Y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalTreeGridCell,{className:Z,withoutGridItem:!0},(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(wf,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})),(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(Bf,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})))),$&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalTreeGridCell,{className:Q,"aria-selected":!!r||x},(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(te,{clientIds:ee,block:L,clientId:n,icon:yg,label:q,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:o,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:D}))}))))}));function wI(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(BI(t,n,o),0):1}const BI=(e,t,n)=>(o,r)=>{var l;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+wI(r,e,t,n):o+1},II=()=>{};var xI=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=II,showBlockMovers:r,selectedClientIds:l,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:d=0,fixedListWindow:p,isExpanded:m,parentId:f,shouldShowInnerBlocks:v=!0}=t,b=(0,g.useSelect)((e=>!(!f||"contentOnly"!==e(To).getTemplateLock(f))),[f]),{expandedState:_,draggedClientIds:k}=CI();if(b)return null;const y=1===i,E=n.filter(Boolean),C=E.length,S=y?C+1:C;let w=d;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:d,innerBlocks:f}=t;n>0&&(w+=wI(E[n-1],_,k,m));const{itemInView:h}=p,b=h(w),y=n+1,B=s.length>0?`${s}_${y}`:`${y}`,I=!(null==f||!f.length),x=I&&v?null!==(c=_[d])&&void 0!==c?c:m:void 0,T=!(null==k||!k.includes(d)),M=T||b,N=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(d,l),P=a||N&&I;return(0,u.createElement)(g.AsyncModeProvider,{key:d,value:!N},M&&(0,u.createElement)(SI,{block:t,selectBlock:o,isSelected:N,isBranchSelected:P,isDragged:T,level:i,position:y,rowCount:S,siblingBlockCount:C,showBlockMovers:r,path:B,isExpanded:x,listPosition:w,selectedClientIds:l}),!M&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,u.createElement)(e,{parentId:d,blocks:f,selectBlock:o,showBlockMovers:r,level:i+1,path:B,listPosition:w+1,fixedListWindow:p,isBranchSelected:P,selectedClientIds:l,isExpanded:m}))})),y&&(0,u.createElement)(h.__experimentalTreeGridRow,{level:i,setSize:S,positionInSet:S,isExpanded:!0},(0,u.createElement)(h.__experimentalTreeGridCell,null,(e=>(0,u.createElement)(uI,c({nestingLevel:i,blockCount:C},e))))))}));function TI(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,s]=(0,u.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),a=s||i,c=(0,u.useCallback)((()=>{if(!i)return 0;const e=a.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,a]),d=(0,u.useMemo)((()=>{if(!a)return{};const e=c();return{width:a.offsetWidth-e}}),[c,a]),p=(0,u.useMemo)((()=>{if(a&&("top"===l||"bottom"===l||"inside"===l))return{ownerDocument:a.ownerDocument,getBoundingClientRect(){const e=a.getBoundingClientRect(),t=c(),n=e.left+t,o=e.right;let r=0,i=0;"top"===l?(r=e.top,i=e.top):(r=e.bottom,i=e.bottom);const s=o-n,u=i-r;return new window.DOMRect(n,r,s,u)}}}),[a,l,c]);return a?(0,u.createElement)(h.Popover,{animate:!1,anchor:p,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function MI(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(To),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getBlockSelectionEnd:i,getSelectedBlockClientIds:a,hasMultiSelection:c,hasSelectedBlock:d}=(0,g.useSelect)(To),{getBlockType:p}=(0,g.useSelect)(s.store),m=(0,u.useCallback)((async(i,s,u)=>{if(null==i||!i.shiftKey)return void n(s);i.preventDefault();const m="keydown"===i.type&&(i.keyCode===ud.UP||i.keyCode===ud.DOWN||i.keyCode===ud.HOME||i.keyCode===ud.END);if(!m&&!d()&&!c())return void n(s,null);const g=a(),f=[...r(s),s];m&&!g.some((e=>f.includes(e)))&&await e();let h=l(),v=s;m&&(d()||c()||(h=s),u&&(v=u));const b=r(h),_=r(v),{start:y,end:E}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(h,v,b,_);await t(y,E,null);const C=a();if((i.keyCode===ud.HOME||i.keyCode===ud.END)&&C.length>1)return;const S=g.filter((e=>!C.includes(e)));let w;if(1===S.length){var B;const e=null===(B=p(o(S[0])))||void 0===B?void 0:B.title;e&&(w=(0,k.sprintf)((0,k.__)("%s deselected."),e))}else S.length>1&&(w=(0,k.sprintf)((0,k.__)("%s blocks deselected."),S.length));w&&(0,pn.speak)(w)}),[e,o,p,r,l,i,a,c,d,t,n]);return{updateBlockSelection:m}}const NI=["top","bottom"];function PI(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,g.useSelect)(To),[l,i]=(0,u.useState)(),{rootClientId:s,blockIndex:a}=l||{},c=Fv(s,a),d=o(),p=(0,m.useThrottle)((0,u.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==d||!d.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=Hv(t,s,NI),u=Gv(t,s);if(void 0===r||a0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l),element:o,isDraggedBlock:!!a&&d.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(d,i),canInsertDraggedBlocksAsChild:!a||r(d,l)}})),s);c&&i(c)}),[d]),200);return{ref:(0,m.__experimentalUseDropZone)({onDrop:c,onDragOver(e){p(e,e.currentTarget)},onDragEnd(){p.cancel(),i(null)}}),target:l}}const LI=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var RI=(0,u.forwardRef)((function(e,t){let{id:n,blocks:o,showBlockMovers:r=!1,isExpanded:l=!1,LeafMoreMenu:i,description:s=(0,k.__)("Block navigation structure"),onSelect:a}=e;const{getBlock:c}=(0,g.useSelect)(To),{clientIdsTree:d,draggedClientIds:p,selectedClientIds:f}=function(e){return(0,g.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(To);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(o),{visibleBlockCount:v,shouldShowInnerBlocks:b}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(To),r=(null==p?void 0:p.length)>0?n(p).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[p]),{updateBlockSelection:_}=MI(),[y,E]=(0,u.useReducer)(LI,{}),{ref:C,target:S}=PI(),w=(0,u.useRef)(),B=(0,m.useMergeRefs)([w,C,t]),I=(0,u.useRef)(!1),{setSelectedTreeId:x}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,u.useState)(null),{selectedBlockParentClientIds:l}=(0,g.useSelect)((e=>{const{getBlockParents:n}=e(To);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(l)&&l.length?l:null;return(0,u.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:l})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:f[0],setExpandedState:E}),T=(0,u.useCallback)(((e,t)=>{_(e,t),x(t),a&&a(c(t))}),[x,_,a,c]);(0,u.useEffect)((()=>{I.current=!0}),[]);const[M]=(0,m.__experimentalUseFixedWindowList)(w,36,v,{useWindowing:!0,windowOverscan:40}),N=(0,u.useCallback)((e=>{e&&E({type:"expand",clientIds:[e]})}),[E]),P=(0,u.useCallback)((e=>{e&&E({type:"collapse",clientIds:[e]})}),[E]),L=(0,u.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,u.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),A=(0,u.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&_(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[_]),O=(0,u.useMemo)((()=>({isTreeGridMounted:I.current,draggedClientIds:p,expandedState:y,expand:N,collapse:P,LeafMoreMenu:i})),[I.current,p,y,N,P,i]);return(0,u.createElement)(g.AsyncModeProvider,{value:!0},(0,u.createElement)(TI,{listViewRef:w,blockDropTarget:S}),(0,u.createElement)("div",{className:"offcanvas-editor-list-view-tree-wrapper"},(0,u.createElement)(h.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,k.__)("Block navigation structure"),ref:B,onCollapseRow:R,onExpandRow:L,onFocusRow:A,"aria-description":s},(0,u.createElement)(EI.Provider,{value:O},(0,u.createElement)(xI,{blocks:d,selectBlock:T,showBlockMovers:r,fixedListWindow:M,selectedClientIds:f,isExpanded:l,shouldShowInnerBlocks:b}),(0,u.createElement)(h.__experimentalTreeGridRow,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!d.length&&(0,u.createElement)(h.__experimentalTreeGridCell,{withoutGridItem:!0},(0,u.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},(0,k.__)("Your menu is currently empty. Add your first menu item to get started."))))))))}));const AI={};Bo(AI,{...i,ExperimentalBlockEditorProvider:Ld,OffCanvasEditor:RI})}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file diff --git a/wp-includes/js/dist/components.js b/wp-includes/js/dist/components.js index c3cae9e3b4..e28695cd62 100644 --- a/wp-includes/js/dist/components.js +++ b/wp-includes/js/dist/components.js @@ -18421,64 +18421,53 @@ function ScrollLock() { /* harmony default export */ var scroll_lock = (ScrollLock); ;// CONCATENATED MODULE: ./node_modules/proxy-compare/dist/index.modern.js -const index_modern_e=Symbol(),index_modern_t=Symbol(),index_modern_r="a",index_modern_n="w";let index_modern_o=(e,t)=>new Proxy(e,t);const index_modern_s=Object.getPrototypeOf,index_modern_c=new WeakMap,index_modern_l=e=>e&&(index_modern_c.has(e)?index_modern_c.get(e):index_modern_s(e)===Object.prototype||index_modern_s(e)===Array.prototype),index_modern_f=e=>"object"==typeof e&&null!==e,index_modern_i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(index_modern_s(e),t)},index_modern_u=e=>e[index_modern_t]||e,index_modern_a=(s,c,f,p)=>{if(!index_modern_l(s))return s;let g=p&&p.get(s);if(!g){const e=index_modern_u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,index_modern_i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[index_modern_r].get(o);if(s||(s={},c[index_modern_r].set(o,s)),e===index_modern_n)s[index_modern_n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===index_modern_t?o:(f("k",n),index_modern_a(Reflect.get(e,n),c[index_modern_r],c.c)),has:(t,n)=>n===index_modern_e?(l=!0,c[index_modern_r].delete(o),!0):(f("h",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(index_modern_n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=index_modern_o(h||y,w[0]),f&&f.set(y,w)),w[1][index_modern_r]=c,w[1].c=f,w[1].p},index_modern_p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!index_modern_f(e)||!index_modern_f(t))return!0;const s=r.get(index_modern_u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[index_modern_n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=index_modern_p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},index_modern_g=t=>!!index_modern_l(t)&&index_modern_e in t,index_modern_y=e=>index_modern_l(e)&&e[index_modern_t]||null,index_modern_h=(e,t=!0)=>{index_modern_c.set(e,t)},index_modern_w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;index_modern_f(e)&&s.add(e);const i=index_modern_f(e)&&t.get(index_modern_u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[index_modern_n]){const e=":ownKeys";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!("value"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},index_modern_O=e=>{index_modern_o=e}; +const index_modern_e=Symbol(),index_modern_t=Symbol(),index_modern_r=Symbol();let index_modern_n=(e,t)=>new Proxy(e,t);const index_modern_o=Object.getPrototypeOf,index_modern_s=new WeakMap,index_modern_c=e=>e&&(index_modern_s.has(e)?index_modern_s.get(e):index_modern_o(e)===Object.prototype||index_modern_o(e)===Array.prototype),index_modern_l=e=>"object"==typeof e&&null!==e,index_modern_a=new WeakMap,index_modern_f=e=>e[index_modern_r]||e,index_modern_i=(s,l,p)=>{if(!index_modern_c(s))return s;const y=index_modern_f(s),u=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.writable))(y);let g=p&&p.get(y);return g&&g[1].f===u||(g=((n,o)=>{const s={f:o};let c=!1;const l=(t,r)=>{if(!c){let o=s.a.get(n);o||(o=new Set,s.a.set(n,o)),r&&o.has(index_modern_e)||o.add(t)}},a={get:(e,t)=>t===index_modern_r?n:(l(t),index_modern_i(e[t],s.a,s.c)),has:(e,r)=>r===index_modern_t?(c=!0,s.a.delete(n),!0):(l(r),r in e),getOwnPropertyDescriptor:(e,t)=>(l(t,!0),Object.getOwnPropertyDescriptor(e,t)),ownKeys:t=>(l(index_modern_e),Reflect.ownKeys(t))};return o&&(a.set=a.deleteProperty=()=>!1),[a,s]})(y,u),g[1].p=index_modern_n(u?(e=>{let t=index_modern_a.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const r=Object.getOwnPropertyDescriptors(e);Object.values(r).forEach(e=>{e.configurable=!0}),t=Object.create(index_modern_o(e),r)}index_modern_a.set(e,t)}return t})(y):y,g[0]),p&&p.set(y,g)),g[1].a=l,g[1].c=p,g[1].p},index_modern_p=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])},index_modern_y=(t,r,n,o)=>{if(Object.is(t,r))return!1;if(!index_modern_l(t)||!index_modern_l(r))return!0;const s=n.get(index_modern_f(t));if(!s)return!0;if(o){const e=o.get(t);if(e&&e.n===r)return e.g;o.set(t,{n:r,g:!1})}let c=null;for(const l of s){const s=l===index_modern_e?index_modern_p(t,r):index_modern_y(t[l],r[l],n,o);if(!0!==s&&!1!==s||(c=s),c)break}return null===c&&(c=!0),o&&o.set(t,{n:r,g:c}),c},index_modern_u=e=>!!index_modern_c(e)&&index_modern_t in e,index_modern_g=e=>index_modern_c(e)&&e[index_modern_r]||null,index_modern_b=(e,t=!0)=>{index_modern_s.set(e,t)},index_modern_O=(e,t)=>{const r=[],n=new WeakSet,o=(e,s)=>{if(n.has(e))return;index_modern_l(e)&&n.add(e);const c=index_modern_l(e)&&t.get(index_modern_f(e));c?c.forEach(t=>{o(e[t],s?[...s,t]:[t])}):s&&r.push(s)};return o(e),r},index_modern_w=e=>{index_modern_n=e}; // EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js var shim = __webpack_require__(635); -;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla.mjs +;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla.js const vanilla_isObject = (x) => typeof x === "object" && x !== null; -const proxyStateMap = /* @__PURE__ */ new WeakMap(); const refSet = /* @__PURE__ */ new WeakSet(); -const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => vanilla_isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => { - switch (promise.status) { - case "fulfilled": - return promise.value; - case "rejected": - throw promise.reason; - default: - throw promise; - } -}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => { - const cache = snapCache.get(target); +const VERSION = true ? Symbol("VERSION") : 0; +const LISTENERS = true ? Symbol("LISTENERS") : 0; +const SNAPSHOT = true ? Symbol("SNAPSHOT") : 0; +const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => vanilla_isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), PROMISE_RESULT = true ? Symbol("PROMISE_RESULT") : 0, PROMISE_ERROR = true ? Symbol("PROMISE_ERROR") : 0, snapshotCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (version, target, receiver) => { + const cache = snapshotCache.get(receiver); if ((cache == null ? void 0 : cache[0]) === version) { return cache[1]; } - const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target)); - index_modern_h(snap, true); - snapCache.set(target, [version, snap]); + const snapshot2 = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target)); + index_modern_b(snapshot2, true); + snapshotCache.set(receiver, [version, snapshot2]); Reflect.ownKeys(target).forEach((key) => { - if (Object.getOwnPropertyDescriptor(snap, key)) { - return; - } - const value = Reflect.get(target, key); - const desc = { - value, - enumerable: true, - // This is intentional to avoid copying with proxy-compare. - // It's still non-writable, so it avoids assigning a value. - configurable: true - }; + const value = Reflect.get(target, key, receiver); if (refSet.has(value)) { - index_modern_h(value, false); + index_modern_b(value, false); + snapshot2[key] = value; } else if (value instanceof Promise) { - delete desc.value; - desc.get = () => handlePromise(value); - } else if (proxyStateMap.has(value)) { - const [target2, ensureVersion] = proxyStateMap.get( - value - ); - desc.value = createSnapshot( - target2, - ensureVersion(), - handlePromise - ); + if (PROMISE_RESULT in value) { + snapshot2[key] = value[PROMISE_RESULT]; + } else { + const errorOrPromise = value[PROMISE_ERROR] || value; + Object.defineProperty(snapshot2, key, { + get() { + if (PROMISE_RESULT in value) { + return value[PROMISE_RESULT]; + } + throw errorOrPromise; + } + }); + } + } else if (value == null ? void 0 : value[LISTENERS]) { + snapshot2[key] = value[SNAPSHOT]; + } else { + snapshot2[key] = value; } - Object.defineProperty(snap, key, desc); }); - return snap; -}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => { + return Object.freeze(snapshot2); +}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1], proxyFunction2 = (initialObject) => { if (!vanilla_isObject(initialObject)) { throw new Error("object required"); } @@ -18494,75 +18483,44 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) = listeners.forEach((listener) => listener(op, nextVersion)); } }; - let checkVersion = versionHolder[1]; - const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => { - if (checkVersion !== nextCheckVersion && !listeners.size) { - checkVersion = nextCheckVersion; - propProxyStates.forEach(([propProxyState]) => { - const propVersion = propProxyState[1](nextCheckVersion); - if (propVersion > version) { - version = propVersion; - } - }); + const propListeners = /* @__PURE__ */ new Map(); + const getPropListener = (prop) => { + let propListener = propListeners.get(prop); + if (!propListener) { + propListener = (op, nextVersion) => { + const newOp = [...op]; + newOp[1] = [prop, ...newOp[1]]; + notifyUpdate(newOp, nextVersion); + }; + propListeners.set(prop, propListener); } - return version; + return propListener; }; - const createPropListener = (prop) => (op, nextVersion) => { - const newOp = [...op]; - newOp[1] = [prop, ...newOp[1]]; - notifyUpdate(newOp, nextVersion); - }; - const propProxyStates = /* @__PURE__ */ new Map(); - const addPropListener = (prop, propProxyState) => { - var _a; - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && propProxyStates.has(prop)) { - throw new Error("prop listener already exists"); - } - if (listeners.size) { - const remove = propProxyState[3](createPropListener(prop)); - propProxyStates.set(prop, [propProxyState, remove]); - } else { - propProxyStates.set(prop, [propProxyState]); - } - }; - const removePropListener = (prop) => { - var _a; - const entry = propProxyStates.get(prop); - if (entry) { - propProxyStates.delete(prop); - (_a = entry[1]) == null ? void 0 : _a.call(entry); - } - }; - const addListener = (listener) => { - listeners.add(listener); - if (listeners.size === 1) { - propProxyStates.forEach(([propProxyState, prevRemove], prop) => { - var _a; - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && prevRemove) { - throw new Error("remove already exists"); - } - const remove = propProxyState[3](createPropListener(prop)); - propProxyStates.set(prop, [propProxyState, remove]); - }); - } - const removeListener = () => { - listeners.delete(listener); - if (listeners.size === 0) { - propProxyStates.forEach(([propProxyState, remove], prop) => { - if (remove) { - remove(); - propProxyStates.set(prop, [propProxyState]); - } - }); - } - }; - return removeListener; + const popPropListener = (prop) => { + const propListener = propListeners.get(prop); + propListeners.delete(prop); + return propListener; }; const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject)); const handler = { + get(target, prop, receiver) { + if (prop === VERSION) { + return version; + } + if (prop === LISTENERS) { + return listeners; + } + if (prop === SNAPSHOT) { + return createSnapshot(version, target, receiver); + } + return Reflect.get(target, prop, receiver); + }, deleteProperty(target, prop) { const prevValue = Reflect.get(target, prop); - removePropListener(prop); + const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS]; + if (childListeners) { + childListeners.delete(popPropListener(prop)); + } const deleted = Reflect.deleteProperty(target, prop); if (deleted) { notifyUpdate(["delete", [prop], prevValue]); @@ -18570,34 +18528,39 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) = return deleted; }, set(target, prop, value, receiver) { + var _a; const hasPrevValue = Reflect.has(target, prop); const prevValue = Reflect.get(target, prop, receiver); - if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) { + if (hasPrevValue && objectIs(prevValue, value)) { return true; } - removePropListener(prop); - if (vanilla_isObject(value)) { - value = index_modern_y(value) || value; + const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS]; + if (childListeners) { + childListeners.delete(popPropListener(prop)); } - let nextValue = value; - if (value instanceof Promise) { - value.then((v) => { - value.status = "fulfilled"; - value.value = v; + if (vanilla_isObject(value)) { + value = index_modern_g(value) || value; + } + let nextValue; + if ((_a = Object.getOwnPropertyDescriptor(target, prop)) == null ? void 0 : _a.set) { + nextValue = value; + } else if (value instanceof Promise) { + nextValue = value.then((v) => { + nextValue[PROMISE_RESULT] = v; notifyUpdate(["resolve", [prop], v]); + return v; }).catch((e) => { - value.status = "rejected"; - value.reason = e; + nextValue[PROMISE_ERROR] = e; notifyUpdate(["reject", [prop], e]); }); + } else if (value == null ? void 0 : value[LISTENERS]) { + nextValue = value; + nextValue[LISTENERS].add(getPropListener(prop)); + } else if (canProxy(value)) { + nextValue = vanilla_proxy(value); + nextValue[LISTENERS].add(getPropListener(prop)); } else { - if (!proxyStateMap.has(value) && canProxy(value)) { - nextValue = proxyFunction(value); - } - const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue); - if (childProxyState) { - addPropListener(prop, childProxyState); - } + nextValue = value; } Reflect.set(target, prop, nextValue, receiver); notifyUpdate(["set", [prop], value, prevValue]); @@ -18606,60 +18569,47 @@ const buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) = }; const proxyObject = newProxy(baseObject, handler); proxyCache.set(initialObject, proxyObject); - const proxyState = [ - baseObject, - ensureVersion, - createSnapshot, - addListener - ]; - proxyStateMap.set(proxyObject, proxyState); Reflect.ownKeys(initialObject).forEach((key) => { const desc = Object.getOwnPropertyDescriptor( initialObject, key ); - const hasValue = "value" in desc; - delete desc.value; - Object.defineProperty(baseObject, key, desc); - if (hasValue) { + if (desc.get || desc.set) { + Object.defineProperty(baseObject, key, desc); + } else { proxyObject[key] = initialObject[key]; } }); return proxyObject; }) => [ - // public functions - proxyFunction, - // shared state - proxyStateMap, + proxyFunction2, refSet, - // internal things + VERSION, + LISTENERS, + SNAPSHOT, objectIs, newProxy, canProxy, - defaultHandlePromise, - snapCache, + PROMISE_RESULT, + PROMISE_ERROR, + snapshotCache, createSnapshot, proxyCache, versionHolder ]; -const [defaultProxyFunction] = buildProxyFunction(); +const [proxyFunction] = buildProxyFunction(); function vanilla_proxy(initialObject = {}) { - return defaultProxyFunction(initialObject); + return proxyFunction(initialObject); } function vanilla_getVersion(proxyObject) { - const proxyState = proxyStateMap.get(proxyObject); - return proxyState == null ? void 0 : proxyState[1](); + return vanilla_isObject(proxyObject) ? proxyObject[VERSION] : void 0; } function vanilla_subscribe(proxyObject, callback, notifyInSync) { - var _a; - const proxyState = proxyStateMap.get(proxyObject); - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && !proxyState) { + if ( true && !(proxyObject == null ? void 0 : proxyObject[LISTENERS])) { console.warn("Please use proxy object"); } let promise; const ops = []; - const addListener = proxyState[3]; - let isListenerActive = false; const listener = (op) => { ops.push(op); if (notifyInSync) { @@ -18669,27 +18619,20 @@ function vanilla_subscribe(proxyObject, callback, notifyInSync) { if (!promise) { promise = Promise.resolve().then(() => { promise = void 0; - if (isListenerActive) { - callback(ops.splice(0)); - } + callback(ops.splice(0)); }); } }; - const removeListener = addListener(listener); - isListenerActive = true; + proxyObject[LISTENERS].add(listener); return () => { - isListenerActive = false; - removeListener(); + proxyObject[LISTENERS].delete(listener); }; } -function vanilla_snapshot(proxyObject, handlePromise) { - var _a; - const proxyState = proxyStateMap.get(proxyObject); - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production" && !proxyState) { +function vanilla_snapshot(proxyObject) { + if ( true && !(proxyObject == null ? void 0 : proxyObject[SNAPSHOT])) { console.warn("Please use proxy object"); } - const [target, ensureVersion, createSnapshot] = proxyState; - return createSnapshot(target, ensureVersion(), handlePromise); + return proxyObject[SNAPSHOT]; } function vanilla_ref(obj) { refSet.add(obj); @@ -18699,24 +18642,22 @@ const unstable_buildProxyFunction = (/* unused pure expression or super */ null -;// CONCATENATED MODULE: ./node_modules/valtio/esm/react.mjs +;// CONCATENATED MODULE: ./node_modules/valtio/esm/index.js + -const { use } = external_React_; const { useSyncExternalStore } = shim; const useAffectedDebugValue = (state, affected) => { const pathList = (0,external_React_.useRef)(); (0,external_React_.useEffect)(() => { - pathList.current = index_modern_w(state, affected, true); + pathList.current = index_modern_O(state, affected); }); (0,external_React_.useDebugValue)(pathList.current); }; -const targetCache = /* @__PURE__ */ new WeakMap(); function useSnapshot(proxyObject, options) { - var _a; const notifyInSync = options == null ? void 0 : options.sync; const lastSnapshot = (0,external_React_.useRef)(); const lastAffected = (0,external_React_.useRef)(); @@ -18731,9 +18672,9 @@ function useSnapshot(proxyObject, options) { [proxyObject, notifyInSync] ), () => { - const nextSnapshot = vanilla_snapshot(proxyObject, use); + const nextSnapshot = vanilla_snapshot(proxyObject); try { - if (!inRender && lastSnapshot.current && lastAffected.current && !index_modern_p( + if (!inRender && lastSnapshot.current && lastAffected.current && !index_modern_y( lastSnapshot.current, nextSnapshot, lastAffected.current, @@ -18745,7 +18686,7 @@ function useSnapshot(proxyObject, options) { } return nextSnapshot; }, - () => vanilla_snapshot(proxyObject, use) + () => vanilla_snapshot(proxyObject) ); inRender = false; const currAffected = /* @__PURE__ */ new WeakMap(); @@ -18753,31 +18694,24 @@ function useSnapshot(proxyObject, options) { lastSnapshot.current = currSnapshot; lastAffected.current = currAffected; }); - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") { + if (true) { useAffectedDebugValue(currSnapshot, currAffected); } const proxyCache = (0,external_React_.useMemo)(() => /* @__PURE__ */ new WeakMap(), []); - return index_modern_a( - currSnapshot, - currAffected, - proxyCache, - targetCache - ); + return index_modern_i(currSnapshot, currAffected, proxyCache); } -;// CONCATENATED MODULE: ./node_modules/valtio/esm/vanilla/utils.mjs +;// CONCATENATED MODULE: ./node_modules/valtio/esm/utils.js function subscribeKey(proxyObject, key, callback, notifyInSync) { - let prevValue = proxyObject[key]; return subscribe( proxyObject, - () => { - const nextValue = proxyObject[key]; - if (!Object.is(prevValue, nextValue)) { - callback(prevValue = nextValue); + (ops) => { + if (ops.some((op) => op[1][0] === key)) { + callback(proxyObject[key]); } }, notifyInSync @@ -18840,7 +18774,6 @@ function watch(callback, options) { const DEVTOOLS = Symbol(); function devtools(proxyObject, options) { - var _a, _b; if (typeof options === "string") { console.warn( "string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400" @@ -18850,11 +18783,11 @@ function devtools(proxyObject, options) { const { enabled, name = "" } = options || {}; let extension; try { - extension = (enabled != null ? enabled : ((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__; + extension = (enabled != null ? enabled : (/* unsupported import.meta.env */ undefined && 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__; } catch { } if (!extension) { - if (((_b = /* unsupported import.meta.env */ undefined) == null ? void 0 : _b.MODE) !== "production" && enabled) { + if ( true && enabled) { console.warn("[Warning] Please install/enable Redux devtools extension"); } return; @@ -18874,14 +18807,14 @@ function devtools(proxyObject, options) { devtools2.send( { type: action, - updatedAt: (/* @__PURE__ */ new Date()).toLocaleString() + updatedAt: new Date().toLocaleString() }, snapWithoutDevtools ); } }); const unsub2 = devtools2.subscribe((message) => { - var _a2, _b2, _c, _d, _e, _f; + var _a, _b, _c, _d, _e, _f; if (message.type === "ACTION" && message.payload) { try { Object.assign(proxyObject, JSON.parse(message.payload)); @@ -18893,7 +18826,7 @@ function devtools(proxyObject, options) { } } if (message.type === "DISPATCH" && message.state) { - if (((_a2 = message.payload) == null ? void 0 : _a2.type) === "JUMP_TO_ACTION" || ((_b2 = message.payload) == null ? void 0 : _b2.type) === "JUMP_TO_STATE") { + if (((_a = message.payload) == null ? void 0 : _a.type) === "JUMP_TO_ACTION" || ((_b = message.payload) == null ? void 0 : _b.type) === "JUMP_TO_STATE") { isTimeTraveling = true; const state = JSON.parse(message.state); Object.assign(proxyObject, state); @@ -19076,16 +19009,11 @@ function derive(derivedFns, options) { } else { const subscription = { s: p, - // sourceObject d: proxyObject, - // derivedObject k: key, - // derived key c: evaluate, - // callback n: notifyInSync, i: derivedKeys - // ignoringKeys }; addSubscription(subscription); entry.s = subscription; @@ -19128,12 +19056,9 @@ function underive(proxyObject, options) { } function addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) { - var _a; - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") { - console.warn( - "addComputed is deprecated. Please consider using `derive`. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201" - ); - } + console.warn( + "addComputed is deprecated. Please consider using `derive` or `proxyWithComputed` instead. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201" + ); const derivedFns = {}; Object.keys(computedFns_FAKE).forEach((key) => { derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject)); @@ -19141,13 +19066,7 @@ function addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = pr return derive(derivedFns, { proxy: targetObject }); } -function proxyWithComputed_DEPRECATED(initialObject, computedFns) { - var _a; - if (((_a = /* unsupported import.meta.env */ undefined) == null ? void 0 : _a.MODE) !== "production") { - console.warn( - 'proxyWithComputed is deprecated. Please follow "Computed Properties" guide in docs.' - ); - } +function proxyWithComputed(initialObject, computedFns) { Object.keys(computedFns).forEach((key) => { if (Object.getOwnPropertyDescriptor(initialObject, key)) { throw new Error("object property already defined"); @@ -19181,7 +19100,6 @@ function proxyWithHistory(initialValue, skipSubscribe = false) { value: initialValue, history: ref({ wip: void 0, - // to avoid infinite loop snapshots: [], index: -1 }), @@ -19260,7 +19178,7 @@ function proxySet(initialValues) { return "Set"; }, toJSON() { - return new Set(this.data); + return {}; }, [Symbol.iterator]() { return this.data[Symbol.iterator](); @@ -19324,7 +19242,7 @@ function proxyMap(entries) { return this.data.length; }, toJSON() { - return new Map(this.data); + return {}; }, forEach(cb) { this.data.forEach((p) => { @@ -21499,7 +21417,7 @@ var hoist_non_react_statics_cjs = __webpack_require__(1281); var pkg = { name: "@emotion/react", - version: "11.10.5", + version: "11.10.6", main: "dist/emotion-react.cjs.js", module: "dist/emotion-react.esm.js", browser: { @@ -21562,7 +21480,7 @@ var pkg = { }, dependencies: { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.10.5", + "@emotion/babel-plugin": "^11.10.6", "@emotion/cache": "^11.10.5", "@emotion/serialize": "^1.1.1", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", @@ -21571,24 +21489,19 @@ var pkg = { "hoist-non-react-statics": "^3.3.1" }, peerDependencies: { - "@babel/core": "^7.0.0", react: ">=16.8.0" }, peerDependenciesMeta: { - "@babel/core": { - optional: true - }, "@types/react": { optional: true } }, devDependencies: { - "@babel/core": "^7.18.5", "@definitelytyped/dtslint": "0.0.112", - "@emotion/css": "11.10.5", + "@emotion/css": "11.10.6", "@emotion/css-prettifier": "1.1.1", "@emotion/server": "11.10.0", - "@emotion/styled": "11.10.5", + "@emotion/styled": "11.10.6", "html-tag-names": "^1.1.2", react: "16.14.0", "svg-tag-names": "^1.1.1", diff --git a/wp-includes/js/dist/components.min.js b/wp-includes/js/dist/components.min.js index 259a610144..5b00853d8c 100644 --- a/wp-includes/js/dist/components.min.js +++ b/wp-includes/js/dist/components.min.js @@ -29,11 +29,11 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r=n(9196);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(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(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},635:function(e,t,n){"use strict";e.exports=n(7755)},9196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{AnglePickerControl:function(){return ob},Animate:function(){return Sm},Autocomplete:function(){return gb},BaseControl:function(){return Tv},BlockQuotation:function(){return i.BlockQuotation},Button:function(){return id},ButtonGroup:function(){return NC},Card:function(){return lk},CardBody:function(){return gk},CardDivider:function(){return Ek},CardFooter:function(){return Ck},CardHeader:function(){return kk},CardMedia:function(){return Sk},CheckboxControl:function(){return Tk},Circle:function(){return i.Circle},ClipboardButton:function(){return Nk},ColorIndicator:function(){return Xb},ColorPalette:function(){return J_},ColorPicker:function(){return B_},ComboboxControl:function(){return lT},CustomGradientPicker:function(){return vS},CustomSelectControl:function(){return _N},Dashicon:function(){return Xl},DatePicker:function(){return kI},DateTimePicker:function(){return XI},Disabled:function(){return oM},Draggable:function(){return aM},DropZone:function(){return lM},DropZoneProvider:function(){return cM},Dropdown:function(){return ty},DropdownMenu:function(){return PS},DuotonePicker:function(){return vM},DuotoneSwatch:function(){return fM},ExternalLink:function(){return wM},Fill:function(){return pf},Flex:function(){return Xm},FlexBlock:function(){return Hm},FlexItem:function(){return jm},FocalPointPicker:function(){return UM},FocusReturnProvider:function(){return _z},FocusableIframe:function(){return GM},FontSizePicker:function(){return HP},FormFileUpload:function(){return jP},FormToggle:function(){return WP},FormTokenField:function(){return XP},G:function(){return i.G},GradientPicker:function(){return xS},Guide:function(){return QP},GuidePage:function(){return eO},HorizontalRule:function(){return i.HorizontalRule},Icon:function(){return Zl},IconButton:function(){return tO},IsolatedEventContainer:function(){return az},KeyboardShortcuts:function(){return iO},Line:function(){return i.Line},MenuGroup:function(){return aO},MenuItem:function(){return sO},MenuItemsChoice:function(){return cO},Modal:function(){return hT},NavigableMenu:function(){return RS},Notice:function(){return _D},NoticeList:function(){return CD},Panel:function(){return SD},PanelBody:function(){return MD},PanelHeader:function(){return kD},PanelRow:function(){return PD},Path:function(){return i.Path},Placeholder:function(){return DD},Polygon:function(){return i.Polygon},Popover:function(){return If},QueryControls:function(){return UD},RadioControl:function(){return KD},RangeControl:function(){return jy},Rect:function(){return i.Rect},ResizableBox:function(){return AA},ResponsiveWrapper:function(){return LA},SVG:function(){return i.SVG},SandBox:function(){return FA},ScrollLock:function(){return cd},SearchControl:function(){return vO},SelectControl:function(){return dy},Slot:function(){return mf},SlotFillProvider:function(){return hf},Snackbar:function(){return HA},SnackbarList:function(){return $A},Spinner:function(){return XA},TabPanel:function(){return QA},TabbableContainer:function(){return uO},TextControl:function(){return tL},TextHighlight:function(){return lL},TextareaControl:function(){return sL},TimePicker:function(){return UI},Tip:function(){return uL},ToggleControl:function(){return dL},Toolbar:function(){return TL},ToolbarButton:function(){return wL},ToolbarDropdownMenu:function(){return NL},ToolbarGroup:function(){return EL},ToolbarItem:function(){return bL},Tooltip:function(){return zf},TreeSelect:function(){return BD},VisuallyHidden:function(){return nd},__experimentalAlignmentMatrixControl:function(){return Em},__experimentalApplyValueToSides:function(){return sC},__experimentalBorderBoxControl:function(){return LE},__experimentalBorderControl:function(){return bE},__experimentalBoxControl:function(){return TC},__experimentalConfirmDialog:function(){return vT},__experimentalDimensionControl:function(){return JI},__experimentalDivider:function(){return _k},__experimentalDropdownContentWrapper:function(){return G_},__experimentalElevation:function(){return PC},__experimentalGrid:function(){return xE},__experimentalHStack:function(){return Uv},__experimentalHasSplitBorders:function(){return RE},__experimentalHeading:function(){return $_},__experimentalInputControl:function(){return Iv},__experimentalInputControlPrefixWrapper:function(){return rO},__experimentalInputControlSuffixWrapper:function(){return ny},__experimentalIsDefinedBorder:function(){return NE},__experimentalIsEmptyBorder:function(){return TE},__experimentalItem:function(){return nO},__experimentalItemGroup:function(){return Uk},__experimentalNavigation:function(){return PO},__experimentalNavigationBackButton:function(){return AO},__experimentalNavigationGroup:function(){return BO},__experimentalNavigationItem:function(){return YO},__experimentalNavigationMenu:function(){return JO},__experimentalNavigatorBackButton:function(){return bD},__experimentalNavigatorButton:function(){return gD},__experimentalNavigatorProvider:function(){return uD},__experimentalNavigatorScreen:function(){return mD},__experimentalNavigatorToParentButton:function(){return yD},__experimentalNumberControl:function(){return Zv},__experimentalPaletteEdit:function(){return XS},__experimentalParseQuantityAndUnitFromRawValue:function(){return aE},__experimentalRadio:function(){return YD},__experimentalRadioGroup:function(){return qD},__experimentalScrollable:function(){return hk},__experimentalSpacer:function(){return qv},__experimentalStyleProvider:function(){return of},__experimentalSurface:function(){return ZA},__experimentalText:function(){return Rh},__experimentalToggleGroupControl:function(){return yP},__experimentalToggleGroupControlOption:function(){return LP},__experimentalToggleGroupControlOptionIcon:function(){return pL},__experimentalToolbarContext:function(){return vL},__experimentalToolsPanel:function(){return YL},__experimentalToolsPanelContext:function(){return FL},__experimentalToolsPanelItem:function(){return qL},__experimentalTreeGrid:function(){return ez},__experimentalTreeGridCell:function(){return oz},__experimentalTreeGridItem:function(){return rz},__experimentalTreeGridRow:function(){return tz},__experimentalTruncate:function(){return j_},__experimentalUnitControl:function(){return mE},__experimentalUseCustomUnits:function(){return lE},__experimentalUseNavigator:function(){return hD},__experimentalUseSlot:function(){return Fd},__experimentalUseSlotFills:function(){return sz},__experimentalVStack:function(){return H_},__experimentalView:function(){return td},__experimentalZStack:function(){return pz},__unstableAnimatePresence:function(){return Om},__unstableComposite:function(){return fm},__unstableCompositeGroup:function(){return hm},__unstableCompositeItem:function(){return Se},__unstableDisclosureContent:function(){return Nx},__unstableGetAnimateClassName:function(){return km},__unstableMotion:function(){return Gl},__unstableUseAutocompleteProps:function(){return hb},__unstableUseCompositeState:function(){return rm},__unstableUseNavigateRegions:function(){return hz},createSlotFill:function(){return gf},navigateRegions:function(){return gz},privateApis:function(){return Tz},useBaseControlProps:function(){return vb},withConstrainedTabbing:function(){return vz},withFallbackStyles:function(){return bz},withFilters:function(){return wz},withFocusOutside:function(){return iT},withFocusReturn:function(){return xz},withNotices:function(){return Ez},withSpokenMessages:function(){return qO}});var e={};n.r(e),n.d(e,{Text:function(){return mh},block:function(){return hh},destructive:function(){return vh},highlighterText:function(){return yh},muted:function(){return bh},positive:function(){return gh},upperCase:function(){return wh}});var t={};n.r(t),n.d(t,{TooltipContent:function(){return Lx},TooltipPopoverView:function(){return zx},TooltipShortcut:function(){return Fx},noOutline:function(){return Bx}});var o={};n.r(o),n.d(o,{ButtonContentView:function(){return RP},LabelView:function(){return CP},buttonView:function(){return SP},labelBlock:function(){return kP}});var i=window.wp.primitives;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var b=n(9196),y=n.n(b);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t=0||(o[n]=e[n]);return o}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var S=(0,b.createContext)({});var T,N=function(e,t,n){void 0===n&&(n=t.children);var r=(0,b.useContext)(S);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(E(t,["children"]))}return(0,b.createElement)(e,t,n)};function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function D(e,t){if(void 0===t&&(t=[]),!P(e.state))return O(e,t);var n=O(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(r,["state"]);return[M(M({},i),a),o]}function A(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i0||t.offsetHeight>0||e.getClientRects().length>0}(e)}var re=F({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=h(e,["unstable_system"]),o=t.unstable_system,i=h(t,["unstable_system"]);return!(n!==o&&!A(n,o))&&A(r,i)}}),oe=(z({as:"div",useHook:re}),ee("Mac")&&!ee("Chrome")&&(ee("Safari")||ee("Firefox")));function ie(e){!X(e)&&ne(e)&&e.focus()}function ae(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function se(e,t){return(0,b.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var le=F({name:"Tabbable",compose:re,keys:["disabled","focusable"],useOptions:function(e,t){return m({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,s=t.onKeyPressCapture,l=t.style,c=h(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),u=(0,b.useRef)(null),d=G(o),f=G(i),p=G(a),g=G(s),v=!!e.disabled&&!e.focusable,y=(0,b.useState)(!0),w=y[0],x=y[1],_=(0,b.useState)(!0),E=_[0],C=_[1],k=e.disabled?m({pointerEvents:"none"},l):l;U((function(){var e=u.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||x(!1),function(e){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)}(e)||C(!1))}),[]);var S=se(d,e.disabled),T=se(f,e.disabled),N=se(g,e.disabled),R=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e);var n=e.currentTarget;if(!e.defaultPrevented&&oe&&!Z(e)&&Q(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),ie(n)})),o=function(){cancelAnimationFrame(r),ie(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return m({ref:H(u,n),style:k,tabIndex:ae(v,w,E,r),disabled:!(!v||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:S,onMouseDownCapture:T,onMouseDown:R,onKeyPressCapture:N},c)}});z({as:"div",useHook:le});var ce=F({name:"Clickable",compose:le,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return m({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},h(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=h(t,["onKeyDown","onKeyUp"]),i=(0,b.useState)(!1),a=i[0],s=i[1],l=G(n),c=G(r),u=(0,b.useCallback)((function(t){var n;if(null===(n=l.current)||void 0===n||n.call(l,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Y(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Q(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&s(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,b.useCallback)((function(t){var n;if(null===(n=c.current)||void 0===n||n.call(c,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(s(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return m({"data-active":a||void 0,onKeyDown:u,onKeyUp:d},o)}});z({as:"button",memo:!0,useHook:ce});function ue(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function de(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=ue(e.items||[]))||void 0===n?void 0:n.id}var fe=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],pe=fe,me=pe;function he(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function ge(e,t){e.userFocus=t}function ve(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function be(e){var t=q(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function ye(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var we=(0,b.createContext)(ye);var xe=F({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,b.useContext)(we),r=(0,b.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,b.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return m(m({},e),{},{id:i})},useProps:function(e,t){return m({id:e.id},t)}});z({as:"div",useHook:xe});function _e(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=j(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function Ee(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(_e(e,t,n))}(e,"input",{bubbles:!0}))}}function Ce(e){return e.querySelector("[data-composite-item-widget]")}var ke=F({name:"CompositeItem",compose:[ce,xe],keys:me,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return ce.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=h(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,s=h(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return ce.unstable_propsAreEqual(o,s)},useOptions:function(e){return m(m({},e),{},{id:e.id,currentId:de(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,s=t.onFocus,l=t.onBlurCapture,c=t.onKeyDown,u=t.onClick,d=h(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),f=(0,b.useRef)(null),p=e.id,g=e.disabled&&!e.focusable,y=e.currentId===p,w=G(y),x=(0,b.useRef)(!1),_=function(e){return(0,b.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),E=G(a),C=G(s),k=G(l),S=G(c),T=G(u),N=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&y||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,b.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:f,disabled:!!g}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,g,e.registerItem,e.unregisterItem]),(0,b.useEffect)((function(){var t=f.current;t&&e.unstable_moves&&w.current&&he(t)}),[e.unstable_moves]);var R=(0,b.useCallback)((function(e){var t;null===(t=E.current)||void 0===t||t.call(E,e),ge(e.currentTarget,!0)}),[]),I=(0,b.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(ge(t.currentTarget,!1),null===(n=C.current)||void 0===n||n.call(C,t),!t.defaultPrevented&&!Z(t)&&p&&!function(e,t){if(Y(e))return!1;for(var n,r=v(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),o&&e.unstable_virtual&&e.baseId&&Y(t))){var i=j(t.target).getElementById(e.baseId);i&&(x.current=!0,function(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,i=void 0===o?be:o;i(e)||(e.focus({preventScroll:r}),i(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(i))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),M=(0,b.useCallback)((function(t){var n;null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||e.unstable_virtual&&x.current&&(x.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),P=(0,b.useCallback)((function(t){var n;if(Y(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==_||!_.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=S.current)||void 0===n||n.call(S,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var s=Ce(t.currentTarget);s&&ve(s)&&(s.focus(),Ee(s,""))}else if("Delete"===t.key||"Backspace"===t.key){var l=Ce(t.currentTarget);l&&ve(l)&&(t.preventDefault(),Ee(l,""))}}}),[e.orientation,_,e.up,e.next,e.down,e.previous,e.first,e.last]),O=(0,b.useCallback)((function(e){var t;if(null===(t=T.current)||void 0===t||t.call(T,e),!e.defaultPrevented){var n=Ce(e.currentTarget);n&&!X(n)&&n.focus()}}),[]);return m({ref:H(f,r),id:p,tabIndex:N?i:-1,"aria-selected":!(!e.unstable_virtual||!y)||void 0,onMouseDown:R,onFocus:I,onBlurCapture:M,onKeyDown:P,onClick:O},d)}}),Se=z({as:"button",memo:!0,useHook:ke});function Te(e){return e.split("-")[1]}function Ne(e){return"y"===e?"height":"width"}function Re(e){return e.split("-")[0]}function Ie(e){return["top","bottom"].includes(Re(e))?"x":"y"}function Me(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=Ie(t),l=Ne(s),c=r[l]/2-o[l]/2,u="x"===s;let d;switch(Re(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(Te(t)){case"start":d[s]-=c*(n&&u?-1:1);break;case"end":d[s]+=c*(n&&u?-1:1)}return d}const Pe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Me(c,r,l),f=r,p={},m=0;for(let n=0;n({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(null==n)return{};const c=Oe(r),u={x:o,y:i},d=Ie(a),f=Ne(d),p=await l.getDimensions(n),m="y"===d?"top":"left",h="y"===d?"bottom":"right",g=s.reference[f]+s.reference[d]-u[d]-s.floating[f],v=u[d]-s.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let y=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===y&&(y=s.floating[f]);const w=g/2-v/2,x=c[m],_=y-p[f]-c[h],E=y/2-p[f]/2+w,C=Be(x,E,_),k=null!=Te(a)&&E!=C&&s.reference[f]/2-(Ee.concat(t,t+"-start",t+"-end")),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function je(e){return e.replace(/left|right|bottom|top/g,(e=>He[e]))}function $e(e,t,n){void 0===n&&(n=!1);const r=Te(e),o=Ie(e),i=Ne(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=je(a)),{main:a,cross:je(a)}}const We={start:"end",end:"start"};function Ue(e){return e.replace(/start|end/g,(e=>We[e]))}const Ge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...h}=e,g=Re(r),v=Re(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(l.floating)),y=d||(v||!m?[je(a)]:function(e){const t=je(e);return[Ue(e),t,Ue(t)]}(a));d||"none"===p||y.push(...function(e,t,n,r){const o=Te(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Re(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ue)))),i}(a,m,p,b));const w=[a,...y],x=await Ae(t,h),_=[];let E=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&_.push(x[g]),u){const{main:e,cross:t}=$e(r,i,b);_.push(x[e],x[t])}if(E=[...E,{placement:r,overflows:_}],!_.every((e=>e<=0))){var C,k;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(k=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(f){case"bestFit":{var S;const e=null==(S=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const Ye=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Re(n),s=Te(n),l="x"===Ie(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function qe(e){return"x"===e?"y":"x"}const Ke=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,c={x:n,y:r},u=await Ae(t,l),d=Ie(Re(o)),f=qe(d);let p=c[d],m=c[f];if(i){const e="y"===d?"bottom":"right";p=Be(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";m=Be(m+u["y"===f?"top":"left"],m,m-u[e])}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...s}=e,l=await Ae(t,s),c=Re(n),u=Te(n),d="x"===Ie(n),{width:f,height:p}=r.floating;let m,h;"top"===c||"bottom"===c?(m=c,h=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,m="end"===u?"top":"bottom");const g=p-l[m],v=f-l[h];let b=g,y=v;if(d?y=Le(f-l.right-l.left,v):b=Le(p-l.bottom-l.top,g),!t.middlewareData.shift&&!u){const e=ze(l.left,0),t=ze(l.right,0),n=ze(l.top,0),r=ze(l.bottom,0);d?y=f-2*(0!==e||0!==t?e+t:ze(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:ze(l.top,l.bottom))}await a({...t,availableWidth:y,availableHeight:b});const w=await o.getDimensions(i.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ze(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Je(e){return Ze(e).getComputedStyle(e)}const Qe=Math.min,et=Math.max,tt=Math.round;function nt(e){const t=Je(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,a=tt(n)!==o||tt(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function rt(e){return lt(e)?(e.nodeName||"").toLowerCase():""}let ot;function it(){if(ot)return ot;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(ot=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),ot):navigator.userAgent}function at(e){return e instanceof Ze(e).HTMLElement}function st(e){return e instanceof Ze(e).Element}function lt(e){return e instanceof Ze(e).Node}function ct(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ze(e).ShadowRoot||e instanceof ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dt(e){return["table","td","th"].includes(rt(e))}function ft(e){const t=/firefox/i.test(it()),n=Je(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function pt(){return/^((?!chrome|android).)*safari/i.test(it())}function mt(e){return["html","body","#document"].includes(rt(e))}function ht(e){return st(e)?e:e.contextElement}const gt={x:1,y:1};function vt(e){const t=ht(e);if(!at(t))return gt;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=nt(t);let a=(i?tt(n.width):n.width)/r,s=(i?tt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function bt(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=ht(e);let l=gt;t&&(r?st(r)&&(l=vt(r)):l=vt(e));const c=s?Ze(s):window,u=pt()&&n;let d=(a.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/l.x,f=(a.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/l.y,p=a.width/l.x,m=a.height/l.y;if(s){const e=Ze(s),t=r&&st(r)?Ze(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=vt(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=Ze(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function yt(e){return((lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function wt(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xt(e){return bt(yt(e)).left+wt(e).scrollLeft}function _t(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||ct(e)&&e.host||yt(e);return ct(t)?t.host:t}function Et(e){const t=_t(e);return mt(t)?t.ownerDocument.body:at(t)&&ut(t)?t:Et(t)}function Ct(e,t){var n;void 0===t&&(t=[]);const r=Et(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ze(r);return o?t.concat(i,i.visualViewport||[],ut(r)?r:[]):t.concat(r,Ct(r))}function kt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ze(e),r=yt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=pt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=yt(e),n=wt(e),r=e.ownerDocument.body,o=et(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=et(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+xt(e);const s=-n.scrollTop;return"rtl"===Je(r).direction&&(a+=et(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(yt(e));else if(st(t))r=function(e,t){const n=bt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=at(e)?vt(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n={...t};if(pt()){var o,i;const t=Ze(e);n.x-=(null==(o=t.visualViewport)?void 0:o.offsetLeft)||0,n.y-=(null==(i=t.visualViewport)?void 0:i.offsetTop)||0}r=n}return De(r)}function St(e,t){return at(e)&&"fixed"!==Je(e).position?t?t(e):e.offsetParent:null}function Tt(e,t){const n=Ze(e);let r=St(e,t);for(;r&&dt(r)&&"static"===Je(r).position;)r=St(r,t);return r&&("html"===rt(r)||"body"===rt(r)&&"static"===Je(r).position&&!ft(r))?n:r||function(e){let t=_t(e);for(;at(t)&&!mt(t);){if(ft(t))return t;t=_t(t)}return null}(e)||n}function Nt(e,t,n){const r=at(t),o=yt(t),i=bt(e,!0,"fixed"===n,t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==rt(t)||ut(o))&&(a=wt(t)),at(t)){const e=bt(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=xt(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}const Rt={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Ct(e).filter((e=>st(e)&&"body"!==rt(e))),o=null;const i="fixed"===Je(e).position;let a=i?_t(e):e;for(;st(a)&&!mt(a);){const e=Je(a),t=ft(a);"fixed"===e.position?o=null:(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==a)),a=_t(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=kt(t,n,o);return e.top=et(r.top,e.top),e.right=Qe(r.right,e.right),e.bottom=Qe(r.bottom,e.bottom),e.left=et(r.left,e.left),e}),kt(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=at(n),i=yt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==rt(n)||ut(i))&&(a=wt(n)),at(n))){const e=bt(n);s=vt(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:st,getDimensions:function(e){return at(e)?nt(e):e.getBoundingClientRect()},getOffsetParent:Tt,getDocumentElement:yt,getScale:vt,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Tt,i=this.getDimensions;return{reference:Nt(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Je(e).direction};var It=window.ReactDOM;const Mt=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?Fe({element:t.current,padding:n}).fn(e):{}:t?Fe({element:t,padding:n}).fn(e):{};var r}}};var Pt="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function Ot(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 n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Ot(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ot(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Dt(e){const t=b.useRef(e);return Pt((()=>{t.current=e})),t}function At(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=b.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=b.useState(r);Ot(c,r)||u(r);const d=b.useRef(null),f=b.useRef(null),p=b.useRef(s),m=Dt(i),h=Dt(o),[g,v]=b.useState(null),[y,w]=b.useState(null),x=b.useCallback((e=>{d.current!==e&&(d.current=e,v(e))}),[]),_=b.useCallback((e=>{f.current!==e&&(f.current=e,w(e))}),[]),E=b.useCallback((()=>{if(!d.current||!f.current)return;const e={placement:t,strategy:n,middleware:c};h.current&&(e.platform=h.current),((e,t,n)=>{const r=new Map,o={platform:Rt,...n},i={...o.platform,_c:r};return Pe(e,t,{...o,platform:i})})(d.current,f.current,e).then((e=>{const t={...e,isPositioned:!0};C.current&&!Ot(p.current,t)&&(p.current=t,It.flushSync((()=>{l(t)})))}))}),[c,t,n,h]);Pt((()=>{!1===a&&p.current.isPositioned&&(p.current.isPositioned=!1,l((e=>({...e,isPositioned:!1}))))}),[a]);const C=b.useRef(!1);Pt((()=>(C.current=!0,()=>{C.current=!1})),[]),Pt((()=>{if(g&&y){if(m.current)return m.current(g,y,E);E()}}),[g,y,E,m]);const k=b.useMemo((()=>({reference:d,floating:f,setReference:x,setFloating:_})),[x,_]),S=b.useMemo((()=>({reference:g,floating:y})),[g,y]);return b.useMemo((()=>({...s,update:E,refs:k,elements:S,reference:x,floating:_})),[s,E,k,S,x,_])}const Lt="undefined"!=typeof document,zt={current:null},Bt={current:!1};function Ft(){if(Bt.current=!0,Lt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zt.current=e.matches;e.addListener(t),t()}else zt.current=!1}const Vt=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ht=(0,b.createContext)({});const jt=(0,b.createContext)(null),$t=Lt?b.useLayoutEffect:b.useEffect,Wt=(0,b.createContext)({strict:!1});function Ut(e,t,n,r){const o=(0,b.useContext)(Ht).visualElement,i=(0,b.useContext)(Wt),a=(0,b.useContext)(jt),s=(0,b.useContext)(Vt).reducedMotion,l=(0,b.useRef)();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));const c=l.current;return $t((()=>{c&&c.render()})),$t((()=>{c&&c.animationState&&c.animationState.animateChanges()})),$t((()=>()=>c&&c.notify("Unmount")),[]),c}function Gt(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Yt(e){return"string"==typeof e||Array.isArray(e)}function qt(e){return"object"==typeof e&&"function"==typeof e.start}const Kt=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Xt(e){return qt(e.animate)||Kt.some((t=>Yt(e[t])))}function Zt(e){return Boolean(Xt(e)||e.variants)}function Jt(e){const{initial:t,animate:n}=function(e,t){if(Xt(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Yt(t)?t:void 0,animate:Yt(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,b.useContext)(Ht));return(0,b.useMemo)((()=>({initial:t,animate:n})),[Qt(t),Qt(n)])}function Qt(e){return Array.isArray(e)?e.join(" "):e}const en=e=>({isEnabled:t=>e.some((e=>!!t[e]))}),tn={measureLayout:en(["layout","layoutId","drag"]),animation:en(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:en(["exit"]),drag:en(["drag","dragControls"]),focus:en(["whileFocus"]),hover:en(["whileHover","onHoverStart","onHoverEnd"]),tap:en(["whileTap","onTap","onTapStart","onTapCancel"]),pan:en(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:en(["whileInView","onViewportEnter","onViewportLeave"])};function nn(e){const t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}const rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let on=1;const an=(0,b.createContext)({});class sn extends b.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}const ln=(0,b.createContext)({}),cn=Symbol.for("motionComponentSymbol");function un({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:o,Component:i}){e&&function(e){for(const t in e)"projectionNodeConstructor"===t?tn.projectionNodeConstructor=e[t]:tn[t].Component=e[t]}(e);const a=(0,b.forwardRef)((function(a,s){const l={...(0,b.useContext)(Vt),...a,layoutId:dn(a)},{isStatic:c}=l;let u=null;const d=Jt(a),f=c?void 0:nn((()=>{if(rn.hasEverUpdated)return on++})),p=o(a,c);if(!c&&Lt){d.visualElement=Ut(i,p,l,t);const r=(0,b.useContext)(Wt).strict,o=(0,b.useContext)(ln);d.visualElement&&(u=d.visualElement.loadFeatures(l,r,e,f,n||tn.projectionNodeConstructor,o))}return b.createElement(sn,{visualElement:d.visualElement,props:l},u,b.createElement(Ht.Provider,{value:d},r(i,a,f,function(e,t,n){return(0,b.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Gt(n)&&(n.current=r))}),[t])}(p,d.visualElement,s),p,c,d.visualElement)))}));return a[cn]=i,a}function dn({layoutId:e}){const t=(0,b.useContext)(an).id;return t&&void 0!==e?t+"-"+e:e}function fn(e){function t(t,n={}){return un(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const pn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mn(e){return"string"==typeof e&&!e.includes("-")&&!!(pn.indexOf(e)>-1||/[A-Z]/.test(e))}const hn={};const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vn=new Set(gn);function bn(e,{layout:t,layoutId:n}){return vn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!hn[e]||"opacity"===e)}const yn=e=>!!(null==e?void 0:e.getVelocity),wn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xn=(e,t)=>gn.indexOf(e)-gn.indexOf(t);function _n(e){return e.startsWith("--")}const En=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Cn=(e,t,n)=>Math.min(Math.max(n,e),t),kn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Sn={...kn,transform:e=>Cn(0,1,e)},Tn={...kn,default:1},Nn=e=>Math.round(1e5*e)/1e5,Rn=/(-)?([\d]*\.?[\d])+/g,In=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mn=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Pn(e){return"string"==typeof e}const On=e=>({test:t=>Pn(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Dn=On("deg"),An=On("%"),Ln=On("px"),zn=On("vh"),Bn=On("vw"),Fn={...An,parse:e=>An.parse(e)/100,transform:e=>An.transform(100*e)},Vn={...kn,transform:Math.round},Hn={borderWidth:Ln,borderTopWidth:Ln,borderRightWidth:Ln,borderBottomWidth:Ln,borderLeftWidth:Ln,borderRadius:Ln,radius:Ln,borderTopLeftRadius:Ln,borderTopRightRadius:Ln,borderBottomRightRadius:Ln,borderBottomLeftRadius:Ln,width:Ln,maxWidth:Ln,height:Ln,maxHeight:Ln,size:Ln,top:Ln,right:Ln,bottom:Ln,left:Ln,padding:Ln,paddingTop:Ln,paddingRight:Ln,paddingBottom:Ln,paddingLeft:Ln,margin:Ln,marginTop:Ln,marginRight:Ln,marginBottom:Ln,marginLeft:Ln,rotate:Dn,rotateX:Dn,rotateY:Dn,rotateZ:Dn,scale:Tn,scaleX:Tn,scaleY:Tn,scaleZ:Tn,skew:Dn,skewX:Dn,skewY:Dn,distance:Ln,translateX:Ln,translateY:Ln,translateZ:Ln,x:Ln,y:Ln,z:Ln,perspective:Ln,transformPerspective:Ln,opacity:Sn,originX:Fn,originY:Fn,originZ:Ln,zIndex:Vn,fillOpacity:Sn,strokeOpacity:Sn,numOctaves:Vn};function jn(e,t,n,r){const{style:o,vars:i,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let c=!1,u=!1,d=!0;for(const e in t){const n=t[e];if(_n(e)){i[e]=n;continue}const r=Hn[e],f=En(n,r);if(vn.has(e)){if(c=!0,a[e]=f,s.push(e),!d)continue;n!==(r.default||0)&&(d=!1)}else e.startsWith("origin")?(u=!0,l[e]=f):o[e]=f}if(t.transform||(c||r?o.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},o,i){let a="";t.sort(xn);for(const n of t)a+=`${wn[n]||n}(${e[n]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,o?"":a):r&&o&&(a="none"),a}(e,n,d,r):o.transform&&(o.transform="none")),u){const{originX:e="50%",originY:t="50%",originZ:n=0}=l;o.transformOrigin=`${e} ${t} ${n}`}}const $n=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Wn(e,t,n){for(const r in t)yn(t[r])||bn(r,n)||(e[r]=t[r])}function Un(e,t,n){const r={};return Wn(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,b.useMemo)((()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return jn(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function Gn(e,t,n){const r={},o=Un(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}const Yn=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function qn(e){return Yn.has(e)}let Kn=e=>!qn(e);try{(Xn=require("@emotion/is-prop-valid").default)&&(Kn=e=>e.startsWith("on")?!qn(e):Xn(e))}catch(e){}var Xn;function Zn(e,t,n){return"string"==typeof e?e:Ln.transform(t+n*e)}const Jn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qn={offset:"strokeDashoffset",array:"strokeDasharray"};function er(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},c,u,d){if(jn(e,l,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Zn(t,e.x,e.width)} ${Zn(n,e.y,e.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Jn:Qn;e[i.offset]=Ln.transform(-r);const a=Ln.transform(t),s=Ln.transform(n);e[i.array]=`${a} ${s}`}(f,i,a,s,!1)}const tr=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}),nr=e=>"string"==typeof e&&"svg"===e.toLowerCase();function rr(e,t,n,r){const o=(0,b.useMemo)((()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return er(n,t,{enableHardwareAcceleration:!1},nr(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Wn(t,e.style,e),o.style={...t,...o.style}}return o}function or(e=!1){return(t,n,r,o,{latestValues:i},a)=>{const s=(mn(t)?rr:Gn)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)(Kn(o)||!0===n&&qn(o)||!t&&!qn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c={...l,...s,ref:o};return r&&(c["data-projection-id"]=r),(0,b.createElement)(t,c)}}const ir=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ar(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const sr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lr(e,t,n,r){ar(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(sr.has(n)?n:ir(n),t.attrs[n])}function cr(e){const{style:t}=e,n={};for(const r in t)(yn(t[r])||bn(r,e))&&(n[r]=t[r]);return n}function ur(e){const t=cr(e);for(const n in e)if(yn(e[n])){t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function dr(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const fr=e=>Array.isArray(e),pr=e=>fr(e)?e[e.length-1]||0:e;function mr(e){const t=yn(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const hr=e=>(t,n)=>{const r=(0,b.useContext)(Ht),o=(0,b.useContext)(jt),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:gr(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():nn(i)};function gr(e,t,n,r){const o={},i=r(e);for(const e in i)o[e]=mr(i[e]);let{initial:a,animate:s}=e;const l=Xt(e),c=Zt(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!qt(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=dr(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const vr={useVisualState:hr({scrapeMotionValuesFromProps:ur,createRenderState:tr,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}er(n,r,{enableHardwareAcceleration:!1},nr(t.tagName),e.transformTemplate),lr(t,n)}})},br={useVisualState:hr({scrapeMotionValuesFromProps:cr,createRenderState:$n})};var yr;function wr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function xr(e,t,n,r){(0,b.useEffect)((()=>{const o=e.current;if(n&&o)return wr(o,t,n,r)}),[e,t,n,r])}function _r(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Er(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"}(yr||(yr={}));const Cr={pageX:0,pageY:0};function kr(e,t="page"){const n=e.touches[0]||e.changedTouches[0]||Cr;return{x:n[t+"X"],y:n[t+"Y"]}}function Sr(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Tr(e,t="page"){return{point:Er(e)?kr(e,t):Sr(e,t)}}const Nr=(e,t=!1)=>{const n=t=>e(t,Tr(t));return t?(r=n,e=>{const t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}):n;var r},Rr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ir={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Mr(e){return Lt&&null===window.onpointerdown?e:Lt&&null===window.ontouchstart?Ir[e]:Lt&&null===window.onmousedown?Rr[e]:e}function Pr(e,t,n,r){return wr(e,Mr(t),Nr(n,"pointerdown"===t),r)}function Or(e,t,n,r){return xr(e,Mr(t),n&&Nr(n,"pointerdown"===t),r)}function Dr(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Ar=Dr("dragHorizontal"),Lr=Dr("dragVertical");function zr(e){let t=!1;if("y"===e)t=Lr();else if("x"===e)t=Ar();else{const e=Ar(),n=Lr();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Br(){const e=zr(!0);return!e||(e(),!1)}function Fr(e,t,n){return(r,o)=>{_r(r)&&!Br()&&(e.animationState&&e.animationState.setActive(yr.Hover,t),n&&n(r,o))}}const Vr=(e,t)=>!!t&&(e===t||Vr(e,t.parentElement));function Hr(e){return(0,b.useEffect)((()=>()=>e()),[])}const jr=(e,t)=>n=>t(e(n)),$r=(...e)=>e.reduce(jr);const Wr=("undefined"==typeof process||process.env,"production"),Ur=new Set;function Gr(e,t,n){e||Ur.has(t)||(console.warn(t),n&&console.warn(n),Ur.add(t))}const Yr=new WeakMap,qr=new WeakMap,Kr=e=>{const t=Yr.get(e.target);t&&t(e)},Xr=e=>{e.forEach(Kr)};function Zr(e,t,n){const r=function({root:e,...t}){const n=e||document;qr.has(n)||qr.set(n,{});const r=qr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Xr,{root:e,...t})),r[o]}(t);return Yr.set(e,n),r.observe(e),()=>{Yr.delete(e),r.unobserve(e)}}const Jr={some:0,all:1};function Qr(e,t,n,{root:r,margin:o,amount:i="some",once:a}){(0,b.useEffect)((()=>{if(!e||!n.current)return;const s={root:null==r?void 0:r.current,rootMargin:o,threshold:"number"==typeof i?i:Jr[i]};return Zr(n.current,s,(e=>{const{isIntersecting:r}=e;if(t.isInView===r)return;if(t.isInView=r,a&&!r&&t.hasEnteredView)return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(yr.InView,r);const o=n.getProps(),i=r?o.onViewportEnter:o.onViewportLeave;i&&i(e)}))}),[e,r,o,i])}function eo(e,t,n,{fallback:r=!0}){(0,b.useEffect)((()=>{e&&r&&("production"!==Wr&&Gr(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame((()=>{t.hasEnteredView=!0;const{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(yr.InView,!0)})))}),[e])}const to=e=>t=>(e(t),null),no={inView:to((function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:o={}}){const i=(0,b.useRef)({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);o.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?eo:Qr)(a,i.current,e,o)})),tap:to((function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:o}){const i=e||t||n||r,a=(0,b.useRef)(!1),s=(0,b.useRef)(null),l={passive:!(t||e||n||p)};function c(){s.current&&s.current(),s.current=null}function u(){return c(),a.current=!1,o.animationState&&o.animationState.setActive(yr.Tap,!1),!Br()}function d(t,r){u()&&(Vr(o.current,t.target)?e&&e(t,r):n&&n(t,r))}function f(e,t){u()&&n&&n(e,t)}function p(e,n){c(),a.current||(a.current=!0,s.current=$r(Pr(window,"pointerup",d,l),Pr(window,"pointercancel",f,l)),o.animationState&&o.animationState.setActive(yr.Tap,!0),t&&t(e,n))}Or(o,"pointerdown",i?p:void 0,l),Hr(c)})),focus:to((function({whileFocus:e,visualElement:t}){const{animationState:n}=t;xr(t,"focus",e?()=>{n&&n.setActive(yr.Focus,!0)}:void 0),xr(t,"blur",e?()=>{n&&n.setActive(yr.Focus,!1)}:void 0)})),hover:to((function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Or(r,"pointerenter",e||n?Fr(r,!0,e):void 0,{passive:!e}),Or(r,"pointerleave",t||n?Fr(r,!1,t):void 0,{passive:!t})}))};function ro(){const e=(0,b.useContext)(jt);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,b.useId)();(0,b.useEffect)((()=>r(o)),[]);return!t&&n?[!1,()=>n&&n(o)]:[!0]}function oo(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r/^\-?\d*\.?\d+$/.test(e),ao=e=>/^0[^.\s]+$/.test(e),so={delta:0,timestamp:0},lo=1/60*1e3,co="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),uo="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(co())),lo);let fo=!0,po=!1,mo=!1;const ho=["read","update","preRender","render","postRender"],go=ho.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;npo=!0)),e)),{}),vo=ho.reduce(((e,t)=>{const n=go[t];return e[t]=(e,t=!1,r=!1)=>(po||_o(),n.schedule(e,t,r)),e}),{}),bo=ho.reduce(((e,t)=>(e[t]=go[t].cancel,e)),{}),yo=ho.reduce(((e,t)=>(e[t]=()=>go[t].process(so),e)),{}),wo=e=>go[e].process(so),xo=e=>{po=!1,so.delta=fo?lo:Math.max(Math.min(e-so.timestamp,40),1),so.timestamp=e,mo=!0,ho.forEach(wo),mo=!1,po&&(fo=!1,uo(xo))},_o=()=>{po=!0,fo=!0,mo||uo(xo)};function Eo(e,t){-1===e.indexOf(t)&&e.push(t)}function Co(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ko{constructor(){this.subscriptions=[]}add(e){return Eo(this.subscriptions,e),()=>Co(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=so;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,vo.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>vo.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){return this.events[e]||(this.events[e]=new ko),this.events[e].add(t)}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?So(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.stopAnimation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}function No(e,t){return new To(e,t)}const Ro=(e,t)=>n=>Boolean(Pn(n)&&Mn.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Io=(e,t,n)=>r=>{if(!Pn(r))return r;const[o,i,a,s]=r.match(Rn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Mo={...kn,transform:e=>Math.round((e=>Cn(0,255,e))(e))},Po={test:Ro("rgb","red"),parse:Io("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mo.transform(e)+", "+Mo.transform(t)+", "+Mo.transform(n)+", "+Nn(Sn.transform(r))+")"};const Oo={test:Ro("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Po.transform},Do={test:Ro("hsl","hue"),parse:Io("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+An.transform(Nn(t))+", "+An.transform(Nn(n))+", "+Nn(Sn.transform(r))+")"},Ao={test:e=>Po.test(e)||Oo.test(e)||Do.test(e),parse:e=>Po.test(e)?Po.parse(e):Do.test(e)?Do.parse(e):Oo.parse(e),transform:e=>Pn(e)?e:e.hasOwnProperty("red")?Po.transform(e):Do.transform(e)},Lo="${c}",zo="${n}";function Bo(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const o=e.match(In);o&&(n=o.length,e=e.replace(In,Lo),t.push(...o.map(Ao.parse)));const i=e.match(Rn);return i&&(r=i.length,e=e.replace(Rn,zo),t.push(...i.map(kn.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function Fo(e){return Bo(e).values}function Vo(e){const{values:t,numColors:n,tokenised:r}=Bo(e),o=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e;const jo={test:function(e){var t,n;return isNaN(e)&&Pn(e)&&((null===(t=e.match(Rn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(In))||void 0===n?void 0:n.length)||0)>0},parse:Fo,createTransformer:Vo,getAnimatableNone:function(e){const t=Fo(e);return Vo(e)(t.map(Ho))}},$o=new Set(["brightness","contrast","saturate","opacity"]);function Wo(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Rn)||[];if(!r)return e;const o=n.replace(r,"");let i=$o.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Uo=/([a-z-]*)\(.*?\)/g,Go={...jo,getAnimatableNone:e=>{const t=e.match(Uo);return t?t.map(Wo).join(" "):e}},Yo={...Hn,color:Ao,backgroundColor:Ao,outlineColor:Ao,fill:Ao,stroke:Ao,borderColor:Ao,borderTopColor:Ao,borderRightColor:Ao,borderBottomColor:Ao,borderLeftColor:Ao,filter:Go,WebkitFilter:Go},qo=e=>Yo[e];function Ko(e,t){var n;let r=qo(e);return r!==Go&&(r=jo),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}const Xo=e=>t=>t.test(e),Zo=[kn,Ln,An,Dn,Bn,zn,{test:e=>"auto"===e,parse:e=>e}],Jo=e=>Zo.find(Xo(e)),Qo=[...Zo,Ao,jo],ei=e=>Qo.find(Xo(e));function ti(e,t,n){const r=e.getProps();return dr(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}function ni(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function ri(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const t in i){ni(e,t,pr(i[t]))}}function oi(e,t){if(!t)return;return(t[e]||t.default||t).from}function ii(e){return Boolean(yn(e)&&e.add)}function ai(e,t){const{MotionAppearAnimations:n}=window,r=((e,t)=>`${e}: ${t}`)(e,vn.has(t)?"transform":t),o=n&&n.get(r);return o?(vo.render((()=>{try{o.cancel(),n.delete(r)}catch(e){}})),o.currentTime||0):0}const si="data-"+ir("framerAppearId");const li=e=>1e3*e,ci=!1,ui=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,di=e=>t=>1-e(1-t),fi=e=>e*e,pi=di(fi),mi=ui(fi),hi=(e,t,n)=>-n*e+n*t+e;function gi(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}const vi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},bi=[Oo,Po,Do];function yi(e){const t=(e=>bi.find((t=>t.test(e))))(e);Boolean(t);let n=t.parse(e);return t===Do&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=gi(s,r,e+1/3),i=gi(s,r,e),a=gi(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const wi=(e,t)=>{const n=yi(e),r=yi(t),o={...n};return e=>(o.red=vi(n.red,r.red,e),o.green=vi(n.green,r.green,e),o.blue=vi(n.blue,r.blue,e),o.alpha=hi(n.alpha,r.alpha,e),Po.transform(o))};function xi(e,t){return"number"==typeof e?n=>hi(e,t,n):Ao.test(e)?wi(e,t):Ci(e,t)}const _i=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>xi(e,t[n])));return e=>{for(let t=0;t{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=xi(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Ci=(e,t)=>{const n=jo.createTransformer(t),r=Bo(e),o=Bo(t);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?$r(_i(r.values,o.values),n):n=>`${n>0?t:e}`},ki=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Si=(e,t)=>n=>hi(e,t,n);function Ti(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?Si:"string"==typeof e?Ao.test(e)?wi:Ci:Array.isArray(e)?_i:"object"==typeof e?Ei:Si}(e[0]),i=e.length-1;for(let n=0;ne[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ti(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;nl(Cn(e[0],e[i-1],t)):l}const Ri=e=>e,Ii=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Mi(e,t,n,r){if(e===t&&n===r)return Ri;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ii(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Ii(o(e),t,r)}const Pi=e=>1-Math.sin(Math.acos(e)),Oi=di(Pi),Di=ui(Oi),Ai=Mi(.33,1.53,.69,.99),Li=di(Ai),zi=ui(Li),Bi={linear:Ri,easeIn:fi,easeInOut:mi,easeOut:pi,circIn:Pi,circInOut:Di,circOut:Oi,backIn:Li,backInOut:zi,backOut:Ai,anticipate:e=>(e*=2)<1?.5*Li(e):.5*(2-Math.pow(2,-10*(e-1)))},Fi=e=>{if(Array.isArray(e)){e.length;const[t,n,r,o]=e;return Mi(t,n,r,o)}return"string"==typeof e?Bi[e]:e};function Vi({keyframes:e,ease:t=mi,times:n,duration:r=300}){e=[...e];const o=Vi[0],i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(t)?t.map(Fi):Fi(t),a={done:!1,value:o},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===Vi.length?n:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(e),r);function l(){return Ni(s,e,{ease:Array.isArray(i)?i:(t=e,n=i,t.map((()=>n||mi)).splice(0,t.length-1))});var t,n}let c=l();return{next:e=>(a.value=c(e),a.done=e>=r,a),flipTarget:()=>{e.reverse(),c=l()}}}const Hi=.001;function ji({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=Cn(.05,1,a),e=Cn(.01,10,e/1e3),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=$i(t,a),l=Math.exp(-o);return Hi-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=$i(Math.pow(t,2),a);return(-o(t)+Hi>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}function $i(e,t){return e*Math.sqrt(1-t*t)}const Wi=["duration","bounce"],Ui=["stiffness","damping","mass"];function Gi(e,t){return t.some((t=>void 0!==e[t]))}function Yi({keyframes:e,restSpeed:t=2,restDelta:n=.01,...r}){let o=e[0],i=e[e.length-1];const a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Gi(e,Ui)&&Gi(e,Wi)){const n=ji(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r);let p=qi,m=u?-u/1e3:0;const h=l/(2*Math.sqrt(s*c));function g(){const e=i-o,t=Math.sqrt(s/c)/1e3;if(void 0===n&&(n=Math.min(Math.abs(i-o)/100,.4)),h<1){const n=$i(t,h);p=r=>{const o=Math.exp(-h*t*r);return i-o*((m+h*t*e)/n*Math.sin(n*r)+e*Math.cos(n*r))}}else if(1===h)p=n=>i-Math.exp(-t*n)*(e+(m+t*e)*n);else{const n=t*Math.sqrt(h*h-1);p=r=>{const o=Math.exp(-h*t*r),a=Math.min(n*r,300);return i-o*((m+h*t*e)*Math.sinh(a)+n*e*Math.cosh(a))/n}}}return g(),{next:e=>{const r=p(e);if(f)a.done=e>=d;else{let o=m;if(0!==e)if(h<1){const t=Math.max(0,e-5);o=So(r-p(t),e-t)}else o=0;const s=Math.abs(o)<=t,l=Math.abs(i-r)<=n;a.done=s&&l}return a.value=a.done?i:r,a},flipTarget:()=>{m=-m,[o,i]=[i,o],g()}}}Yi.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const qi=e=>0;const Ki={decay:function({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a=e[0],s={done:!1,value:a};let l=n*t;const c=a+l,u=void 0===i?c:i(c);return u!==c&&(l=u-a),{next:e=>{const t=-l*Math.exp(-e/r);return s.done=!(t>o||t<-o),s.value=s.done?u:u+t,s},flipTarget:()=>{}}},keyframes:Vi,tween:Vi,spring:Yi};function Xi(e,t,n=0){return e-t-n}const Zi=e=>{const t=({delta:t})=>e(t);return{start:()=>vo.update(t,!0),stop:()=>bo.update(t)}};function Ji({duration:e,driver:t=Zi,elapsed:n=0,repeat:r=0,repeatType:o="loop",repeatDelay:i=0,keyframes:a,autoplay:s=!0,onPlay:l,onStop:c,onComplete:u,onRepeat:d,onUpdate:f,type:p="keyframes",...m}){var h,g;let v,b,y,w=0,x=e,_=!1,E=!0;const C=Ki[a.length>2?"keyframes":p],k=a[0],S=a[a.length-1];(null===(g=(h=C).needsInterpolation)||void 0===g?void 0:g.call(h,k,S))&&(y=Ni([0,100],[k,S],{clamp:!1}),a=[0,100]);const T=C({...m,duration:e,keyframes:a});function N(){w++,"reverse"===o?(E=w%2==0,n=function(e,t=0,n=0,r=!0){return r?Xi(t+-e,t,n):t-(e-t)+n}(n,x,i,E)):(n=Xi(n,x,i),"mirror"===o&&T.flipTarget()),_=!1,d&&d()}function R(e){if(E||(e=-e),n+=e,!_){const e=T.next(Math.max(0,n));b=e.value,y&&(b=y(b)),_=E?e.done:n<=0}f&&f(b),_&&(0===w&&(x=void 0!==x?x:n),w=t+n:e<=-n}(n,x,i,E)&&N():(v.stop(),u&&u()))}return s&&(l&&l(),v=t(R),v.start()),{stop:()=>{c&&c(),v.stop()},sample:e=>T.next(Math.max(0,e))}}const Qi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ea={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qi([0,.65,.55,1]),circOut:Qi([.55,0,1,.45]),backIn:Qi([.31,.01,.66,-.59]),backOut:Qi([.33,1.53,.69,.99])};function ta(e){if(e)return Array.isArray(e)?Qi(e):ea[e]}function na(e,t,{onUpdate:n,onComplete:r,...o}){let{keyframes:i,duration:a=.3,elapsed:s=0,ease:l}=o;if("spring"===o.type||!(!(c=o.ease)||Array.isArray(c)||"string"==typeof c&&ea[c])){const e=Ji(o);let t={done:!1,value:i[0]};const n=[];let r=0;for(;!t.done;)t=e.sample(r),n.push(t.value),r+=10;i=n,a=r-10,l="linear"}var c;const u=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){return e.animate({[t]:n,offset:l},{delay:r,duration:o,easing:ta(s),fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,i,{...o,delay:-s,duration:a,ease:l});return u.onfinish=()=>{e.set(i[i.length-1]),r&&r()},()=>{const{currentTime:t}=u;if(t){const n=Ji(o);e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}vo.update((()=>u.cancel()))}}function ra(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(bo.read(r),e(i-t))};return vo.read(r,!0),()=>bo.read(r)}function oa({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),()=>{});return t?ra(o,-t):o()}const ia=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),aa=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),sa=()=>({type:"keyframes",ease:"linear",duration:.3}),la={type:"keyframes",duration:.8},ca={x:ia,y:ia,z:ia,rotate:ia,rotateX:ia,rotateY:ia,rotateZ:ia,scaleX:aa,scaleY:aa,scale:aa,opacity:sa,backgroundColor:sa,color:sa,default:aa},ua=(e,{keyframes:t})=>{if(t.length>2)return la;return(ca[e]||ca.default)(t[1])},da=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!jo.test(t)||t.startsWith("url(")));function fa(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function pa(e){return"number"==typeof e?0:Ko("",e)}function ma(e,t){return e[t]||e.default||e}const ha={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ga={},va={};for(const e in ha)va[e]=()=>(void 0===ga[e]&&(ga[e]=ha[e]()),ga[e]);const ba=new Set(["opacity"]),ya=(e,t,n,r={})=>o=>{const i=ma(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=li(a);const l=function(e,t,n,r){const o=da(t,n);let i=void 0!==r.from?r.from:e.get();return"none"===i&&o&&"string"==typeof n?i=Ko(t,n):fa(i)&&"string"==typeof n?i=pa(n):!Array.isArray(n)&&fa(n)&&"string"==typeof i&&(n=pa(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(t,e,n,i),c=l[0],u=l[l.length-1],d=da(e,c),f=da(e,u);let p={keyframes:l,velocity:t.getVelocity(),...i,elapsed:s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(!d||!f||ci||!1===i.type)return oa(p);if("inertia"===i.type){const e=function({keyframes:e,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:d,onComplete:f,onStop:p}){const m=e[0];let h;function g(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r||Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p})}function y(e){b({type:"spring",stiffness:a,damping:s,restDelta:l,...e})}if(g(m))y({velocity:t,keyframes:[m,v(m)]});else{let e=o*t+m;void 0!==c&&(e=c(e));const r=v(e),a=r===n?-1:1;let s,u;const d=e=>{s=u,u=e,t=So(e-s,so.delta),(1===a&&e>r||-1===a&&enull==h?void 0:h.stop()}}(p);return()=>e.stop()}(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,...c}){return!!Object.keys(c).length})(i)||(p={...p,...ua(e,p)}),p.duration&&(p.duration=li(p.duration)),p.repeatDelay&&(p.repeatDelay=li(p.repeatDelay));const m=t.owner,h=m&&m.current;if(va.waapi()&&ba.has(e)&&!p.repeatDelay&&"mirror"!==p.repeatType&&0!==p.damping&&m&&h instanceof HTMLElement&&!m.getProps().onUpdate)return na(t,e,p);{const e=Ji(p);return()=>e.stop()}};function wa(e,t,n={}){var r;const o=ti(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>xa(e,o,n):()=>Promise.resolve(),s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(_a).forEach(((e,r)=>{a.push(wa(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}return Promise.all([a(),s(n.delay)])}function xa(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const u=[],d=o&&(null===(i=e.animationState)||void 0===i?void 0:i.getState()[o]);for(const t in l){const r=e.getValue(t),o=l[t];if(!r||void 0===o||d&&Ea(d,t))continue;let i={delay:n,elapsed:0,...a};if(e.shouldReduceMotion&&vn.has(t)&&(i={...i,type:!1,delay:0}),!r.hasAnimated){const n=e.getProps()[si];n&&(i.elapsed=ai(n,t))}let s=r.start(ya(t,r,o,i));ii(c)&&(c.add(t),s=s.then((()=>c.remove(t)))),u.push(s)}return Promise.all(u).then((()=>{s&&ri(e,s)}))}function _a(e,t){return e.sortNodePosition(t)}function Ea({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}const Ca=[yr.Animate,yr.InView,yr.Focus,yr.Hover,yr.Tap,yr.Drag,yr.Exit],ka=[...Ca].reverse(),Sa=Ca.length;function Ta(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>wa(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=wa(e,t,n);else{const o="function"==typeof t?ti(e,t,n.custom):t;r=xa(e,o,n)}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function Na(e){let t=Ta(e);const n={[yr.Animate]:Ia(!0),[yr.InView]:Ia(),[yr.Hover]:Ia(),[yr.Tap]:Ia(),[yr.Drag]:Ia(),[yr.Focus]:Ia(),[yr.Exit]:Ia()};let r=!0;const o=(t,n)=>{const r=ti(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;tf&&g;const x=Array.isArray(h)?h:[h];let _=x.reduce(o,{});!1===v&&(_={});const{prevResolvedValues:E={}}=m,C={...E,..._},k=e=>{w=!0,u.delete(e),m.needsAnimating[e]=!0};for(const e in C){const t=_[e],n=E[e];d.hasOwnProperty(e)||(t!==n?fr(t)&&fr(n)?!oo(t,n)||y?k(e):m.protectedKeys[e]=!0:void 0!==t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):m.protectedKeys[e]=!0)}m.prevProp=h,m.prevResolvedValues=_,m.isActive&&(d={...d,..._}),r&&e.blockInitialAnimation&&(w=!1),w&&!b&&c.push(...x.map((e=>({animation:e,options:{type:p,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let p=Boolean(c.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Ra(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!oo(t,e)}function Ia(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const Ma={animation:to((({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Na(e)),qt(t)&&(0,b.useEffect)((()=>t.subscribe(e)),[t])})),exit:to((e=>{const{custom:t,visualElement:n}=e,[r,o]=ro(),i=(0,b.useContext)(jt);(0,b.useEffect)((()=>{n.isPresent=r;const e=n.animationState&&n.animationState.setActive(yr.Exit,!r,{custom:i&&i.custom||t});e&&!r&&e.then(o)}),[r])}))},Pa=(e,t)=>Math.abs(e-t);class Oa{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=La(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Pa(e.x,t.x),r=Pa(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=so;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Da(t,this.transformPagePoint),_r(e)&&0===e.buttons?this.handlePointerUp(e,t):vo.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r}=this.handlers,o=La(Da(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},Er(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;const r=Da(Tr(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=so;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,La(r,this.history)),this.removeListeners=$r(Pr(window,"pointermove",this.handlePointerMove),Pr(window,"pointerup",this.handlePointerUp),Pr(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bo.update(this.updatePoint)}}function Da(e,t){return t?{point:t(e.point)}:e}function Aa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function La({point:e},t){return{point:e,delta:Aa(e,Ba(t)),offset:Aa(e,za(t)),velocity:Fa(t,.1)}}function za(e){return e[0]}function Ba(e){return e[e.length-1]}function Fa(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ba(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>li(t)));)n--;if(!r)return{x:0,y:0};const i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Va(e){return e.max-e.min}function Ha(e,t=0,n=.01){return Math.abs(e-t)<=n}function ja(e,t,n,r=.5){e.origin=r,e.originPoint=hi(t.min,t.max,e.origin),e.scale=Va(n)/Va(t),(Ha(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=hi(n.min,n.max,e.origin)-e.originPoint,(Ha(e.translate)||isNaN(e.translate))&&(e.translate=0)}function $a(e,t,n,r){ja(e.x,t.x,n.x,null==r?void 0:r.originX),ja(e.y,t.y,n.y,null==r?void 0:r.originY)}function Wa(e,t,n){e.min=n.min+t.min,e.max=e.min+Va(t)}function Ua(e,t,n){e.min=t.min-n.min,e.max=e.min+Va(t)}function Ga(e,t,n){Ua(e.x,t.x,n.x),Ua(e.y,t.y,n.y)}function Ya(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function qa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min1.0000000000001||e<.999999999999?e:1}function us(e,t){e.min=e.min+t,e.max=e.max+t}function ds(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=hi(e.min,e.max,i);ss(e,t[n],t[r],a,t.scale)}const fs=["x","scaleX","originX"],ps=["y","scaleY","originY"];function ms(e,t){ds(e.x,t,fs),ds(e.y,t,ps)}function hs(e,t){return Qa(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gs=new WeakMap;class vs{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new Oa(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(Tr(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();(!r||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zr(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ja((e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(An.test(r)){const o=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.layoutBox[e];if(o){r=Va(o)*(parseFloat(r)/100)}}this.originPoint[e]=r})),null==i||i(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(yr.Drag,!0))},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==i||i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();null==o||o(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(yr.Drag,!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!bs(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?hi(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&Gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ya(e.x,n,o),y:Ya(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ka){return!1===e?e=0:!0===e&&(e=Ka),{x:Xa(e,"left","right"),y:Xa(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ja((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gt(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=hs(e,n),{scroll:o}=t;return o&&(us(r.x,o.offset.x),us(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:qa(e.x,t.x),y:qa(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Qa(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Ja((a=>{if(!bs(a,t,this.currentDirection))return;let l=(null==s?void 0:s[a])||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(ya(e,n,0,t))}stopAnimation(){Ja((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){var t;const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps()[n];return r||this.visualElement.getValue(e,(null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])||0)}snapToCursor(e){Ja((t=>{const{drag:n}=this.getProps();if(!bs(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-hi(n,i,.5))}}))}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Gt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ja((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();o[e]=function(e,t){let n=.5;const r=Va(e),o=Va(t);return o>r?n=ki(t.min,t.max-r,e.min):r>o&&(n=ki(e.min,e.max-o,t.min)),Cn(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ja((e=>{if(!bs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:i}=this.constraints[e];n.set(hi(r,i,o[e]))}))}addListeners(){var e;if(!this.visualElement.current)return;gs.set(this.visualElement,this);const t=Pr(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),n=()=>{const{dragConstraints:e}=this.getProps();Gt(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",n);r&&!r.layout&&(null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout()),n();const i=wr(window,"resize",(()=>this.scalePositionWithinConstraints())),a=r.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ja((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),t(),o(),null==a||a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Ka,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function bs(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ys={pan:to((function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:o}){const i=e||t||n||r,a=(0,b.useRef)(null),{transformPagePoint:s}=(0,b.useContext)(Vt),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{a.current=null,n&&n(e,t)}};(0,b.useEffect)((()=>{null!==a.current&&a.current.updateHandlers(l)})),Or(o,"pointerdown",i&&function(e){a.current=new Oa(e,l,{transformPagePoint:s})}),Hr((()=>a.current&&a.current.end()))})),drag:to((function(e){const{dragControls:t,visualElement:n}=e,r=nn((()=>new vs(n)));(0,b.useEffect)((()=>t&&t.subscribe(r)),[r,t]),(0,b.useEffect)((()=>r.addListeners()),[r])}))};function ws(e){return"string"==typeof e&&e.startsWith("var(--")}const xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function _s(e,t,n=1){const[r,o]=function(e){const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():ws(o)?_s(o,t,n+1):o}const Es=new Set(["width","height","top","left","right","bottom","x","y"]),Cs=e=>Es.has(e),ks=(e,t)=>{e.set(t,!1),e.set(t)},Ss=e=>e===kn||e===Ln;var Ts;!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Ts||(Ts={}));const Ns=(e,t)=>parseFloat(e.split(", ")[t]),Rs=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Ns(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Ns(t[1],e):0}},Is=new Set(["x","y","z"]),Ms=gn.filter((e=>!Is.has(e)));const Ps={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Rs(4,13),y:Rs(5,14)},Os=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Cs);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Jo(c);const d=t[o];let f;if(fr(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Jo(c);for(let n=t;n{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],ks(l,d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=Ps[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);ks(r,s[n]),e[n]=Ps[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),Lt&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function Ds(e,t,n,r){return(e=>Object.keys(e).some(Cs))(t)?Os(e,t,n,r):{target:t,transitionEnd:r}}const As=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!ws(t))return;const n=_s(t,r);n&&e.set(n)}));for(const e in t){const o=t[e];if(!ws(o))continue;const i=_s(o,r);i&&(t[e]=i,n&&void 0===n[e]&&(n[e]=o))}return{target:t,transitionEnd:n}}(e,t,r);return Ds(e,t=o.target,n,r=o.transitionEnd)};const Ls=Object.keys(tn),zs=Ls.length,Bs=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Fs=["initial",...Ca],Vs=Fs.length;class Hs extends class{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>vo.render(this.render,!1,!0);const{latestValues:i,renderState:a}=r;this.latestValues=i,this.baseTarget={...i},this.initialValues=t.initial?{...i}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=Xt(t),this.isVariantNode=Zt(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(const e in l){const t=l[e];void 0!==i[e]&&yn(t)&&(t.set(i[e],!1),ii(s)&&s.add(e))}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Bt.current||Ft(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||zt.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;null===(e=this.projection)||void 0===e||e.unmount(),bo.update(this.notifyUpdate),bo.render(this.render),this.valueSubscriptions.forEach((e=>e())),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const e in this.events)this.events[e].clear();this.current=null}bindToMotionValue(e,t){const n=vn.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&vo.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r,o,i){const a=[];for(let t=0;tthis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;tn.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=No(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=dr(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||yn(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new ko),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){var r;const o={};for(const i in e){const e=oi(i,t);o[i]=void 0!==e?e:null===(r=n.getValue(i))||void 0===r?void 0:r.get()}return o}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;smn(e)?new $s(t,{enableHardwareAcceleration:!1}):new js(t,{enableHardwareAcceleration:!0});function Us(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gs={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ln.test(e))return e;e=parseFloat(e)}return`${Us(e,t.target.x)}% ${Us(e,t.target.y)}%`}},Ys="_$css",qs={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(xs,(e=>(i.push(e),Ys))));const a=jo.parse(e);if(a.length>5)return r;const s=jo.createTransformer(e),l="number"!=typeof a[0]?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;a[0+l]/=c,a[1+l]/=u;const d=hi(c,u,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(o){let e=0;f=f.replace(Ys,(()=>{const t=i[e];return e++,t}))}return f}};class Ks extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Xs,Object.assign(hn,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),rn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||vo.postRender((()=>{var e;(null===(e=i.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;null==e||e()}render(){return null}}const Xs={borderRadius:{...Gs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gs,borderTopRightRadius:Gs,borderBottomLeftRadius:Gs,borderBottomRightRadius:Gs,boxShadow:qs},Zs={measureLayout:function(e){const[t,n]=ro(),r=(0,b.useContext)(an);return b.createElement(Ks,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(ln),isPresent:t,safeToRemove:n})}};const Js=["TopLeft","TopRight","BottomLeft","BottomRight"],Qs=Js.length,el=e=>"string"==typeof e?parseFloat(e):e,tl=e=>"number"==typeof e||Ln.test(e);function nl(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const rl=il(0,.5,Oi),ol=il(.5,.95,Ri);function il(e,t,n){return r=>rt?1:n(ki(e,t,r))}function al(e,t){e.min=t.min,e.max=t.max}function sl(e,t){al(e.x,t.x),al(e.y,t.y)}function ll(e,t,n,r,o){return e=is(e-=t,1/n,r),void 0!==o&&(e=is(e,1/o,r)),e}function cl(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){An.test(t)&&(t=parseFloat(t),t=hi(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=hi(i.min,i.max,r);e===i&&(s-=t),e.min=ll(e.min,t,n,s,o),e.max=ll(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ul=["x","scaleX","originX"],dl=["y","scaleY","originY"];function fl(e,t,n,r){cl(e.x,t,ul,null==n?void 0:n.x,null==r?void 0:r.x),cl(e.y,t,dl,null==n?void 0:n.y,null==r?void 0:r.y)}function pl(e){return 0===e.translate&&1===e.scale}function ml(e){return pl(e.x)&&pl(e.y)}function hl(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function gl(e){return Va(e.x)/Va(e.y)}class vl{constructor(){this.members=[]}add(e){Eo(this.members,e),e.scheduleRender()}remove(e){if(Co(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;!1===o&&r.hide()}}exitAnimationComplete(){this.members.forEach((e=>{var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bl(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const yl=(e,t)=>e.depth-t.depth;class wl{constructor(){this.children=[],this.isDirty=!1}add(e){Eo(this.children,e),this.isDirty=!0}remove(e){Co(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yl),this.isDirty=!1,this.children.forEach(e)}}const xl=["","X","Y","Z"];let _l=0;function El({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=_l++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Sl),this.nodes.forEach(Ml),this.nodes.forEach(Pl)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=ra(r,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(Il))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var o,i,s,l,c;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const u=null!==(i=null!==(o=this.options.transition)&&void 0!==o?o:a.getDefaultTransition())&&void 0!==i?i:Bl,{onLayoutAnimationStart:d,onLayoutAnimationComplete:f}=a.getProps(),p=!this.targetLayout||!hl(this.targetLayout,r)||n,m=!t&&n;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||m||t&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,m);const t={...ma(u,"layout"),onPlay:d,onComplete:f};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||Il(this),this.isLead()&&(null===(c=(l=this.options).onExitComplete)||void 0===c||c.call(l));this.targetLayout=r}))}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,bo.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(Ol),this.animationId++)}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked())return void(null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{var n;const r=t/1e3;Al(s.x,e.x,r),Al(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Ga(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Ll(e.x,t.x,n.x,r),Ll(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,l,r)),c&&(this.animationValues=a,function(e,t,n,r,o,i){o?(e.opacity=hi(0,void 0!==n.opacity?n.opacity:1,rl(r)),e.opacityExit=hi(void 0!==t.opacity?t.opacity:1,0,ol(r))):i&&(e.opacity=hi(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o{rn.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){const r=yn(e)?e:No(e);return r.start(ya("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,1e3,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Hl(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Va(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Va(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sl(t,n),ms(t,o),$a(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){var n,r,o;this.sharedNodes.has(e)||this.sharedNodes.set(e,new vl);this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,t)})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Nl),this.root.sharedNodes.clear()}}}function Cl(e){e.updateLayout()}function kl(e){var t,n,r;const o=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:r}=e.options,i=o.source!==e.layout.source;"size"===r?Ja((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=Va(n);n.min=t[e].min,n.max=n.min+r})):Hl(r,o.layoutBox,t)&&Ja((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=Va(t[e]);n.max=n.min+r}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};$a(a,t,o.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?$a(s,e.applyTransform(n,!0),o.measuredBox):$a(s,t,o.layoutBox);const l=!ml(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:e,layout:r}=n;if(e&&r){const n={x:{min:0,max:0},y:{min:0,max:0}};Ga(n,o.layoutBox,e.layoutBox);const i={x:{min:0,max:0},y:{min:0,max:0}};Ga(i,t,r.layoutBox),hl(n,i)||(c=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:o,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function Sl(e){e.isProjectionDirty||(e.isProjectionDirty=Boolean(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=Boolean(e.parent&&e.parent.isTransformDirty))}function Tl(e){e.clearSnapshot()}function Nl(e){e.clearMeasurements()}function Rl(e){const{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Il(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Ml(e){e.resolveTargetDelta()}function Pl(e){e.calcProjection()}function Ol(e){e.resetRotation()}function Dl(e){e.removeLeadSnapshot()}function Al(e,t,n){e.translate=hi(t.translate,0,n),e.scale=hi(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ll(e,t,n,r){e.min=hi(t.min,n.min,r),e.max=hi(t.max,n.max,r)}function zl(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Bl={duration:.45,ease:[.4,0,.1,1]};function Fl(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(Boolean(e.path[t].instance)){n=e.path[t];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function Vl(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Hl(e,t,n){return"position"===e||"preserve-aspect"===e&&!Ha(gl(t),gl(n),.2)}const jl=El({attachResizeListener:(e,t)=>wr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$l={current:void 0},Wl=El({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$l.current){const e=new jl(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),$l.current=e}return $l.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ul={...Ma,...no,...ys,...Zs},Gl=fn(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r,o){return{...mn(e)?vr:br,preloadedFeatures:n,useRender:or(t),createVisualElement:r,projectionNodeConstructor:o,Component:e}}(e,t,Ul,Ws,Wl)));var Yl=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),ql=window.wp.deprecated,Kl=n.n(ql);var Xl=function(e){let{icon:t,className:n,size:r=20,style:o={},...i}=e;const l=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" "),c={...20!=r?{fontSize:`${r}px`,width:`${r}px`,height:`${r}px`}:{},...o};return(0,s.createElement)("span",a({className:l,style:c},i))};var Zl=function(e){let{icon:t=null,size:n=("string"==typeof t?20:24),...r}=e;if("string"==typeof t)return(0,s.createElement)(Xl,a({icon:t,size:n},r));if((0,s.isValidElement)(t)&&Xl===t.type)return(0,s.cloneElement)(t,{...r});if("function"==typeof t)return t.prototype instanceof s.Component?(0,s.createElement)(t,{size:n,...r}):t({size:n,...r});if(t&&("svg"===t.type||t.type===i.SVG)){const e={...t.props,width:n,height:n,...r};return(0,s.createElement)(i.SVG,e)}return(0,s.isValidElement)(t)?(0,s.cloneElement)(t,{size:n,...r}):t},Jl=(window.wp.warning,n(5619)),Ql=n.n(Jl),ec=window.lodash;var tc=function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)};const nc=(0,s.createContext)({}),rc=()=>(0,s.useContext)(nc);const oc=(0,s.memo)((e=>{let{children:t,value:n}=e;const r=function(e){let{value:t}=e;const n=rc(),r=(0,s.useRef)(t);return tc((()=>{Ql()(r.current,t)&&r.current!==t&&"undefined"!=typeof process&&process.env}),[t]),(0,s.useMemo)((()=>(0,ec.merge)(JSON.parse(JSON.stringify(n)),t)),[n,t])}({value:n});return(0,s.createElement)(nc.Provider,{value:r},t)})),ic="__contextSystemKey__";var ac=n(9756),sc=n.n(ac);const lc=sc()((function(e){return`components-${(0,ec.kebabCase)(e)}`}));var cc=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;t0?gc(Sc,--Cc):0,_c--,10===kc&&(_c=1,xc--),kc}function Ic(){return kc=Cc2||Dc(kc)>3?"":" "}function Fc(e,t){for(;--t&&Ic()&&!(kc<48||kc>102||kc>57&&kc<65||kc>70&&kc<97););return Oc(e,Pc()+(t<6&&32==Mc()&&32==Ic()))}function Vc(e){for(;Ic();)switch(kc){case e:return Cc;case 34:case 39:34!==e&&39!==e&&Vc(kc);break;case 40:41===e&&Vc(e);break;case 92:Ic()}return Cc}function Hc(e,t){for(;Ic()&&e+kc!==57&&(e+kc!==84||47!==Mc()););return"/*"+Oc(t,Cc-1)+"*"+dc(47===e?e:Ic())}function jc(e){for(;!Dc(Mc());)Ic();return Oc(e,Cc)}var $c="-ms-",Wc="-moz-",Uc="-webkit-",Gc="comm",Yc="rule",qc="decl",Kc="@keyframes";function Xc(e,t){for(var n="",r=yc(e),o=0;o0&&bc(E)-d&&wc(p>32?nu(E+";",r,n,d-1):nu(mc(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(wc(_=eu(E,t,n,c,u,o,s,y,w=[],x=[],d),i),123===b)if(0===u)Qc(E,t,_,_,w,i,d,s,x);else switch(99===f&&110===gc(E,3)?100:f){case 100:case 109:case 115:Qc(e,_,_,r&&wc(eu(e,_,_,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Qc(E,_,_,_,[""],x,0,s,x)}}c=u=p=0,h=v=1,y=E="",d=a;break;case 58:d=1+bc(E),p=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==Rc())continue;switch(E+=dc(b),b*h){case 38:v=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(bc(E)-1)*v,v=1;break;case 64:45===Mc()&&(E+=zc(Ic())),f=Mc(),u=d=bc(y=E+=jc(Pc())),b++;break;case 45:45===m&&2==bc(E)&&(h=0)}}return i}function eu(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=yc(f),m=0,h=0,g=0;m0?f[v]+" "+b:mc(b,/&\f/g,f[v])))&&(l[g++]=y);return Tc(e,t,n,0===o?Yc:s,l,c,u)}function tu(e,t,n){return Tc(e,t,n,Gc,dc(kc),vc(e,2,-2),0)}function nu(e,t,n,r){return Tc(e,t,n,qc,vc(e,0,r),vc(e,r+1,-1),r)}var ru=function(e,t,n){for(var r=0,o=0;r=o,o=Mc(),38===r&&12===o&&(t[n]=1),!Dc(o);)Ic();return Oc(e,Cc)},ou=function(e,t){return Lc(function(e,t){var n=-1,r=44;do{switch(Dc(r)){case 0:38===r&&12===Mc()&&(t[n]=1),e[n]+=ru(Cc-1,t,n);break;case 2:e[n]+=zc(r);break;case 4:if(44===r){e[++n]=58===Mc()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=dc(r)}}while(r=Ic());return e}(Ac(e),t))},iu=new WeakMap,au=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=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)||iu.get(n))&&!r){iu.set(e,!0);for(var o=[],i=ou(t,o),a=n.props,s=0,l=0;s6)switch(gc(e,t+1)){case 109:if(45!==gc(e,t+4))break;case 102:return mc(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==gc(e,t+3)?"$3":"$2-$3"))+e;case 115:return~hc(e,"stretch")?lu(mc(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==gc(e,t+1))break;case 6444:switch(gc(e,bc(e)-3-(~hc(e,"!important")&&10))){case 107:return mc(e,":",":-webkit-")+e;case 101:return mc(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===gc(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(gc(e,t+11)){case 114:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Uc+e+$c+e+e}return e}var cu=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case qc:e.return=lu(e.value,e.length);break;case Kc:return Xc([Nc(e,{value:mc(e.value,"@","@-webkit-")})],r);case Yc: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 Xc([Nc(e,{props:[mc(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Xc([Nc(e,{props:[mc(t,/:(plac\w+)/,":-webkit-input-$1")]}),Nc(e,{props:[mc(t,/:(plac\w+)/,":-moz-$1")]}),Nc(e,{props:[mc(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],uu=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 r=e.stylisPlugins||cu;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},fu={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 pu=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},mu=/[A-Z]|^ms/g,hu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gu=function(e){return 45===e.charCodeAt(1)},vu=function(e){return null!=e&&"boolean"!=typeof e},bu=pu((function(e){return gu(e)?e:e.replace(mu,"-$&").toLowerCase()})),yu=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(hu,(function(e,t,n){return xu={name:t,styles:n,next:xu},t}))}return 1===fu[e]||gu(e)||"number"!=typeof t||0===t?t:t+"px"};function wu(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 xu={name:n.name,styles:n.styles,next:xu},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)xu={name:r.name,styles:r.styles,next:xu},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;onull!=e&&["name","styles"].every((t=>void 0!==e[t])),Vu=()=>{const e=(0,b.useContext)(Su),t=(0,s.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,n=new Array(t),r=0;rFu(t)?(Pu(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Hu(e,t){const n=rc();void 0===t&&"undefined"!=typeof process&&process.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,c=Vu()(lc(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return void 0!==u&&(o.children=u),o.className=c,o}function ju(e,t){return $u(e,t,{forwardsRef:!0})}function $u(e,t,n){const r=null!=n&&n.forwardsRef?(0,s.forwardRef)(e):e;void 0===t&&"undefined"!=typeof process&&process.env;let o=r.__contextSystemKey__||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[ic]:[...new Set(o)],displayName:t,selector:`.${lc(t)}`})}function Wu(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}function Uu(e,t){return!!e&&("string"==typeof t?Wu(e).includes(t):!!Array.isArray(t)&&t.some((t=>Wu(e).includes(t))))}const Gu={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Yu=/^((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)-.*))$/,qu=pu((function(e){return Yu.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ku=function(e){return"theme"!==e},Xu=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?qu:Ku},Zu=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Ju=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Mu(t,n,r);ku((function(){return Pu(t,n,r)}));return null},Qu=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Zu(t,n,i),c=l||Xu(s),u=!c("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,m=1;m{e&&(e.stopPropagation(),e.preventDefault())}}const z=!O&&(v&&w||y||!!w&&!(null!=x&&x.length)&&!1!==v),B=k?I:void 0,F=R["aria-describedby"]||B,V={className:P,"aria-label":R["aria-label"]||w,"aria-describedby":F,ref:t},H=(0,s.createElement)(s.Fragment,null,m&&"left"===h&&(0,s.createElement)(Zl,{icon:m,size:g}),_&&(0,s.createElement)(s.Fragment,null,_),m&&"right"===h&&(0,s.createElement)(Zl,{icon:m,size:g}),x),j="a"===D?(0,s.createElement)("a",a({},L,R,V),H):(0,s.createElement)("button",a({},A,R,V),H);return z?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(zf,{text:null!=x&&x.length&&k?k:w,shortcut:y,position:b},j),k&&(0,s.createElement)(nd,null,(0,s.createElement)("span",{id:B},k))):(0,s.createElement)(s.Fragment,null,j,k&&(0,s.createElement)(nd,null,(0,s.createElement)("span",{id:B},k)))}));var id=od;let ad=0;function sd(e){const t=document.scrollingElement||document.body;e&&(ad=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=ad)}let ld=0;var cd=function(){return(0,s.useEffect)((()=>(0===ld&&sd(!0),++ld,()=>{1===ld&&sd(!1),--ld})),[]),null};const ud=Symbol(),dd=Symbol(),fd="w";let pd=(e,t)=>new Proxy(e,t);const md=Object.getPrototypeOf,hd=new WeakMap,gd=e=>e&&(hd.has(e)?hd.get(e):md(e)===Object.prototype||md(e)===Array.prototype),vd=e=>"object"==typeof e&&null!==e,bd=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach((e=>{e.configurable=!0})),Object.create(md(e),t)},yd=e=>e[dd]||e,wd=(e,t,n,r)=>{if(!gd(e))return e;let o=r&&r.get(e);if(!o){const t=yd(e);o=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.configurable&&!e.writable)))(t)?[t,bd(t)]:[t],null==r||r.set(e,o)}const[i,a]=o;let s=n&&n.get(i);return s&&s[1].f===!!a||(s=((e,t)=>{const n={f:t};let r=!1;const o=(t,o)=>{if(!r){let r=n.a.get(e);if(r||(r={},n.a.set(e,r)),t===fd)r.w=!0;else{let e=r[t];e||(e=new Set,r[t]=e),e.add(o)}}},i={get:(t,r)=>r===dd?e:(o("k",r),wd(Reflect.get(t,r),n.a,n.c)),has:(t,i)=>i===ud?(r=!0,n.a.delete(e),!0):(o("h",i),Reflect.has(t,i)),getOwnPropertyDescriptor:(e,t)=>(o("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(o(fd),Reflect.ownKeys(e))};return t&&(i.set=i.deleteProperty=()=>!1),[i,n]})(i,!!a),s[1].p=pd(a||i,s[0]),n&&n.set(i,s)),s[1].a=t,s[1].c=n,s[1].p},xd=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!vd(e)||!vd(t))return!0;const o=n.get(yd(e));if(!o)return!0;if(r){const n=r.get(e);if(n&&n.n===t)return n.g;r.set(e,{n:t,g:!1})}let i=null;try{for(const n of o.h||[])if(i=Reflect.has(e,n)!==Reflect.has(t,n),i)return i;if(!0===o.w){if(i=((e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some(((e,t)=>e!==r[t]))})(e,t),i)return i}else for(const n of o.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,n)!=!!Reflect.getOwnPropertyDescriptor(t,n),i)return i;for(const a of o.k||[])if(i=xd(e[a],t[a],n,r),i)return i;return null===i&&(i=!0),i}finally{r&&r.set(e,{n:t,g:i})}},_d=(e,t=!0)=>{hd.set(e,t)};var Ed=n(635);const Cd=e=>"object"==typeof e&&null!==e,kd=new WeakMap,Sd=new WeakSet,Td=(e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>Cd(e)&&!Sd.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),o=new WeakMap,i=((e,t,n=r)=>{const a=o.get(e);if((null==a?void 0:a[0])===t)return a[1];const s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return _d(s,!0),o.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;const r=Reflect.get(e,t),o={value:r,enumerable:!0,configurable:!0};if(Sd.has(r))_d(r,!1);else if(r instanceof Promise)delete o.value,o.get=()=>n(r);else if(kd.has(r)){const[e,t]=kd.get(r);o.value=i(e,t(),n)}Object.defineProperty(s,t,o)})),s}),a=new WeakMap,s=[1,1],l=(r=>{if(!Cd(r))throw new Error("object required");const o=a.get(r);if(o)return o;let c=s[0];const u=new Set,d=(e,t=++s[0])=>{c!==t&&(c=t,u.forEach((n=>n(e,t))))};let f=s[1];const p=e=>(t,n)=>{const r=[...t];r[1]=[e,...r[1]],d(r,n)},m=new Map,h=e=>{var t;const n=m.get(e);n&&(m.delete(e),null==(t=n[1])||t.call(n))},g=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),v={deleteProperty(e,t){const n=Reflect.get(e,t);h(t);const r=Reflect.deleteProperty(e,t);return r&&d(["delete",[t],n]),r},set(t,r,o,i){const s=Reflect.has(t,r),c=Reflect.get(t,r,i);if(s&&(e(c,o)||a.has(o)&&e(c,a.get(o))))return!0;h(r),Cd(o)&&(o=(e=>gd(e)&&e[dd]||null)(o)||o);let f=o;if(o instanceof Promise)o.then((e=>{o.status="fulfilled",o.value=e,d(["resolve",[r],e])})).catch((e=>{o.status="rejected",o.reason=e,d(["reject",[r],e])}));else{!kd.has(o)&&n(o)&&(f=l(o));const e=!Sd.has(f)&&kd.get(f);e&&((e,t)=>{if(m.has(e))throw new Error("prop listener already exists");if(u.size){const n=t[3](p(e));m.set(e,[t,n])}else m.set(e,[t])})(r,e)}return Reflect.set(t,r,f,i),d(["set",[r],o,c]),!0}},b=t(g,v);a.set(r,b);const y=[g,(e=++s[1])=>(f===e||u.size||(f=e,m.forEach((([t])=>{const n=t[1](e);n>c&&(c=n)}))),c),i,e=>{u.add(e),1===u.size&&m.forEach((([e,t],n)=>{if("production"!==(null==void 0?void 0:undefined.MODE)&&t)throw new Error("remove already exists");const r=e[3](p(n));m.set(n,[e,r])}));return()=>{u.delete(e),0===u.size&&m.forEach((([e,t],n)=>{t&&(t(),m.set(n,[e]))}))}}];return kd.set(b,y),Reflect.ownKeys(r).forEach((e=>{const t=Object.getOwnPropertyDescriptor(r,e),n="value"in t;delete t.value,Object.defineProperty(g,e,t),n&&(b[e]=r[e])})),b}))=>[l,kd,Sd,e,t,n,r,o,i,a,s],[Nd]=Td();function Rd(e,t,n){const r=kd.get(e);let o;"production"===(null==void 0?void 0:undefined.MODE)||r||console.warn("Please use proxy object");const i=[],a=r[3];let s=!1;const l=a((e=>{i.push(e),n?t(i.splice(0)):o||(o=Promise.resolve().then((()=>{o=void 0,s&&t(i.splice(0))})))}));return s=!0,()=>{s=!1,l()}}function Id(e,t){const n=kd.get(e);"production"===(null==void 0?void 0:undefined.MODE)||n||console.warn("Please use proxy object");const[r,o,i]=n;return i(r,o(),t)}function Md(e){return Sd.add(e),e}const{use:Pd}=b,{useSyncExternalStore:Od}=Ed,Dd=(e,t)=>{const n=(0,b.useRef)();(0,b.useEffect)((()=>{n.current=((e,t,n)=>{const r=[],o=new WeakSet,i=(e,a)=>{if(o.has(e))return;vd(e)&&o.add(e);const s=vd(e)&&t.get(yd(e));if(s){var l,c;if(null==(l=s.h)||l.forEach((e=>{const t=`:has(${String(e)})`;r.push(a?[...a,t]:[t])})),!0===s.w){const e=":ownKeys";r.push(a?[...a,e]:[e])}else{var u;null==(u=s.o)||u.forEach((e=>{const t=`:hasOwn(${String(e)})`;r.push(a?[...a,t]:[t])}))}null==(c=s.k)||c.forEach((t=>{n&&!("value"in(Object.getOwnPropertyDescriptor(e,t)||{}))||i(e[t],a?[...a,t]:[t])}))}else a&&r.push(a)};return i(e),r})(e,t,!0)})),(0,b.useDebugValue)(n.current)},Ad=new WeakMap;function Ld(e,t){const n=null==t?void 0:t.sync,r=(0,b.useRef)(),o=(0,b.useRef)();let i=!0;const a=Od((0,b.useCallback)((t=>{const r=Rd(e,t,n);return t(),r}),[e,n]),(()=>{const t=Id(e,Pd);try{if(!i&&r.current&&o.current&&!xd(r.current,t,o.current,new WeakMap))return r.current}catch(e){}return t}),(()=>Id(e,Pd)));i=!1;const s=new WeakMap;(0,b.useEffect)((()=>{r.current=a,o.current=s})),"production"!==(null==void 0?void 0:undefined.MODE)&&Dd(a,s);const l=(0,b.useMemo)((()=>new WeakMap),[]);return wd(a,s,l,Ad)}Symbol();function zd(e){const t=function(e={}){return Nd(e)}({data:Array.from(e||[]),has(e){return this.data.some((t=>t[0]===e))},set(e,t){const n=this.data.find((t=>t[0]===e));return n?n[1]=t:this.data.push([e,t]),this},get(e){var t;return null==(t=this.data.find((t=>t[0]===e)))?void 0:t[1]},delete(e){const t=this.data.findIndex((t=>t[0]===e));return-1!==t&&(this.data.splice(t,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(e){this.data.forEach((t=>{e(t[1],t[0],this)}))},keys(){return this.data.map((e=>e[0])).values()},values(){return this.data.map((e=>e[1])).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}var Bd=(0,s.createContext)({slots:zd(),fills:zd(),registerSlot:()=>{"undefined"!=typeof process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function Fd(e){const{updateSlot:t,unregisterSlot:n,registerFill:r,unregisterFill:o,...i}=(0,s.useContext)(Bd);return{...Ld(i.slots,{sync:!0}).get(e),updateSlot:(0,s.useCallback)((n=>{t(e,n)}),[e,t]),unregisterSlot:(0,s.useCallback)((t=>{n(e,t)}),[e,n]),registerFill:(0,s.useCallback)((t=>{r(e,t)}),[e,r]),unregisterFill:(0,s.useCallback)((t=>{o(e,t)}),[e,o])}}var Vd=(0,s.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});var Hd=e=>{const{getSlot:t,subscribe:n}=(0,s.useContext)(Vd);return(0,s.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function jd(e){let{name:t,children:n,registerFill:r,unregisterFill:o}=e;const i=Hd(t),a=(0,s.useRef)({name:t,children:n});return(0,s.useLayoutEffect)((()=>{const e=a.current;return r(t,e),()=>o(t,e)}),[]),(0,s.useLayoutEffect)((()=>{a.current.children=n,i&&i.forceUpdate()}),[n]),(0,s.useLayoutEffect)((()=>{t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?("function"==typeof n&&(n=n(i.props.fillProps)),(0,s.createPortal)(n,i.node)):null}var $d=e=>(0,s.createElement)(Vd.Consumer,null,(t=>{let{registerFill:n,unregisterFill:r}=t;return(0,s.createElement)(jd,a({},e,{registerFill:n,unregisterFill:r}))}));function Wd(e){return"function"==typeof e}class Ud extends s.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:r={},getFills:o}=this.props,i=(null!==(e=o(n,this))&&void 0!==e?e:[]).map((e=>{const t=Wd(e.children)?e.children(r):e.children;return s.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;const n=e.key||t;return(0,s.cloneElement)(e,{key:n})}))})).filter((e=>!(0,s.isEmptyElement)(e)));return(0,s.createElement)(s.Fragment,null,Wd(t)?t(i):i)}}var Gd,Yd=e=>(0,s.createElement)(Vd.Consumer,null,(t=>{let{registerSlot:n,unregisterSlot:r,getFills:o}=t;return(0,s.createElement)(Ud,a({},e,{registerSlot:n,unregisterSlot:r,getFills:o}))})),qd=new Uint8Array(16);function Kd(){if(!Gd&&!(Gd="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gd(qd)}var Xd=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Zd=function(e){return"string"==typeof e&&Xd.test(e)},Jd=[],Qd=0;Qd<256;++Qd)Jd.push((Qd+256).toString(16).substr(1));var ef=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Jd[e[t+0]]+Jd[e[t+1]]+Jd[e[t+2]]+Jd[e[t+3]]+"-"+Jd[e[t+4]]+Jd[e[t+5]]+"-"+Jd[e[t+6]]+Jd[e[t+7]]+"-"+Jd[e[t+8]]+Jd[e[t+9]]+"-"+Jd[e[t+10]]+Jd[e[t+11]]+Jd[e[t+12]]+Jd[e[t+13]]+Jd[e[t+14]]+Jd[e[t+15]]).toLowerCase();if(!Zd(n))throw TypeError("Stringified UUID is invalid");return n};var tf=function(e,t,n){var r=(e=e||{}).random||(e.rng||Kd)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return ef(r)};const nf=new Set,rf=sc()((e=>{let t=tf().replace(/[0-9]/g,"");for(;nf.has(t);)t=tf().replace(/[0-9]/g,"");return nf.add(t),uu({container:e,key:t})}));var of=function(e){const{children:t,document:n}=e;if(!n)return null;const r=rf(n.head);return(0,s.createElement)(Tu,{value:r},t)};function af(){const[,e]=(0,s.useState)({}),t=(0,s.useRef)(!0);return(0,s.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}function sf(e){let{name:t,children:n}=e;const{registerFill:r,unregisterFill:o,...i}=Fd(t),a=(0,s.useRef)({rerender:af()});if((0,s.useEffect)((()=>(r(a),()=>{o(a)})),[r,o]),!i.ref||!i.ref.current)return null;"function"==typeof n&&(n=n(i.fillProps));const l=(0,s.createElement)(of,{document:i.ref.current.ownerDocument},n);return(0,s.createPortal)(l,i.ref.current)}var lf=(0,s.forwardRef)((function(e,t){let{name:n,fillProps:r={},as:o="div",...i}=e;const{registerSlot:l,unregisterSlot:c,...u}=(0,s.useContext)(Bd),f=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(l(n,f,r),()=>{c(n,f)})),[l,c,n]),(0,s.useLayoutEffect)((()=>{u.updateSlot(n,r)})),(0,s.createElement)(o,a({ref:(0,d.useMergeRefs)([t,f])},i))})),cf=window.wp.isShallowEqual,uf=n.n(cf);function df(e){let{children:t}=e;const n=function(){const e=(0,s.useRef)(zd()),t=(0,s.useRef)(zd()),n=(0,s.useCallback)(((t,n,r)=>{const o=e.current.get(t)||{};e.current.set(t,Md({...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}))}),[]),r=(0,s.useCallback)(((t,n)=>{var r;(null===(r=e.current.get(t))||void 0===r?void 0:r.ref)===n&&e.current.delete(t)}),[]),o=(0,s.useCallback)(((n,r)=>{const o=e.current.get(n);if(o&&!uf()(o.fillProps,r)){o.fillProps=r;const e=t.current.get(n);e&&e.map((e=>e.current.rerender()))}}),[]),i=(0,s.useCallback)(((e,n)=>{t.current.set(e,Md([...t.current.get(e)||[],n]))}),[]),a=(0,s.useCallback)(((e,n)=>{t.current.get(e)&&t.current.set(e,Md(t.current.get(e).filter((e=>e!==n))))}),[]);return(0,s.useMemo)((()=>({slots:e.current,fills:t.current,registerSlot:n,updateSlot:o,unregisterSlot:r,registerFill:i,unregisterFill:a})),[n,o,r,i,a])}();return(0,s.createElement)(Bd.Provider,{value:n},t)}class ff extends s.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){var n,r;this.fills[e]=null!==(n=null===(r=this.fills[e])||void 0===r?void 0:r.filter((e=>e!==t)))&&void 0!==n?n:[],this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter((t=>t!==e))}}render(){return(0,s.createElement)(Vd.Provider,{value:this.contextValue},this.props.children)}}function pf(e){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)($d,e),(0,s.createElement)(sf,e))}const mf=(0,s.forwardRef)(((e,t)=>{let{bubblesVirtually:n,...r}=e;return n?(0,s.createElement)(lf,a({},r,{ref:t})):(0,s.createElement)(Yd,r)}));function hf(e){let{children:t,...n}=e;return(0,s.createElement)(ff,n,(0,s.createElement)(df,null,t))}function gf(e){const t=t=>(0,s.createElement)(pf,a({name:e},t));t.displayName=e+"Fill";const n=t=>(0,s.createElement)(mf,a({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}const vf={bottom:"bottom",top:"top","middle left":"left","middle right":"right","bottom left":"bottom-end","bottom center":"bottom","bottom right":"bottom-start","top left":"top-end","top center":"top","top right":"top-start","middle left left":"left","middle left right":"left","middle left bottom":"left-end","middle left top":"left-start","middle right left":"right","middle right right":"right","middle right bottom":"right-end","middle right top":"right-start","bottom left left":"bottom-end","bottom left right":"bottom-end","bottom left bottom":"bottom-end","bottom left top":"bottom-end","bottom center left":"bottom","bottom center right":"bottom","bottom center bottom":"bottom","bottom center top":"bottom","bottom right left":"bottom-start","bottom right right":"bottom-start","bottom right bottom":"bottom-start","bottom right top":"bottom-start","top left left":"top-end","top left right":"top-end","top left bottom":"top-end","top left top":"top-end","top center left":"top","top center right":"top","top center bottom":"top","top center top":"top","top right left":"top-start","top right right":"top-start","top right bottom":"top-start","top right top":"top-start",middle:"bottom","middle center":"bottom","middle center bottom":"bottom","middle center left":"bottom","middle center right":"bottom","middle center top":"bottom"},bf=e=>{var t;return null!==(t=vf[e])&&void 0!==t?t:"bottom"},yf={top:{originX:.5,originY:1},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},right:{originX:0,originY:.5},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},bottom:{originX:.5,originY:0},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},left:{originX:1,originY:.5},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}},wf=e=>{var t;const n=null==e||null===(t=e.defaultView)||void 0===t?void 0:t.frameElement;if(!n)return;const r=n.getBoundingClientRect();return{x:r.left,y:r.top}};function xf(e){return e.split("-")[0]}function _f(e){return["top","bottom"].includes(xf(e))?"x":"y"}function Ef(e){return"x"===e?"y":"x"}const Cf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{options:e,fn(t){var n;const{x:r,y:o,placement:i,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=e,d={x:r,y:o},f=_f(i),p=Ef(f);let m=d[f],h=d[p];const g="function"==typeof l?l(t):l,v="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g},b={x:0,y:0,...null===(n=s.frameOffset)||void 0===n?void 0:n.amount};if(c){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis+b[f],n=a.reference[f]+a.reference[e]-v.mainAxis+b[f];mn&&(m=n)}if(u){var y,w,x,_;const e="y"===f?"width":"height",t=["top","left"].includes(xf(i)),n=a.reference[p]-a.floating[e]+(t&&null!==(y=null===(w=s.offset)||void 0===w?void 0:w[p])&&void 0!==y?y:0)+(t?0:v.crossAxis)+b[p],r=a.reference[p]+a.reference[e]+(t?0:null!==(x=null===(_=s.offset)||void 0===_?void 0:_[p])&&void 0!==x?x:0)-(t?v.crossAxis:0)+b[p];hr&&(h=r)}return{[f]:m,[p]:h}}}},kf="Popover",Sf=()=>(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation"},(0,s.createElement)(i.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,s.createElement)(i.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})),Tf=(0,s.forwardRef)(((e,t)=>{let{style:n,placement:r,shouldAnimate:o=!1,...i}=e;const[l,c]=(0,s.useState)(!1),u=function(){!Bt.current&&Ft();const[e]=(0,b.useState)(zt.current);return e}(),{style:d,...f}=(0,s.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:yf[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(r)),[r]),p=(0,s.useCallback)((()=>c(!0)),[]),m=o&&!u?{style:{...d,...n},...f,onAnimationComplete:p,animate:!l&&f.animate}:{animate:!1,style:n};return(0,s.createElement)(Gl.div,a({},m,i,{ref:t}))})),Nf=(0,s.createContext)(void 0),Rf=(0,s.forwardRef)(((e,t)=>{var n,r,o,i;const{animate:l=!0,headerTitle:u,onClose:f,children:p,className:m,noArrow:h=!0,position:g,placement:v="bottom-start",offset:b=0,focusOnMount:y="firstElement",anchor:w,expandOnMobile:x,onFocusOutside:_,__unstableSlotName:E=kf,flip:C=!0,resize:k=!0,shift:S=!1,variant:T,__unstableForcePosition:N,anchorRef:R,anchorRect:I,getAnchorRect:M,isAlternate:P,...O}=e;let D=C,A=k;void 0!==N&&(Kl()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),D=!N,A=!N),void 0!==R&&Kl()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==I&&Kl()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==M&&Kl()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const L=P?"toolbar":T;void 0!==P&&Kl()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const z=(0,s.useRef)(null),[B,F]=(0,s.useState)(null),[V,H]=(0,s.useState)(),j=(0,s.useCallback)((e=>{F(e)}),[]),$=(0,d.useViewportMatch)("medium","<"),W=x&&$,U=!W&&!h,G=g?bf(g):v,Y=(0,s.useRef)(wf(V)),q=[{name:"frameOffset",fn(e){let{x:t,y:n}=e;return Y.current?{x:t+Y.current.x,y:n+Y.current.y,data:{amount:Y.current}}:{x:t,y:n}}},Ye(b),D?Ge():void 0,A?Xe({apply(e){var t;const{firstElementChild:n}=null!==(t=oe.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}):void 0,S?Ke({crossAxis:!0,limiter:Cf(),padding:1}):void 0,Mt({element:z})].filter((e=>void 0!==e)),K=(0,s.useContext)(Nf)||E,X=Fd(K);let Z;(f||_)&&(Z=(e,t)=>{"focus-outside"===e&&_?_(t):f&&f()});const[J,Q]=(0,d.__experimentalUseDialog)({focusOnMount:y,__unstableOnClose:Z,onClose:Z}),{x:ee,y:te,reference:ne,floating:re,refs:oe,strategy:ie,update:ae,placement:se,middlewareData:{arrow:le}}=At({placement:G,middleware:q,whileElementsMounted:(e,t,n)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,c=l||i?[...st(e)?Ct(e):e.contextElement?Ct(e.contextElement):[],...Ct(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(a){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),st(e)&&!s&&d.observe(e),st(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?bt(e):null;return s&&function t(){const r=bt(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(u)}}(e,t,n,{animationFrame:!0})}),ce=(0,s.useCallback)((e=>{z.current=e,ae()}),[ae]),ue=null==R?void 0:R.top,de=null==R?void 0:R.bottom,fe=null==R?void 0:R.startContainer,pe=null==R?void 0:R.current;(0,s.useLayoutEffect)((()=>{const e=(e=>{var t;let n,{anchor:r,anchorRef:o,anchorRect:i,getAnchorRect:a,fallbackReferenceElement:s,fallbackDocument:l}=e;if(r)n=r.ownerDocument;else if(null!=o&&o.top)n=null==o?void 0:o.top.ownerDocument;else if(null!=o&&o.startContainer)n=o.startContainer.ownerDocument;else if(null!=o&&o.current)n=o.current.ownerDocument;else if(o)n=o.ownerDocument;else if(i&&null!=i&&i.ownerDocument)n=i.ownerDocument;else if(a){var c;n=null===(c=a(s))||void 0===c?void 0:c.ownerDocument}return null!==(t=n)&&void 0!==t?t:l})({anchor:w,anchorRef:R,anchorRect:I,getAnchorRect:M,fallbackReferenceElement:B,fallbackDocument:document}),t=(e=>{var t;let{anchor:n,anchorRef:r,anchorRect:o,getAnchorRect:i,fallbackReferenceElement:a}=e,s=null;return n?s=n:null!=r&&r.top?s={getBoundingClientRect(){const e=r.top.getBoundingClientRect(),t=r.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,t.bottom-e.top)}}:null!=r&&r.current?s=r.current:r?s=r:o?s={getBoundingClientRect(){return o}}:i?s={getBoundingClientRect(){var e,t,n,r;const o=i(a);return new window.DOMRect(null!==(e=o.x)&&void 0!==e?e:o.left,null!==(t=o.y)&&void 0!==t?t:o.top,null!==(n=o.width)&&void 0!==n?n:o.right-o.left,null!==(r=o.height)&&void 0!==r?r:o.bottom-o.top)}}:a&&(s=a.parentElement),null!==(t=s)&&void 0!==t?t:null})({anchor:w,anchorRef:R,anchorRect:I,getAnchorRect:M,fallbackReferenceElement:B});ne(t),H(e)}),[w,R,ue,de,fe,pe,I,M,B,ne]),(0,s.useLayoutEffect)((()=>{var e,t;if(V===document||V===(null===(e=oe.floating.current)||void 0===e?void 0:e.ownerDocument)||null==V||null===(t=V.defaultView)||void 0===t||!t.frameElement)return void(Y.current=void 0);const{defaultView:n}=V,r=()=>{Y.current=wf(V),ae()};return n.addEventListener("resize",r),r(),()=>{n.removeEventListener("resize",r)}}),[V,ae,oe.floating]);const me=(0,d.useMergeRefs)([re,J,t]);let he=(0,s.createElement)(Tf,a({shouldAnimate:l&&!W,placement:se,className:c()("components-popover",m,{"is-expanded":W,"is-positioned":null!==ee&&null!==te,[`is-${"toolbar"===L?"alternate":L}`]:L})},O,{ref:me},Q,{tabIndex:-1,style:W?void 0:{position:ie,top:0,left:0,x:Math.round(null!=ee?ee:0)||void 0,y:Math.round(null!=te?te:0)||void 0}}),W&&(0,s.createElement)(cd,null),W&&(0,s.createElement)("div",{className:"components-popover__header"},(0,s.createElement)("span",{className:"components-popover__header-title"},u),(0,s.createElement)(id,{className:"components-popover__close",icon:Yl,onClick:f})),(0,s.createElement)("div",{className:"components-popover__content"},p),U&&(0,s.createElement)("div",{ref:ce,className:["components-popover__arrow",`is-${se.split("-")[0]}`].join(" "),style:{left:void 0!==(null==le?void 0:le.x)&&Number.isFinite(le.x)?`${le.x+(null!==(n=null===(r=Y.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)}px`:"",top:void 0!==(null==le?void 0:le.y)&&Number.isFinite(le.y)?`${le.y+(null!==(o=null===(i=Y.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0)}px`:""}},(0,s.createElement)(Sf,null)));return X.ref&&(he=(0,s.createElement)(pf,{name:K},he)),R||I||w?he:(0,s.createElement)("span",{ref:j},he)}));Rf.Slot=(0,s.forwardRef)((function(e,t){let{name:n=kf}=e;return(0,s.createElement)(mf,{bubblesVirtually:!0,name:n,className:"popover-slot",ref:t})})),Rf.__unstableSlotNameProvider=Nf.Provider;var If=Rf;var Mf=function(e){const{shortcut:t,className:n}=e;if(!t)return null;let r,o;return"string"==typeof t&&(r=t),null!==t&&"object"==typeof t&&(r=t.display,o=t.ariaLabel),(0,s.createElement)("span",{className:n,"aria-label":o},r)};const Pf=700,Of=(0,s.createElement)("div",{className:"event-catcher"}),Df=e=>{let{eventHandlers:t,child:n,childrenWithPopover:r,mergedRefs:o}=e;return(0,s.cloneElement)((0,s.createElement)("span",{className:"disabled-element-wrapper"},(0,s.cloneElement)(Of,t),(0,s.cloneElement)(n,{children:r,ref:o})),{...t})},Af=e=>{let{child:t,eventHandlers:n,childrenWithPopover:r,mergedRefs:o}=e;return(0,s.cloneElement)(t,{...n,children:r,ref:o})},Lf=(e,t,n)=>{if(1!==s.Children.count(e))return;const r=s.Children.only(e);r.props.disabled||"function"==typeof r.props[t]&&r.props[t](n)};var zf=function(e){var t;const{children:n,position:r="bottom middle",text:o,shortcut:i,delay:a=Pf}=e,[l,c]=(0,s.useState)(!1),[u,f]=(0,s.useState)(!1),p=(0,d.useDebounce)(f,a),[m,h]=(0,s.useState)(null),g=null===(t=s.Children.toArray(n)[0])||void 0===t?void 0:t.ref,v=(0,d.useMergeRefs)([h,g]),b=e=>{"OPTION"!==e.target.tagName&&(Lf(n,"onMouseDown",e),document.addEventListener("mouseup",x),c(!0))},y=e=>{"OPTION"!==e.target.tagName&&(Lf(n,"onMouseUp",e),document.removeEventListener("mouseup",x),c(!1))},w=e=>"mouseUp"===e?y:"mouseDown"===e?b:void 0,x=w("mouseUp"),_=(e,t)=>r=>{if(Lf(n,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&l)return;p.cancel();const o=["focus","mouseenter"].includes(r.type);o!==u&&(t?p(o):f(o))},E=()=>{p.cancel(),document.removeEventListener("mouseup",x)};if((0,s.useEffect)((()=>E),[]),1!==s.Children.count(n))return n;const C={onMouseEnter:_("onMouseEnter",!0),onMouseLeave:_("onMouseLeave"),onClick:_("onClick"),onFocus:_("onFocus"),onBlur:_("onBlur"),onMouseDown:w("mouseDown")},k=s.Children.only(n),{children:S,disabled:T}=k.props,N=T?Df:Af,R=(e=>{let{anchor:t,grandchildren:n,isOver:r,offset:o,position:i,shortcut:a,text:l}=e;return(0,s.concatChildren)(n,r&&(0,s.createElement)(If,{focusOnMount:!1,position:i,className:"components-tooltip","aria-hidden":"true",animate:!1,offset:o,anchor:t,shift:!0},l,(0,s.createElement)(Mf,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:S,...{anchor:m,isOver:u,offset:4,position:r,shortcut:i,text:o}});return N({child:k,eventHandlers:C,childrenWithPopover:R,mergedRefs:v})};const Bf=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],Ff={"top left":(0,u.__)("Top Left"),"top center":(0,u.__)("Top Center"),"top right":(0,u.__)("Top Right"),"center left":(0,u.__)("Center Left"),"center center":(0,u.__)("Center"),center:(0,u.__)("Center"),"center right":(0,u.__)("Center Right"),"bottom left":(0,u.__)("Bottom Left"),"bottom center":(0,u.__)("Bottom Center"),"bottom right":(0,u.__)("Bottom Right")},Vf=Bf.flat();function Hf(e){return("center"===e?"center center":e).replace("-"," ")}function jf(e,t){return`${e}-${Hf(t).replace(" ","-")}`}n(1281);function $f(){for(var e=arguments.length,t=new Array(e),n=0;n0:"number"==typeof e},Gf=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Yf=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},qf=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Kf=function(e){return{r:Yf(e.r,0,255),g:Yf(e.g,0,255),b:Yf(e.b,0,255),a:Yf(e.a)}},Xf=function(e){return{r:Gf(e.r),g:Gf(e.g),b:Gf(e.b),a:Gf(e.a,3)}},Zf=/^#([0-9a-f]{3,8})$/i,Jf=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Qf=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},ep=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:o}},tp=function(e){return{h:qf(e.h),s:Yf(e.s,0,100),l:Yf(e.l,0,100),a:Yf(e.a)}},np=function(e){return{h:Gf(e.h),s:Gf(e.s),l:Gf(e.l),a:Gf(e.a,3)}},rp=function(e){return ep((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},op=function(e){return{h:(t=Qf(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},ip=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ap=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cp={string:[[function(e){var t=Zf.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?Gf(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?Gf(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=sp.exec(e)||lp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Kf({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=ip.exec(e)||ap.exec(e);if(!t)return null;var n,r,o=tp({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Wf[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return rp(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Uf(t)&&Uf(n)&&Uf(r)?Kf({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Uf(t)||!Uf(n)||!Uf(r))return null;var a=tp({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return rp(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Uf(t)||!Uf(n)||!Uf(r))return null;var a=function(e){return{h:qf(e.h),s:Yf(e.s,0,100),v:Yf(e.v,0,100),a:Yf(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return ep(a)},"hsv"]]},up=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Xf(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Jf(Gf(255*o)):"","#"+Jf(t)+Jf(n)+Jf(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Xf(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Xf(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return np(op(this.rgba))},e.prototype.toHslString=function(){return t=(e=np(op(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=Qf(this.rgba),{h:Gf(e.h),s:Gf(e.s),v:Gf(e.v),a:Gf(e.a,3)};var e},e.prototype.invert=function(){return gp({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),gp(fp(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),gp(fp(this.rgba,-e))},e.prototype.grayscale=function(){return gp(fp(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),gp(mp(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),gp(mp(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?gp({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Gf(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=op(this.rgba);return"number"==typeof e?gp({h:e,s:t.s,l:t.l,a:t.a}):Gf(t.h)},e.prototype.isEqual=function(e){return this.toHex()===gp(e).toHex()},e}(),gp=function(e){return e instanceof hp?e:new hp(e)},vp=[],bp=function(e){e.forEach((function(e){vp.indexOf(e)<0&&(e(hp,cp),vp.push(e))}))};function yp(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"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var p=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));p0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return gp(e).alpha(t).toRgbString()}bp([yp]);const xp="#fff",_p={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Ep="var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #006ba1))",Cp={theme:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba))",themeDark10:Ep,background:xp,backgroundDisabled:_p[100],border:_p[600],borderHover:_p[700],borderFocus:Ep,borderDisabled:_p[400],textDisabled:_p[600],textDark:xp,darkGrayPlaceholder:wp(_p[900],.62),lightGrayPlaceholder:wp(xp,.65)},kp=Object.freeze({gray:_p,white:xp,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},ui:Cp});function Sp(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}var Tp={name:"93uojk",styles:"border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const Np=()=>Tp,Rp=Qu("div",{target:"ecapk1j3"})(Np,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(e=>{let{size:t=92}=e;return $f("grid-template-rows:repeat( 3, calc( ",t,"px / 3 ) );width:",t,"px;","")}),";"),Ip=Qu("div",{target:"ecapk1j2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Mp=e=>$f("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",Sp("transition")," ",(e=>{let{isActive:t}=e;return $f("box-shadow:",t?`0 0 0 2px ${kp.gray[900]}`:null,";color:",t?kp.gray[900]:kp.gray[400],";*:hover>&{color:",t?kp.gray[900]:kp.ui.theme,";}","")})(e),";",""),Pp=Qu("span",{target:"ecapk1j1"})("height:6px;width:6px;",Mp,";"),Op=Qu("span",{target:"ecapk1j0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Dp(e){let{isActive:t=!1,value:n,...r}=e;const o=Ff[n];return(0,s.createElement)(zf,{text:o},(0,s.createElement)(Se,a({as:Op,role:"gridcell"},r),(0,s.createElement)(nd,null,n),(0,s.createElement)(Pp,{isActive:t,role:"presentation"})))}function Ap(e){return(0,b.useState)(e)[0]}function Lp(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=v(e);!(t=o()).done;)r();return n}function zp(e){for(var t,n=[],r=v(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function Bp(e){return e.slice().reverse()}function Fp(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function Vp(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function Hp(e){void 0===e&&(e={});var t=Ap(e).baseId,n=(0,b.useContext)(we),r=(0,b.useRef)(0),o=(0,b.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}function jp(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $p(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&jp(t.ref.current,e.ref.current)}))}function Wp(e){for(var t,n=0,r=v(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function Up(e){for(var t=Lp(e),n=Wp(t),r=[],o=0;oi&&(n=!0),-1):(r$f({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(e=>{let{disablePointerEvents:t}=e;return $f({pointerEvents:t?"none":void 0},"","")}),";"),vm=Qu("span",{target:"erowt50"})("height:2px;width:2px;",Mp,";",(e=>{let{isActive:t}=e;return $f("box-shadow:",t?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")}),";"),bm=Op,ym=24;var wm=function(e){let{className:t,disablePointerEvents:n=!0,size:r=ym,style:o={},value:i="center",...l}=e;const u=function(){const e=Hf(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center"),t=Vf.indexOf(e);return t>-1?t:void 0}(i),d=(r/ym).toFixed(2),f=c()("component-alignment-matrix-control-icon",t),p={...o,transform:`scale(${d})`};return(0,s.createElement)(gm,a({},l,{className:f,disablePointerEvents:n,role:"presentation",style:p}),Vf.map(((e,t)=>{const n=u===t;return(0,s.createElement)(bm,{key:e},(0,s.createElement)(vm,{isActive:n}))})))};const xm=()=>{};function _m(e){let{className:t,id:n,label:r=(0,u.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:l=xm,width:f=92,...p}=e;const[m]=(0,s.useState)(null!=i?i:o),h=function(e){const t=(0,d.useInstanceId)(_m,"alignment-matrix-control");return e||t}(n),g=jf(h,m),v=rm({baseId:h,currentId:g,rtl:(0,u.isRTL)()}),{setCurrentId:b}=v;(0,s.useEffect)((()=>{void 0!==i&&b(jf(h,i))}),[i,b,h]);const y=c()("component-alignment-matrix-control",t);return(0,s.createElement)(fm,a({},p,v,{"aria-label":r,as:Rp,className:y,role:"grid",size:f}),Bf.map(((e,t)=>(0,s.createElement)(hm,a({},v,{as:Ip,role:"row",key:t}),e.map((e=>{const t=jf(h,e),n=v.currentId===t;return(0,s.createElement)(Dp,a({},v,{id:t,isActive:n,key:e,value:e,onFocus:()=>{l(e)},tabIndex:n?0:-1}))}))))))}_m.Icon=wm;var Em=_m;function Cm(e){return"appear"===e?"top":"left"}function km(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=Cm(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}function Sm(e){let{type:t,options:n={},children:r}=e;return r({className:km({type:t,...n})})}function Tm(){const e=(0,b.useRef)(!1);return $t((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class Nm extends b.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Rm({children:e,isPresent:t}){const n=(0,b.useId)(),r=(0,b.useRef)(null),o=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)((()=>{const{width:e,height:i,top:a,left:s}=o.current;if(t||!r.current||!e||!i)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),b.createElement(Nm,{isPresent:t,childRef:r,sizeRef:o},b.cloneElement(e,{ref:r}))}const Im=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=nn(Mm),l=(0,b.useId)(),c=(0,b.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))})),i?void 0:[n]);return(0,b.useMemo)((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),b.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===a&&(e=b.createElement(Rm,{isPresent:n},e)),b.createElement(jt.Provider,{value:c},e)};function Mm(){return new Map}const Pm=e=>e.key||"";const Om=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{o&&(a="wait",Gr(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=function(){const e=Tm(),[t,n]=(0,b.useState)(0),r=(0,b.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,b.useCallback)((()=>vo.postRender(r)),[r]),t]}();const l=(0,b.useContext)(an).forceRender;l&&(s=l);const c=Tm(),u=function(e){const t=[];return b.Children.forEach(e,(e=>{(0,b.isValidElement)(e)&&t.push(e)})),t}(e);let d=u;const f=new Set,p=(0,b.useRef)(d),m=(0,b.useRef)(new Map).current,h=(0,b.useRef)(!0);if($t((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=Pm(e);t.set(n,e)}))}(u,m),p.current=d})),Hr((()=>{h.current=!0,m.clear(),f.clear()})),h.current)return b.createElement(b.Fragment,null,d.map((e=>b.createElement(Im,{key:Pm(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:a},e))));d=[...d];const g=p.current.map(Pm),v=u.map(Pm),y=g.length;for(let e=0;e{if(-1!==v.indexOf(e))return;const n=m.get(e);if(!n)return;const o=g.indexOf(e);d.splice(o,0,b.createElement(Im,{key:Pm(n),isPresent:!1,onExitComplete:()=>{m.delete(e),f.delete(e);const t=p.current.findIndex((t=>t.key===e));if(p.current.splice(t,1),!f.size){if(p.current=u,!1===c.current)return;s(),r&&r()}},custom:t,presenceAffectsLayout:i,mode:a},n))})),d=d.map((e=>{const t=e.key;return f.has(t)?e:b.createElement(Im,{key:Pm(e),isPresent:!0,presenceAffectsLayout:i,mode:a},e)})),"production"!==Wr&&"wait"===a&&d.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),b.createElement(b.Fragment,null,f.size?d:d.map((e=>(0,b.cloneElement)(e))))},Dm=(0,s.createContext)({flexItemDisplay:void 0});const Am={name:"zjik7",styles:"display:flex"},Lm={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},zm={name:"82a6rk",styles:"flex:1"},Bm={name:"13nosa1",styles:">*{min-height:0;}"},Fm={name:"1pwxzk4",styles:">*{min-width:0;}"};function Vm(e){const{className:t,display:n,isBlock:r=!1,...o}=Hu(e,"FlexItem"),i={},a=(0,s.useContext)(Dm).flexItemDisplay;i.Base=$f({display:n||a},"","");return{...o,className:Vu()(Lm,i.Base,r&&zm,t)}}var Hm=ju((function(e,t){const n=function(e){return Vm({isBlock:!0,...Hu(e,"FlexBlock")})}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"FlexBlock");var jm=ju((function(e,t){const n=Vm(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"FlexItem");var $m=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var Wm=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M7 11.5h10V13H7z"}));const Um=["40em","52em","64em"],Gm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>Um.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${Um.length} breakpoints, got index ${t}`);const[n,r]=(0,s.useState)(t);return(0,s.useEffect)((()=>{const e=()=>{const e=Um.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function Ym(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Gm(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}function qm(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(n=t.supports)&&void 0!==n&&n.call(t,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}function Km(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:l=!1,...c}=Hu(function(e){const{isReversed:t,...n}=e;return void 0!==t?(Kl()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),u=Ym(Array.isArray(r)?r:[r]),d="string"==typeof u&&!!u.includes("column"),f=Vu();return{...c,className:(0,s.useMemo)((()=>{const e=$f({alignItems:d?"normal":t,flexDirection:u,flexWrap:l?"wrap":void 0,gap:qm(i),justifyContent:a,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0},"","");return f(Am,e,d?Bm:Fm,n)}),[t,n,f,u,o,i,d,a,l]),isColumn:d}}var Xm=ju((function(e,t){const{children:n,isColumn:r,...o}=Km(e);return(0,s.createElement)(Dm.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,s.createElement)(td,a({},o,{ref:t}),n))}),"Flex");const Zm={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function Jm(e){return null!=e}function Qm(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(Jm))&&void 0!==e?e:n}const eh=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,th="…",nh={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},rh={ellipsis:th,ellipsizeMode:nh.auto,limit:0,numberOfLines:0};function oh(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=Jm(r)?r:th;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}function ih(e){const{className:t,children:n,ellipsis:r=th,ellipsizeMode:o=nh.auto,limit:i=0,numberOfLines:a=0,...l}=Hu(e,"Truncate"),c=Vu(),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n={...rh,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===nh.none)return e;let a,s;switch(o){case nh.head:a=0,s=i;break;case nh.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}return o!==nh.auto?oh(e,a,s,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),d=o===nh.auto;return{...l,className:(0,s.useMemo)((()=>c(d&&!a&&Zm,d&&!!a&&$f("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),t)),[t,c,a,d]),children:u}}let ah;bp([yp]);const sh=sc()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&gp(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!ah){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),ah=e}return ah}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));function lh(e){const t=function(e){const t=sh(e);return gp(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const ch="36px",uh="12px",dh={controlSurfaceColor:kp.white,controlTextActiveColor:kp.ui.theme,controlPaddingX:uh,controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:kp.white,controlBorderRadius:"2px",controlBoxShadow:"transparent",controlBoxShadowFocus:`0 0 0 0.5px ${kp.ui.theme}`,controlDestructiveBorderColor:kp.alert.red,controlHeight:ch,controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},fh={toggleGroupControlBackgroundColor:dh.controlBackgroundColor,toggleGroupControlBorderColor:kp.ui.border,toggleGroupControlBackdropBackgroundColor:dh.controlSurfaceColor,toggleGroupControlBackdropBorderColor:kp.ui.border,toggleGroupControlButtonColorActive:dh.controlBackgroundColor};var ph=Object.assign({},dh,fh,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${qm(2)}`,cardPaddingSmall:`${qm(4)}`,cardPaddingMedium:`${qm(4)} ${qm(6)}`,cardPaddingLarge:`${qm(6)} ${qm(8)}`,surfaceBackgroundColor:kp.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:kp.white,surfaceColor:kp.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const mh=$f("color:",kp.gray[900],";line-height:",ph.fontLineHeightBase,";margin:0;",""),hh={name:"4zleql",styles:"display:block"},gh=$f("color:",kp.alert.green,";",""),vh=$f("color:",kp.alert.red,";",""),bh=$f("color:",kp.gray[700],";",""),yh=$f("mark{background:",kp.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),wh={name:"50zrmy",styles:"text-transform:uppercase"};var xh=n(3138);const _h=sc()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const Eh={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},Ch=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function kh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13;if(e in Eh)return kh(Eh[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}const t=`(${e} / 13)`;return`calc(${t} * ${ph.fontSize})`}function Sh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!Ch.includes(e))return kh(e);const t=`fontSizeH${e}`;return ph[t]}var Th={name:"50zrmy",styles:"text-transform:uppercase"};function Nh(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:l,isDestructive:c=!1,display:u,highlightEscape:d=!1,highlightCaseSensitive:f=!1,highlightWords:p,highlightSanitize:m,isBlock:h=!1,letterSpacing:g,lineHeight:v,optimizeReadabilityFor:b,size:y,truncate:w=!1,upperCase:x=!1,variant:_,weight:E=ph.fontWeight,...C}=Hu(t,"Text");let k=o;const S=Array.isArray(p),T="caption"===y;if(S){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");k=function(e){let{activeClassName:t="",activeIndex:n=-1,activeStyle:r,autoEscape:o,caseSensitive:i=!1,children:a,findChunks:l,highlightClassName:c="",highlightStyle:u={},highlightTag:d="mark",sanitize:f,searchWords:p=[],unhighlightClassName:m="",unhighlightStyle:h}=e;if(!a)return null;if("string"!=typeof a)return a;const g=a,v=(0,xh.findAll)({autoEscape:o,caseSensitive:i,findChunks:l,sanitize:f,searchWords:p,textToHighlight:g}),b=d;let y,w=-1,x="";const _=v.map(((e,o)=>{const a=g.substr(e.start,e.end-e.start);if(e.highlight){let e;w++,"object"==typeof c?i?e=c[a]:(c=_h(c),e=c[a.toLowerCase()]):e=c;const l=w===+n;x=`${e} ${l?t:""}`,y=!0===l&&null!==r?Object.assign({},u,r):u;const d={children:a,className:x,key:o,style:y};return"string"!=typeof b&&(d.highlightIndex=w),(0,s.createElement)(b,d)}return(0,s.createElement)("span",{children:a,className:m,key:o,style:h})}));return _}({autoEscape:d,children:o,caseSensitive:f,searchWords:p,sanitize:m})}const N=Vu();let R;!0===w&&(R="auto"),!1===w&&(R="none");const I=ih({...C,className:(0,s.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${ph.controlHeight} + ${qm(2)})`;switch(e){case"large":n=`calc(${ph.controlHeightLarge} + ${qm(2)})`;break;case"small":n=`calc(${ph.controlHeightSmall} + ${qm(2)})`;break;case"xSmall":n=`calc(${ph.controlHeightXSmall} + ${qm(2)})`}return n}(n,v);if(t.Base=$f({color:a,display:u,fontSize:kh(y),fontWeight:E,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=Th,t.optimalTextColor=null,b){const e="dark"===lh(b);t.optimalTextColor=$f(e?{color:kp.gray[900]}:{color:kp.white},"","")}return N(mh,t.Base,t.optimalTextColor,c&&vh,!!S&&yh,h&&hh,T&&bh,_&&e[_],x&&t.upperCase,i)}),[n,r,i,a,N,u,h,T,c,S,g,v,b,y,x,_,E]),children:o,ellipsizeMode:l||R});return!w&&Array.isArray(o)&&(k=s.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return Uu(e,["Link"])?(0,s.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...I,children:w?I.children:k}}var Rh=ju((function(e,t){const n=Nh(e);return(0,s.createElement)(td,a({as:"span"},n,{ref:t}))}),"Text");const Ih={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"},Mh=new RegExp(/-left/g),Ph=new RegExp(/-right/g),Oh=new RegExp(/Left/g),Dh=new RegExp(/Right/g);function Ah(e){return"left"===e?"right":"right"===e?"left":Mh.test(e)?e.replace(Mh,"-right"):Ph.test(e)?e.replace(Ph,"-left"):Oh.test(e)?e.replace(Oh,"Right"):Dh.test(e)?e.replace(Dh,"Left"):e}const Lh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[Ah(t),n]})))};function zh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,u.isRTL)()?$f(t,""):$f(e,""):(0,u.isRTL)()?$f(Lh(e),""):$f(e,"")}zh.watch=()=>(0,u.isRTL)();var Bh={name:"1739oy8",styles:"z-index:1"};const Fh=e=>{let{isFocused:t}=e;return t?Bh:""},Vh=Qu(Xm,{target:"em5sgkm7"})("box-sizing:border-box;position:relative;border-radius:2px;padding-top:0;",Fh,";");var Hh={name:"1d3w5wq",styles:"width:100%"};const jh=Qu("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(e=>{let{disabled:t}=e;return $f({backgroundColor:t?kp.ui.backgroundDisabled:kp.ui.background},"","")})," ",(e=>{let{__unstableInputWidth:t,labelPosition:n}=e;return t?"side"===n?"":$f("edge"===n?{flex:`0 0 ${t}`}:{width:t},"",""):Hh}),";"),$h=e=>{let{inputSize:t,__next36pxDefaultSize:n}=e;const r={default:{height:36,lineHeight:1,minHeight:36,paddingLeft:qm(4),paddingRight:qm(4)},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:qm(2),paddingRight:qm(2)},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:qm(4),paddingRight:qm(4)}};return n||(r.default={height:30,lineHeight:1,minHeight:30,paddingLeft:qm(2),paddingRight:qm(2)}),r[t]||r.default},Wh=Qu("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",kp.gray[900],";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(e=>{let t,n,{isDragging:r,dragCursor:o}=e;return r&&(t=$f("cursor:",o,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),r&&o&&(n=$f("&:active{cursor:",o,";}","")),$f(t," ",n,";","")})," ",(e=>{let{disabled:t}=e;return t?$f({color:kp.ui.textDisabled},"",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"},r=n[t]||n.default;return r?$f("font-size:","16px",";@media ( min-width: 600px ){font-size:",r,";}",""):""})," ",(e=>$f($h(e),"",""))," ",(e=>{let{paddingInlineStart:t,paddingInlineEnd:n}=e;return $f({paddingInlineStart:t,paddingInlineEnd:n},"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),Uh=Qu(Rh,{target:"em5sgkm4"})("&&&{",Ih,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),Gh=e=>(0,s.createElement)(Uh,a({},e,{as:"label"})),Yh=Qu(jm,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),qh=Qu("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(e=>{let t,{disabled:n,isFocused:r}=e,o=r?kp.ui.borderFocus:kp.ui.border;return r&&(t=`0 0 0 1px ${kp.ui.borderFocus} inset`),n&&(o=kp.ui.borderDisabled),$f({boxShadow:t,borderColor:o,borderStyle:"solid",borderWidth:1},"","")})," ",zh({paddingLeft:2}),";}"),Kh=Qu("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Xh=Qu("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Zh=(0,s.memo)((function(e){let{disabled:t=!1,isFocused:n=!1}=e;return(0,s.createElement)(qh,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:t,isFocused:n})}));var Jh=Zh;function Qh(e){let{children:t,hideLabelFromVision:n,htmlFor:r,...o}=e;return t?n?(0,s.createElement)(nd,{as:"label",htmlFor:r},t):(0,s.createElement)(Yh,null,(0,s.createElement)(Gh,a({htmlFor:r},o),t)):null}function eg(e,t){let{__next36pxDefaultSize:n,__unstableInputWidth:r,children:o,className:i,disabled:l=!1,hideLabelFromVision:c=!1,labelPosition:u,id:f,isFocused:p=!1,label:m,prefix:h,size:g="default",suffix:v,...b}=e;const y=function(e){const t=(0,d.useInstanceId)(eg);return e||`input-base-control-${t}`}(f),w=c||!m,{paddingLeft:x,paddingRight:_}=$h({inputSize:g,__next36pxDefaultSize:n}),E=(0,s.useMemo)((()=>({InputControlPrefixWrapper:{paddingLeft:x},InputControlSuffixWrapper:{paddingRight:_}})),[x,_]);return(0,s.createElement)(Vh,a({},b,function(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}(u),{className:i,gap:2,isFocused:p,labelPosition:u,ref:t}),(0,s.createElement)(Qh,{className:"components-input-control__label",hideLabelFromVision:c,labelPosition:u,htmlFor:y},m),(0,s.createElement)(jh,{__unstableInputWidth:r,className:"components-input-control__container",disabled:l,hideLabel:w,labelPosition:u},(0,s.createElement)(oc,{value:E},h&&(0,s.createElement)(Kh,{className:"components-input-control__prefix"},h),o,v&&(0,s.createElement)(Xh,{className:"components-input-control__suffix"},v)),(0,s.createElement)(Jh,{disabled:l,isFocused:p})))}var tg=(0,s.forwardRef)(eg);const ng={toVector(e,t){return void 0===e&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function rg(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function og(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+rg(e-n,n-t,r)+n:e}function ig(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function ag(e,t,n){return(t=ig(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lg(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function yg(e){const t=vg(e);return hg(e)?t.identifier:t.pointerId}function wg(e){const t=vg(e);return[t.clientX,t.clientY]}function xg(e,...t){return"function"==typeof e?e(...t):e}function _g(){}function Eg(...e){return 0===e.length?_g:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Cg(e,t){return Object.assign({},t,e||{})}class kg{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?xg(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);ng.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=s&&u[0]),!1===c[1]&&(c[1]=Math.abs(a)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===c[1]&&(c[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?a-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=xg(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[m,h]=t.offset,[[g,v],[b,y]]=t._bounds;t.overflow=[mv?1:0,hy?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[og(t,i,a,r),og(n,s,l,o)]}(t._bounds,t.offset,w),t.delta=ng.sub(t.offset,f),this.computeMovement(),p&&(!t.last||o>32)){t.delta=ng.sub(t.offset,f);const e=t.delta.map(Math.abs);ng.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(lg(lg(lg({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class Sg extends kg{constructor(...e){super(...e),ag(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ng.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ng.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[gg(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Tg=e=>e,Ng={enabled(e=!0){return e},eventOptions(e,t,n){return lg(lg({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return ng.toVector(e)}},from(e){return"function"==typeof e?e:null!=e?ng.toVector(e):void 0},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Tg},threshold(e){return ng.toVector(e,0)}};const Rg=lg(lg({},Ng),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold(e=0){return e},bounds(e={}){if("function"==typeof e)return t=>Rg.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),Ig={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const Mg="undefined"!=typeof window&&window.document&&window.document.createElement;function Pg(){return Mg&&"ontouchstart"in window||Mg&&window.navigator.maxTouchPoints>1}const Og={isBrowser:Mg,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:Pg(),touchscreen:Pg(),pointer:Mg&&"onpointerdown"in window,pointerLock:Mg&&"exitPointerLock"in window.document},Dg={mouse:0,touch:0,pen:8},Ag=lg(lg({},Rg),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&Og.pointerLock,Og.touch&&n?"touch":this.pointerLock?"mouse":Og.pointer&&!o?"pointer":Og.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,Og.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=ng.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(ng.toVector(e)),distance:this.transform(ng.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold(e){return e?lg(lg({},Dg),e):Dg},keyboardDisplacement(e=10){return e}});lg(lg({},Ng),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Og.touch&&Og.gesture)return"gesture";if(Og.touch&&r)return"touch";if(Og.touchscreen){if(Og.pointer)return"pointer";if(Og.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=Cg(xg(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=Cg(xg(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return ng.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return void 0===e?"ctrlKey":e},pinchOnWheel(e=!0){return e}});lg(lg({},Rg),{},{mouseOnly:(e=!0)=>e});const Lg=lg(lg({},Rg),{},{mouseOnly:(e=!0)=>e}),zg=new Map,Bg=new Map;function Fg(e){zg.set(e.key,e.engine),Bg.set(e.key,e.resolver)}const Vg={key:"drag",engine:class extends Sg{constructor(...e){super(...e),ag(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Rg.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=yg(e),n._pointerActive=!0,this.computeValues(wg(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==gg(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const r=yg(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=wg(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=ng.sub(o,t._values),this.computeValues(o)),ng.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=yg(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,i]=t.velocity,[a,s]=t.movement,[l,c]=n.swipe.velocity,[u,d]=n.swipe.distance,f=n.swipe.duration;t.elapsedTimel&&Math.abs(a)>u&&(t.swipe[0]=e),Math.abs(i)>c&&Math.abs(s)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=Ig[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,ng.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in Ig&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:Ag},Hg={key:"hover",engine:class extends Sg{constructor(...e){super(...e),ag(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(wg(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=wg(e);t._movement=t._delta=ng.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:Lg};function jg(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const $g={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=(Og.isBrowser?window:void 0)){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Wg=["target","eventOptions","window","enabled","transform"];function Ug(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=Ug(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class Gg{constructor(e,t){ag(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=cg[e];return e+(n&&n[t]||t)}(t,n),s=lg(lg({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class Yg{constructor(){ag(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class qg{constructor(e){ag(this,"gestures",new Set),ag(this,"_targetEventStore",new Gg(this)),ag(this,"gestureEventStores",{}),ag(this,"gestureTimeoutStores",{}),ag(this,"handlers",{}),ag(this,"config",{}),ag(this,"pointerIds",new Set),ag(this,"touchIds",new Set),ag(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&Kg(e,"drag");t.wheel&&Kg(e,"wheel");t.scroll&&Kg(e,"scroll");t.move&&Kg(e,"move");t.pinch&&Kg(e,"pinch");t.hover&&Kg(e,"hover")}(this,e)}setEventIds(e){return hg(e)?(this.touchIds=new Set(bg(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:a,enabled:s,transform:l}=r,c=jg(r,Wg);if(n.shared=Ug({target:o,eventOptions:i,window:a,enabled:s,transform:l},$g),t){const e=Bg.get(t);n[t]=Ug(lg({shared:n.shared},c),e)}else for(const e in c){const t=Bg.get(e);t&&(n[e]=Ug(lg({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=Xg(n,o.eventOptions,!!r);if(o.enabled){new(zg.get(t))(this,e,t).bind(i)}}const o=Xg(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](lg(lg({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Eg(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=mg(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function Kg(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Gg(e,t),e.gestureTimeoutStores[t]=new Yg}const Xg=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,c;const u=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(c=a.passive)&&void 0!==c?c:t.passive;let f=s?r:fg(r,o,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Zg(e,t={},n,r){const o=y().useMemo((()=>new qg(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),y().useEffect(o.effect.bind(o)),y().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}const Jg=e=>e,Qg={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},ev="CHANGE",tv="COMMIT",nv="CONTROL",rv="DRAG_END",ov="DRAG_START",iv="DRAG",av="INVALIDATE",sv="PRESS_DOWN",lv="PRESS_ENTER",cv="PRESS_UP",uv="RESET";function dv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qg;const{value:t}=e;return{...Qg,...e,initialValue:t}}function fv(e){return(t,n)=>{const r={...t};switch(n.type){case nv:return r.value=n.payload.value,r.isDirty=!1,r._event=void 0,r;case cv:case sv:r.isDirty=!1;break;case ov:r.isDragging=!0;break;case rv:r.isDragging=!1;break;case ev:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case tv:r.value=n.payload.value,r.isDirty=!1;break;case uv:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case av:r.error=n.payload.error}return r._event=n.payload.event,e(r,n)}}const pv=()=>{};const mv=(0,s.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:l=!1,isFocused:c,isPressEnterToChange:u=!1,onBlur:d=pv,onChange:f=pv,onDrag:p=pv,onDragEnd:m=pv,onDragStart:h=pv,onFocus:g=pv,onKeyDown:v=pv,onValidate:b=pv,size:y="default",setIsFocused:w,stateReducer:x=(e=>e),value:_,type:E,...C}=e;const{state:k,change:S,commit:T,drag:N,dragEnd:R,dragStart:I,invalidate:M,pressDown:P,pressEnter:O,pressUp:D,reset:A}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jg,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qg,n=arguments.length>2?arguments[2]:void 0;const[r,o]=(0,s.useReducer)(fv(e),dv(t)),i=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},a=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},c=i(ev),u=(e,t)=>o({type:av,payload:{error:e,event:t}}),d=i(uv),f=i(tv),p=l(ov),m=l(iv),h=l(rv),g=a(cv),v=a(sv),b=a(lv),y=(0,s.useRef)(r),w=(0,s.useRef)({value:t.value,onChangeHandler:n});return(0,s.useLayoutEffect)((()=>{y.current=r,w.current={value:t.value,onChangeHandler:n}})),(0,s.useLayoutEffect)((()=>{var e;void 0===y.current._event||r.value===w.current.value||r.isDirty||w.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:y.current._event})}),[r.value,r.isDirty]),(0,s.useLayoutEffect)((()=>{var e;t.value===y.current.value||y.current.isDirty||o({type:nv,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:c,commit:f,dispatch:o,drag:m,dragEnd:h,dragStart:p,invalidate:u,pressDown:v,pressEnter:b,pressUp:g,reset:d,state:r}}(x,{isDragEnabled:l,value:_,isPressEnterToChange:u},f),{value:L,isDragging:z,isDirty:B}=k,F=(0,s.useRef)(!1),V=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,s.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(z,r),H=e=>{const t=e.currentTarget.value;try{b(t),T(t,e)}catch(t){M(t,e)}},j=($=e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return m(e),void R(e);p(e),N(e),z||(h(e),I(e))}},W={axis:"e"===r||"w"===r?"x":"y",threshold:o,enabled:l,pointer:{capture:!1}},Fg(Vg),Zg({drag:$},W||{},"drag"));var $,W;const U=l?j():{};let G;return"number"===E&&(G=e=>{var t;null===(t=C.onMouseDown)||void 0===t||t.call(C,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,s.createElement)(Wh,a({},C,U,{className:"components-input-control__input",disabled:n,dragCursor:V,isDragging:z,id:i,onBlur:e=>{d(e),null==w||w(!1),!B&&e.target.validity.valid||(F.current=!0,H(e))},onChange:e=>{const t=e.target.value;S(t,e)},onFocus:e=>{g(e),null==w||w(!0)},onKeyDown:e=>{const{key:t}=e;switch(v(e),t){case"ArrowUp":D(e);break;case"ArrowDown":P(e);break;case"Enter":O(e),u&&(e.preventDefault(),H(e));break;case"Escape":u&&B&&(e.preventDefault(),A(_,e))}},onMouseDown:G,ref:t,inputSize:y,value:null!=L?L:"",type:E}))}));var hv=mv,gv={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function vv(e){return(0,ec.get)(gv,e,"")}const bv={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const yv=Qu("div",{target:"ej5x27r4"})("font-family:",vv("default.fontFamily"),";font-size:",vv("default.fontSize"),";",bv,";"),wv=Qu("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&$f("margin-bottom:",qm(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),xv=$f(Ih,";display:inline-block;margin-bottom:",qm(2),";padding:0;",""),_v=Qu("label",{target:"ej5x27r2"})(xv,";");var Ev={name:"11yad0w",styles:"margin-bottom:revert"};const Cv=Qu("p",{target:"ej5x27r1"})("margin-top:",qm(2),";margin-bottom:0;font-size:",vv("helpText.fontSize"),";font-style:normal;color:",kp.gray[700],";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Ev}),";"),kv=Qu("span",{target:"ej5x27r0"})(xv,";"),Sv=e=>{let{__nextHasNoMarginBottom:t=!1,id:n,label:r,hideLabelFromVision:o=!1,help:i,className:a,children:l}=e;return(0,s.createElement)(yv,{className:c()("components-base-control",a)},(0,s.createElement)(wv,{className:"components-base-control__field",__nextHasNoMarginBottom:t},r&&n&&(o?(0,s.createElement)(nd,{as:"label",htmlFor:n},r):(0,s.createElement)(_v,{className:"components-base-control__label",htmlFor:n},r)),r&&!n&&(o?(0,s.createElement)(nd,{as:"label"},r):(0,s.createElement)(Sv.VisualLabel,null,r)),l),!!i&&(0,s.createElement)(Cv,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},i))};Sv.VisualLabel=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)(kv,a({},r,{className:c()("components-base-control__label",t)}),n)};var Tv=Sv;const Nv=()=>{};const Rv=(0,s.forwardRef)((function(e,t){let{__next36pxDefaultSize:n,__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:l=!1,help:u,hideLabelFromVision:f=!1,id:p,isPressEnterToChange:m=!1,label:h,labelPosition:g="top",onChange:v=Nv,onValidate:b=Nv,onKeyDown:y=Nv,prefix:w,size:x="default",style:_,suffix:E,value:C,...k}=e;const[S,T]=(0,s.useState)(!1),N=function(e){const t=(0,d.useInstanceId)(Rv);return e||`inspector-input-control-${t}`}(p),R=c()("components-input-control",i),I=function(e){const t=(0,s.useRef)(e.value),[n,r]=(0,s.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,s.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{var n;r({}),null===(n=e.onBlur)||void 0===n||n.call(e,t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:C,onBlur:k.onBlur,onChange:v}),M=u?{["string"==typeof u?"aria-describedby":"aria-details"]:`${N}__help`}:{};return(0,s.createElement)(Tv,{className:R,help:u,id:N,__nextHasNoMarginBottom:!0},(0,s.createElement)(tg,{__next36pxDefaultSize:n,__unstableInputWidth:o,disabled:l,gap:3,hideLabelFromVision:f,id:N,isFocused:S,justify:"left",label:h,labelPosition:g,prefix:w,size:x,style:_,suffix:E},(0,s.createElement)(hv,a({},k,M,{__next36pxDefaultSize:n,className:"components-input-control__input",disabled:l,id:N,isFocused:S,isPressEnterToChange:m,onKeyDown:y,onValidate:b,paddingInlineStart:w?qm(2):void 0,paddingInlineEnd:E?qm(2):void 0,ref:t,setIsFocused:T,size:x,stateReducer:r},I))))}));var Iv=Rv;var Mv={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const Pv=e=>{let{hideHTMLArrows:t}=e;return t?Mv:""},Ov=Qu(Iv,{target:"ep09it41"})(Pv,";"),Dv=e=>{let{size:t}=e;return"small"!==t?"":$f("width:",qm(5),";min-width:",qm(5),";height:",qm(5),";","")},Av=Qu(id,{target:"ep09it40"})("&&&&&{color:",kp.ui.theme,";",Dv,";}");function Lv(e){const t=Number(e);return isNaN(t)?0:t}function zv(){for(var e=arguments.length,t=new Array(e),n=0;ne+Lv(t)),0)}function Bv(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Fv(e,t,n){const r=Lv(e);return Math.max(t,Math.min(r,n))}function Vv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=Lv(e),i=Lv(r),a=Bv(r),s=Math.round(o/i)*i,l=Fv(s,t,n);return a?Lv(l.toFixed(a)):l}const Hv={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},jv={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function $v(e){return"string"==typeof e?[e]:s.Children.toArray(e).filter((e=>(0,s.isValidElement)(e)))}function Wv(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Hu(e,"HStack"),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if(!Jm(e))return{};const n="column"===t?jv:Hv;return e in n?n[e]:{align:e}}(t,r),c=$v(n).map(((e,t)=>{if(Uu(e,["Spacer"])){const n=e,r=n.key||`hstack-${t}`;return(0,s.createElement)(jm,a({isBlock:!0,key:r},n.props))}return e}));return Km({children:c,direction:r,justify:"center",...l,...i,gap:o})}var Uv=ju((function(e,t){const n=Wv(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"HStack");const Gv=e=>null!=e;const Yv=ju((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:f,paddingTop:p,paddingX:m,paddingY:h,...g}=Hu(e,"Spacer");return{...g,className:Vu()(Gv(n)&&$f("margin:",qm(n),";",""),Gv(l)&&$f("margin-bottom:",qm(l),";margin-top:",qm(l),";",""),Gv(s)&&$f("margin-left:",qm(s),";margin-right:",qm(s),";",""),Gv(a)&&$f("margin-top:",qm(a),";",""),Gv(r)&&$f("margin-bottom:",qm(r),";",""),Gv(o)&&zh({marginLeft:qm(o)})(),Gv(i)&&zh({marginRight:qm(i)})(),Gv(c)&&$f("padding:",qm(c),";",""),Gv(h)&&$f("padding-bottom:",qm(h),";padding-top:",qm(h),";",""),Gv(m)&&$f("padding-left:",qm(m),";padding-right:",qm(m),";",""),Gv(p)&&$f("padding-top:",qm(p),";",""),Gv(u)&&$f("padding-bottom:",qm(u),";",""),Gv(d)&&zh({paddingLeft:qm(d)})(),Gv(f)&&zh({paddingRight:qm(f)})(),t)}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Spacer");var qv=Yv;const Kv=()=>{};const Xv=(0,s.forwardRef)((function(e,t){let{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:l="native",isDragEnabled:f=!0,isShiftStepEnabled:p=!0,label:m,max:h=1/0,min:g=-1/0,required:v=!1,shiftStep:b=10,step:y=1,type:w="number",value:x,size:_="default",suffix:E,onChange:C=Kv,...k}=e;i&&(Kl()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"}),l="none");const S=(0,s.useRef)(),T=(0,d.useMergeRefs)([S,t]),N="any"===y,R=N?1:eh(y),I=Vv(0,g,h,R),M=(e,t)=>N?Math.min(h,Math.max(g,eh(e))):Vv(e,g,h,null!=t?t:R),P="number"===w?"off":void 0,O=c()("components-number-control",r),D=(e,t,n)=>{null==n||n.preventDefault();const r=(null==n?void 0:n.shiftKey)&&p,o=r?eh(b)*R:R;let i=function(e){const t=""===e;return!Jm(e)||t}(e)?I:e;return"up"===t?i=zv(i,o):"down"===t&&(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=Lv(t);return 0===n?r:e-r}),0)}(i,o)),M(i,r?o:void 0)},A=e=>t=>C(String(D(x,e,t)),{event:{...t,target:S.current}});return(0,s.createElement)(Ov,a({autoComplete:P,inputMode:"numeric"},k,{className:O,dragDirection:o,hideHTMLArrows:"native"!==l,isDragEnabled:f,label:m,max:h,min:g,ref:T,required:v,step:y,type:w,value:x,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,a=i.event,s=n.value;if(r!==cv&&r!==sv||(n.value=D(s,r===cv?"up":"down",a)),r===iv&&f){const[e,t]=i.delta,r=i.shiftKey&&p,a=r?eh(b)*R:R;let l,c;switch(o){case"n":c=t,l=-1;break;case"e":c=e,l=(0,u.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,u.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=M(zv(s,e),r?a:void 0)}}if(r===lv||r===tv){const e=!1===v&&""===s;n.value=e?s:M(s)}return n})(e,t);return null!==(r=null==n?void 0:n(i,t))&&void 0!==r?r:i},size:_,suffix:"custom"===l?(0,s.createElement)(s.Fragment,null,E,(0,s.createElement)(qv,{marginBottom:0,marginRight:2},(0,s.createElement)(Uv,{spacing:1},(0,s.createElement)(Av,{icon:$m,isSmall:!0,"aria-hidden":"true","aria-label":(0,u.__)("Increment"),tabIndex:-1,onClick:A("up"),size:_}),(0,s.createElement)(Av,{icon:Wm,isSmall:!0,"aria-hidden":"true","aria-label":(0,u.__)("Decrement"),tabIndex:-1,onClick:A("down"),size:_})))):E,onChange:C}))}));var Zv=Xv;const Jv=e=>{let{__nextHasNoMarginBottom:t}=e;return t?"":$f("margin-bottom:",qm(2),";","")},Qv=Qu(Xm,{target:"e65ony43"})(Jv,";"),eb=Qu("div",{target:"e65ony42"})("border-radius:50%;border:",ph.borderWidth," solid ",kp.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),tb=Qu("div",{target:"e65ony41"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),nb=Qu("div",{target:"e65ony40"})("background:",kp.ui.theme,";border-radius:50%;border:",3,"px solid ",kp.ui.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");var rb=function(e){let{value:t,onChange:n,...r}=e;const o=(0,s.useRef)(),i=(0,s.useRef)(),l=(0,s.useRef)(),c=e=>{const{x:t,y:r}=i.current;e.preventDefault(),e.target.focus(),n(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(t,r,e.clientX,e.clientY))},{startDrag:u,isDragging:f}=(0,d.__experimentalUseDragging)({onDragStart:e=>{(()=>{const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),c(e)},onDragMove:c,onDragEnd:c});return(0,s.useEffect)((()=>{f?(void 0===l.current&&(l.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=l.current||null,l.current=void 0)}),[f]),(0,s.createElement)(eb,a({ref:o,onMouseDown:u,className:"components-angle-picker-control__angle-circle",style:f?{cursor:"grabbing"}:void 0},r),(0,s.createElement)(tb,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,s.createElement)(nb,{className:"components-angle-picker-control__angle-circle-indicator"})))};function ob(e){let{__nextHasNoMarginBottom:t=!1,className:n,label:r=(0,u.__)("Angle"),onChange:o,value:i}=e;t||Kl()("Bottom margin styles for wp.components.AnglePickerControl",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const a=c()("components-angle-picker-control",n);return(0,s.createElement)(Qv,{__nextHasNoMarginBottom:t,className:a,gap:4},(0,s.createElement)(Hm,null,(0,s.createElement)(Zv,{label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;o(t)},size:"__unstable-large",step:"1",value:i,spinControls:"none",suffix:(0,s.createElement)(qv,{as:Rh,marginBottom:0,marginRight:qm(3),style:{color:kp.ui.theme}},"°")})),(0,s.createElement)(jm,{style:{marginBottom:qm(1),marginTop:"auto"}},(0,s.createElement)(rb,{"aria-hidden":"true",value:i,onChange:o})))}var ib=n(4793),ab=n.n(ib),sb=window.wp.richText,lb=window.wp.a11y;const cb=new RegExp(`[${["-","~","­","֊","־","᐀","᠆","‐","‑","‒","–","—","―","⁓","⁻","₋","−","⸗","⸺","⸻","〜","〰","゠","︱","︲","﹘","﹣","-"].join("")}]`,"g"),ub=e=>ab()(e).toLocaleLowerCase().replace(cb,"-");function db(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function fb(e){return t=>{const[n,r]=(0,s.useState)([]);return(0,s.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,d.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+db(t),"i");r(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=[];for(let o=0;oe.test(ab()(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}function pb(e){const t=e.useItems?e.useItems:fb(e);return function(e){let{filterValue:n,instanceId:r,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:l,onSelect:u,onReset:d,reset:f,value:p,contentRef:m}=e;const[h]=t(n),g=(0,sb.useAnchor)({editableContentElement:m.current,value:p}),v=(0,s.useRef)();return function(e,t){(0,s.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[t])}(v,f),(0,s.useLayoutEffect)((()=>{l(h)}),[h]),!h.length>0?null:(0,s.createElement)(If,{focusOnMount:!1,onClose:d,placement:"top-start",className:"components-autocomplete__popover",anchor:g,ref:v},(0,s.createElement)("div",{id:o,role:"listbox",className:"components-autocomplete__results"},h.map(((e,t)=>(0,s.createElement)(id,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>u(e)},e.label)))))}}function mb(e){let{record:t,onChange:n,onReplace:r,completers:o,contentRef:i}=e;const a=(0,d.useDebounce)(lb.speak,500),l=(0,d.useInstanceId)(mb),[c,f]=(0,s.useState)(0),[p,m]=(0,s.useState)([]),[h,g]=(0,s.useState)(""),[v,b]=(0,s.useState)(null),[y,w]=(0,s.useState)(null),x=(0,s.useRef)(!1);function _(e){const{getOptionCompletion:o}=v||{};if(!e.isDisabled){if(o){const i=o(e.value,h),{action:a,value:l}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void r([l]);"insert-at-caret"===a&&function(e){const r=t.start,o=r-v.triggerPrefix.length-h.length,i=(0,sb.create)({html:(0,s.renderToString)(e)});n((0,sb.insert)(t,i,o,r))}(l)}E()}}function E(){f(0),m([]),g(""),b(null),w(null)}const C=(0,s.useMemo)((()=>{if((0,sb.isCollapsed)(t))return(0,sb.getTextContent)((0,sb.slice)(t,0))}),[t]);(0,s.useEffect)((()=>{if(!C)return void E();const e=ab()(C),n=(0,sb.getTextContent)((0,sb.slice)(t,void 0,(0,sb.getTextContent)(t).length)),r=null==o?void 0:o.find((t=>{let{triggerPrefix:r,allowContext:o}=t;const i=e.lastIndexOf(r);if(-1===i)return!1;const a=e.slice(i+r.length);if(a.length>50)return!1;const s=0===p.length,l=1===a.split(/\s/).length,c=x.current&&a.split(/\s/).length<=3;return!(s&&!c&&!l)&&(!(o&&!o(e.slice(0,i),n))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)))}));if(!r)return void E();const i=db(r.triggerPrefix),a=e.slice(e.lastIndexOf(r.triggerPrefix)).match(new RegExp(`${i}([\0-￿]*)$`)),s=a&&a[1];b(r),w((()=>r!==v?pb(r):y)),g(s)}),[C]);const{key:k=""}=p[c]||{},{className:S}=v||{},T=!!v&&p.length>0,N=T?`components-autocomplete-listbox-${l}`:null;return{listBoxId:N,activeId:T?`components-autocomplete-item-${l}-${k}`:null,onKeyDown:function(e){if(x.current="Backspace"===e.key,v&&0!==p.length&&!e.defaultPrevented&&!e.isComposing&&229!==e.keyCode){switch(e.key){case"ArrowUp":f((0===c?p.length:c)-1);break;case"ArrowDown":f((c+1)%p.length);break;case"Escape":b(null),w(null),e.preventDefault();break;case"Enter":_(p[c]);break;case"ArrowLeft":case"ArrowRight":return void E();default:return}e.preventDefault()}},popover:void 0!==t.start&&y&&(0,s.createElement)(y,{className:S,filterValue:h,instanceId:l,listBoxId:N,selectedIndex:c,onChangeOptions:function(e){f(e.length===p.length?c:0),m(e),function(e){a&&(e.length?a((0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):a((0,u.__)("No results."),"assertive"))}(e)},onSelect:_,value:t,contentRef:i,reset:E})}}function hb(e){const[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(),o=(0,s.useRef)(),i=(0,s.useRef)(),{popover:a,listBoxId:l,activeId:c,onKeyDown:u}=mb({...e,contentRef:r});i.current=u,(0,s.useEffect)((()=>{t&&(o.current?o.current.start===e.record.start&&o.current.end===e.record.end||(n(!1),o.current=null):o.current=e.record)}),[e.record]);const f=(0,d.useMergeRefs)([r,(0,d.useRefEffect)((e=>{function t(e){i.current(e)}function r(){n(!0),o.current=null}return e.addEventListener("keydown",t),e.addEventListener("input",r),()=>{e.removeEventListener("keydown",t),e.removeEventListener("input",r)}}),[])]);return t?{ref:f,children:a,"aria-autocomplete":l?"list":void 0,"aria-owns":l,"aria-activedescendant":c}:{ref:f}}function gb(e){let{children:t,isSelected:n,...r}=e;const{popover:o,...i}=mb(r);return(0,s.createElement)(s.Fragment,null,t(i),n&&o)}function vb(e){const{help:t,id:n,...r}=e,o=(0,d.useInstanceId)(Tv,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{["string"==typeof t?"aria-describedby":"aria-details"]:`${o}__help`}:{}}}}var bb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var yb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const wb=$f("",""),xb={name:"bjn8wh",styles:"position:relative"},_b=e=>{const{color:t=kp.gray[200],style:n="solid",width:r=ph.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==ph.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Eb={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Cb(e){const{className:t,size:n="default",...r}=Hu(e,"BorderBoxControlLinkedButton"),o=Vu();return{...r,className:(0,s.useMemo)((()=>o((e=>$f("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",zh({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}var kb=ju(((e,t)=>{const{className:n,isLinked:r,...o}=Cb(e),i=r?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,s.createElement)(zf,{text:i},(0,s.createElement)(td,{className:n},(0,s.createElement)(id,a({},o,{isSmall:!0,icon:r?bb:yb,iconSize:24,"aria-label":i,ref:t}))))}),"BorderBoxControlLinkedButton");function Sb(e){const{className:t,value:n,size:r="default",...o}=Hu(e,"BorderBoxControlVisualizer"),i=Vu(),a=(0,s.useMemo)((()=>i(((e,t)=>$f("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",_b(null==e?void 0:e.top),";border-bottom:",_b(null==e?void 0:e.bottom),";",zh({borderLeft:_b(null==e?void 0:e.left)})()," ",zh({borderRight:_b(null==e?void 0:e.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:a,value:n}}var Tb=ju(((e,t)=>{const{value:n,...r}=Sb(e);return(0,s.createElement)(td,a({},r,{ref:t}))}),"BorderBoxControlVisualizer");var Nb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var Rb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 11.25h14v1.5H5z"}));var Ib=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var Mb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const Pb=Qu(Zv,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",qh,"{transition:box-shadow 0.1s linear;}}"),Ob=e=>{let{selectSize:t}=e;const n={default:$f("box-sizing:border-box;padding:2px 1px;width:20px;color:",kp.gray[800],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),large:$f("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",qm(2),";padding:",qm(1),";color:",kp.ui.theme,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")};return"__unstable-large"===t?n.large:n.default},Db=Qu("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",Ob,";color:",kp.gray[900],";}"),Ab=Qu("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",Ob,";",(e=>{let{selectSize:t="default"}=e;const n={default:$f("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",zh({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",kp.gray[100],";}&:focus{border:1px solid ",kp.ui.borderFocus,";box-shadow:inset 0 0 0 ",ph.borderWidth+" "+kp.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),large:$f("display:flex;justify-content:center;align-items:center;&:hover{color:",kp.ui.borderFocus,";box-shadow:inset 0 0 0 ",ph.borderWidth+" "+kp.ui.borderFocus,";outline:",ph.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",ph.borderWidthFocus+" "+kp.ui.borderFocus,";outline:",ph.borderWidthFocus," solid transparent;}","")};return"__unstable-large"===t?n.large:n.default}),";&:not( :disabled ){cursor:pointer;}}");const Lb={name:"f3vz0n",styles:"font-weight:500"},zb=$f("box-shadow:inset 0 0 0 ",ph.borderWidth," ",kp.ui.borderFocus,";",""),Bb=$f("border:0;padding:0;margin:0;",bv,";",""),Fb=$f(Pb,"{flex:0 0 auto;}",""),Vb=(e,t)=>{const{style:n}=e||{};return $f("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?kp.gray[300]:void 0;return $f("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",qm(4),";width:",qm(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},Hb=$f("width:",228,"px;>div:first-of-type>",_v,"{margin-bottom:0;",Lb,";}&& ",_v,"+button:not( .has-text ){min-width:24px;padding:0;}",""),jb=$f("",""),$b=$f("",""),Wb=$f("justify-content:center;width:100%;&&{border-top:",ph.borderWidth," solid ",kp.gray[200],";border-top-left-radius:0;border-top-right-radius:0;height:46px;}",""),Ub=$f(_v,"{",Lb,";}",""),Gb={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const Yb=[{label:(0,u.__)("Solid"),icon:Rb,value:"solid"},{label:(0,u.__)("Dashed"),icon:Ib,value:"dashed"},{label:(0,u.__)("Dotted"),icon:Mb,value:"dotted"}],qb=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"label"},t):(0,s.createElement)(_v,null,t):null};var Kb=ju(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:r,label:o,onChange:i,value:l,...c}=function(e){const{className:t,...n}=Hu(e,"BorderControlStylePicker"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(Ub,t)),[t,r]),buttonClassName:(0,s.useMemo)((()=>r(Gb)),[r])}}(e);return(0,s.createElement)(td,a({},c,{ref:t}),(0,s.createElement)(qb,{label:o,hideLabelFromVision:r}),(0,s.createElement)(Xm,{justify:"flex-start",gap:1},Yb.map((e=>(0,s.createElement)(id,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===l,onClick:()=>i(e.value===l?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker");var Xb=(0,s.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,s.createElement)("span",a({className:c()("component-color-indicator",n),style:{background:r},ref:t},o))})),Zb=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Jb=function(e){return.2126*Zb(e.r)+.7152*Zb(e.g)+.0722*Zb(e.b)};function Qb(e){e.prototype.luminance=function(){return e=Jb(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,r,o,i,a,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(s=Jb(i))>(l=Jb(a))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}const ey=(0,s.forwardRef)((function(e,t){let{renderContent:n,renderToggle:r,className:o,contentClassName:i,expandOnMobile:l,headerTitle:u,focusOnMount:f,popoverProps:p,onClose:m,onToggle:h,style:g,position:v}=e;void 0!==v&&Kl()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[b,y]=(0,s.useState)(null),w=(0,s.useRef)(),[x,_]=function(e,t){const[n,r]=(0,s.useState)(e);return[n,e=>{r(e),t&&t(e)}]}(!1,h);function E(){m&&m(),_(!1)}(0,s.useEffect)((()=>()=>{h&&x&&h(!1)}),[h,x]);const C={isOpen:x,onToggle:function(){_(!x)},onClose:E},k=!!(null!=p&&p.anchor||null!=p&&p.anchorRef||null!=p&&p.getAnchorRect||null!=p&&p.anchorRect);return(0,s.createElement)("div",{className:c()("components-dropdown",o),ref:(0,d.useMergeRefs)([w,t,y]),tabIndex:-1,style:g},r(C),x&&(0,s.createElement)(If,a({position:v,onClose:E,onFocusOutside:function(){var e;if(!w.current)return;const{ownerDocument:t}=w.current,n=null==t||null===(e=t.activeElement)||void 0===e?void 0:e.closest('[role="dialog"]');w.current.contains(t.activeElement)||n&&!n.contains(w.current)||E()},expandOnMobile:l,headerTitle:u,focusOnMount:f,offset:13,anchor:k?void 0:b},p,{className:c()("components-dropdown__content",null==p?void 0:p.className,i)}),n(C)))}));var ty=ey;var ny=ju((function(e,t){const n=Hu(e,"InputControlSuffixWrapper");return(0,s.createElement)(qv,a({marginBottom:0},n,{ref:t}))}),"InputControlSuffixWrapper");const ry=Qu("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",kp.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;",(e=>{let{disabled:t}=e;return t?$f({color:kp.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t="default"}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"}[t];return n?$f("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:r="default"}=e;if(n)return;const o={default:{height:36,minHeight:36,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};t||(o.default={height:30,minHeight:30,paddingTop:0,paddingBottom:0});return $f(o[r]||o.default,"","")}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:r="default"}=e;const o={default:16,small:8,"__unstable-large":16};t||(o.default=8);const i=o[r]||o.default;return zh({paddingLeft:i,paddingRight:i+18,...n?{paddingTop:i,paddingBottom:i}:{}})}),";",(e=>{let{multiple:t}=e;return{overflow:t?"auto":"hidden"}}),";}"),oy=Qu("div",{target:"e1mv6sxx1"})("margin-inline-end:",qm(-1),";line-height:0;"),iy=Qu(ny,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",zh({right:0}),";");var ay=function(e){let{icon:t,size:n=24,...r}=e;return(0,s.cloneElement)(t,{width:n,height:n,...r})};var sy=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var ly=()=>(0,s.createElement)(iy,null,(0,s.createElement)(oy,null,(0,s.createElement)(ay,{icon:sy,size:18})));const cy=()=>{};const uy=(0,s.forwardRef)((function(e,t){let{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:l,label:u,multiple:f=!1,onBlur:p=cy,onChange:m=cy,onFocus:h=cy,options:g=[],size:v="default",value:b,labelPosition:y="top",children:w,prefix:x,suffix:_,__next36pxDefaultSize:E=!1,__nextHasNoMarginBottom:C=!1,...k}=e;const[S,T]=(0,s.useState)(!1),N=function(e){const t=(0,d.useInstanceId)(uy);return e||`inspector-select-control-${t}`}(l),R=o?`${N}__help`:void 0;if(!(null!=g&&g.length||w))return null;const I=c()("components-select-control",n);return(0,s.createElement)(Tv,{help:o,id:N,__nextHasNoMarginBottom:C},(0,s.createElement)(tg,{className:I,disabled:r,hideLabelFromVision:i,id:N,isFocused:S,label:u,size:v,suffix:_||!f&&(0,s.createElement)(ly,null),prefix:x,labelPosition:y,__next36pxDefaultSize:E},(0,s.createElement)(ry,a({},k,{__next36pxDefaultSize:E,"aria-describedby":R,className:"components-select-control__input",disabled:r,id:N,multiple:f,onBlur:e=>{p(e),T(!1)},onChange:e=>{if(f){const t=Array.from(e.target.options).filter((e=>{let{selected:t}=e;return t})),n=t.map((e=>{let{value:t}=e;return t}));m(n)}else m(e.target.value,{event:e})},onFocus:e=>{h(e),T(!0)},ref:t,selectSize:v,value:b}),w||g.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,s.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))}));var dy=uy;const fy={initial:void 0,fallback:""};var py=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fy;const{initial:n,fallback:r}={...fy,...t},[o,i]=(0,s.useState)(e),a=Jm(e);(0,s.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]);const l=Qm([e,o,n],r),c=(0,s.useCallback)((e=>{a||i(e)}),[a]);return[l,c]};function my(e,t,n){return"number"!=typeof e?null:parseFloat(`${Fv(e,t,n)}`)}const hy=()=>$f({height:30,minHeight:30},"",""),gy=12,vy=Qu("div",{target:"e1epgpqk14"})({name:"1se47kl",styles:"-webkit-tap-highlight-color:transparent;align-items:flex-start;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),by=Qu("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=kp.ui.borderFocus}=e;return $f({color:t},"","")}),";",hy,";",(e=>{let{marks:t,__nextHasNoMarginBottom:n}=e;return n?"":$f({marginBottom:t?16:void 0},"","")}),";"),yy=Qu("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",zh({marginRight:6}),";"),wy=Qu("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",zh({marginLeft:6}),";"),xy=Qu("span",{target:"e1epgpqk10"})("background-color:",kp.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||"";return t&&(r=kp.ui.backgroundDisabled),$f({background:r},"","")}),";"),_y=Qu("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=kp.gray[400]),$f({background:r},"","")}),";"),Ey=Qu("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),Cy=Qu("span",{target:"e1epgpqk7"})("height:",gy,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":kp.gray[300];return t&&(r=kp.gray[400]),$f({backgroundColor:r},"","")}),";"),ky=Qu("span",{target:"e1epgpqk6"})("color:",kp.gray[300],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return $f({color:t?kp.gray[700]:kp.gray[300]},"","")}),";"),Sy=e=>{let{disabled:t}=e;return $f("background-color:",t?kp.gray[400]:kp.ui.theme,";","")},Ty=Qu("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",gy,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",gy,"px;border-radius:50%;",Sy,";",zh({marginLeft:-10}),";",zh({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Ny=Qu("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",Sy,";",(e=>{let{isFocused:t}=e;return t?$f("&::before{content:' ';position:absolute;background-color:",kp.ui.theme,";opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),Ry=Qu("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",gy,"px );");var Iy={name:"1cypxip",styles:"top:-80%"},My={name:"1lr98c4",styles:"bottom:-80%"};const Py=Qu("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return $f({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?My:Iy}),";",Sp("transition"),";",zh({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),Oy=Qu(Zv,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;width:",qm(16),"!important;input[type='number']&{",hy,";}",zh({marginLeft:`${qm(4)} !important`}),";"),Dy=Qu("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",hy,";}",zh({marginLeft:8}),";");var Ay=(0,s.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,s.createElement)(Ry,a({},i,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o}))}));function Ly(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,l=c()("components-range-control__mark",n&&"is-filled",t),u=c()("components-range-control__mark-label",n&&"is-filled");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Cy,a({},i,{"aria-hidden":"true",className:l,isFilled:n,style:o})),r&&(0,s.createElement)(ky,{"aria-hidden":"true",className:u,isFilled:n,style:o},r))}function zy(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0,...c}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(xy,a({disabled:t},c)),n&&(0,s.createElement)(By,{disabled:t,marks:n,min:r,max:o,step:i,value:l}))}function By(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0}=e,c=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const a=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(a/o);for(;e>t.push({value:o*t.length+n}););}const s=[];return t.forEach(((e,t)=>{if(e.valuer)return;const o=`mark-${t}`,l=e.value<=i,c=(e.value-n)/a*100+"%",d={[(0,u.isRTL)()?"right":"left"]:c};s.push({...e,isFilled:l,key:o,style:d})})),s}({marks:n,min:r,max:o,step:"any"===i?1:i,value:l});return(0,s.createElement)(Ey,{"aria-hidden":"true",className:"components-range-control__marks"},c.map((e=>(0,s.createElement)(Ly,a({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function Fy(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:l=0,renderTooltipContent:u=(e=>e),zIndex:d=100,...f}=e,p=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,s.useState)(),i=(0,s.useCallback)((()=>{t&&t.current&&o(n)}),[n,t]);return(0,s.useEffect)((()=>{i()}),[i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),m=c()("components-simple-tooltip",t),h={...i,zIndex:d};return(0,s.createElement)(Py,a({},f,{"aria-hidden":o,className:m,position:p,show:o,role:"tooltip",style:h}),u(l))}const Vy=()=>{};const Hy=(0,s.forwardRef)((function e(t,n){var r;const{__nextHasNoMarginBottom:o=!1,afterIcon:i,allowReset:l=!1,beforeIcon:f,className:p,color:m=kp.ui.theme,currentInput:h,disabled:g=!1,help:v,hideLabelFromVision:b=!1,initialPosition:y,isShiftStepEnabled:w=!0,label:x,marks:_=!1,max:E=100,min:C=0,onBlur:k=Vy,onChange:S=Vy,onFocus:T=Vy,onMouseLeave:N=Vy,onMouseMove:R=Vy,railColor:I,renderTooltipContent:M=(e=>e),resetFallbackValue:P,shiftStep:O=10,showTooltip:D,step:A=1,trackColor:L,value:z,withInputField:B=!0,...F}=t,[V,H]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,a]=py(my(r,t,n),{initial:my(null!=o?o:null,t,n),fallback:null});return[i,(0,s.useCallback)((e=>{a(null===e?null:my(e,t,n))}),[t,n,a])]}({min:C,max:E,value:null!=z?z:null,initial:y}),j=(0,s.useRef)(!1);let $=D,W=B;"any"===A&&($=!1,W=!1);const[U,G]=(0,s.useState)($),[Y,q]=(0,s.useState)(!1),K=(0,s.useRef)(),X=null===(r=K.current)||void 0===r?void 0:r.matches(":focus"),Z=!g&&Y,J=null===V,Q=J?"":void 0!==V?V:h,ee=J?(E-C)/2+C:V,te=`${Fv(J?50:(V-C)/(E-C)*100,0,100)}%`,ne=c()("components-range-control",p),re=c()("components-range-control__wrapper",!!_&&"is-marked"),oe=(0,d.useInstanceId)(e,"inspector-range-control"),ie=v?`${oe}__help`:void 0,ae=!1!==$&&Number.isFinite(V),se=()=>{let e=parseFloat(`${P}`),t=e;isNaN(e)&&(e=null,t=void 0),H(e),S(t)},le={[(0,u.isRTL)()?"right":"left"]:te};return(0,s.createElement)(Tv,{__nextHasNoMarginBottom:o,className:ne,label:x,hideLabelFromVision:b,id:`${oe}`,help:v},(0,s.createElement)(vy,{className:"components-range-control__root"},f&&(0,s.createElement)(yy,null,(0,s.createElement)(Zl,{icon:f})),(0,s.createElement)(by,{__nextHasNoMarginBottom:o,className:re,color:m,marks:!!_},(0,s.createElement)(Ay,a({},F,{className:"components-range-control__slider",describedBy:ie,disabled:g,id:`${oe}`,label:x,max:E,min:C,onBlur:e=>{k(e),q(!1),G(!1)},onChange:e=>{const t=parseFloat(e.target.value);H(t),S(t)},onFocus:e=>{T(e),q(!0),G(!0)},onMouseMove:R,onMouseLeave:N,ref:(0,d.useMergeRefs)([K,n]),step:A,value:null!=Q?Q:void 0})),(0,s.createElement)(zy,{"aria-hidden":!0,disabled:g,marks:_,max:E,min:C,railColor:I,step:A,value:ee}),(0,s.createElement)(_y,{"aria-hidden":!0,className:"components-range-control__track",disabled:g,style:{width:te},trackColor:L}),(0,s.createElement)(Ty,{style:le,disabled:g},(0,s.createElement)(Ny,{"aria-hidden":!0,isFocused:Z,disabled:g})),ae&&(0,s.createElement)(Fy,{className:"components-range-control__tooltip",inputRef:K,tooltipPosition:"bottom",renderTooltipContent:M,show:X||U,style:le,value:V})),i&&(0,s.createElement)(wy,null,(0,s.createElement)(Zl,{icon:i})),W&&(0,s.createElement)(Oy,{"aria-label":x,className:"components-range-control__number",disabled:g,inputMode:"decimal",isShiftStepEnabled:w,max:E,min:C,onBlur:()=>{j.current&&(se(),j.current=!1)},onChange:e=>{let t=parseFloat(e);H(t),isNaN(t)?l&&(j.current=!0):((tE)&&(t=my(t,C,E)),S(t),j.current=!1)},shiftStep:O,step:A,value:Q}),l&&(0,s.createElement)(Dy,null,(0,s.createElement)(id,{className:"components-range-control__reset",disabled:g||void 0===V,variant:"secondary",isSmall:!0,onClick:se},(0,u.__)("Reset")))))}));var jy=Hy;const $y=Qu(Zv,{target:"ez9hsf47"})(jh,"{width:",qm(24),";}"),Wy=Qu(dy,{target:"ez9hsf46"})("margin-left:",qm(-2),";width:5em;",qh,"{display:none;}"),Uy=Qu(jy,{target:"ez9hsf45"})("flex:1;margin-right:",qm(2),";"),Gy=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${qm(2)} );\n\tmargin-left: ${qm(1)};\n}`,Yy=Qu("div",{target:"ez9hsf44"})("padding-top:",qm(2),";padding-right:0;padding-left:0;padding-bottom:0;"),qy=Qu(Uv,{target:"ez9hsf43"})("padding-left:",qm(4),";padding-right:",qm(4),";"),Ky=Qu(Xm,{target:"ez9hsf42"})("padding-top:",qm(4),";padding-left:",qm(4),";padding-right:",qm(3),";padding-bottom:",qm(5),";"),Xy=Qu("div",{target:"ez9hsf41"})(bv,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;overflow:hidden;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",qm(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",qm(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",ph.borderWidthFocus," #fff;}",Gy,";"),Zy=Qu(id,{target:"ez9hsf40"})("&&&&&{min-width:",qm(6),";padding:0;>svg{margin-right:0;}}");var Jy=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function Qy(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ew(e){return e instanceof Qy(e).Element||e instanceof Element}function tw(e){return e instanceof Qy(e).HTMLElement||e instanceof HTMLElement}function nw(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Qy(e).ShadowRoot||e instanceof ShadowRoot)}var rw=Math.max,ow=Math.min,iw=Math.round;function aw(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function sw(){return!/^((?!chrome|android).)*safari/i.test(aw())}function lw(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&tw(e)&&(o=e.offsetWidth>0&&iw(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&iw(r.height)/e.offsetHeight||1);var a=(ew(e)?Qy(e):window).visualViewport,s=!sw()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function cw(e){var t=Qy(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function uw(e){return e?(e.nodeName||"").toLowerCase():null}function dw(e){return((ew(e)?e.ownerDocument:e.document)||window.document).documentElement}function fw(e){return lw(dw(e)).left+cw(e).scrollLeft}function pw(e){return Qy(e).getComputedStyle(e)}function mw(e){var t=pw(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function hw(e,t,n){void 0===n&&(n=!1);var r=tw(t),o=tw(t)&&function(e){var t=e.getBoundingClientRect(),n=iw(t.width)/e.offsetWidth||1,r=iw(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=dw(t),a=lw(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==uw(t)||mw(i))&&(s=function(e){return e!==Qy(e)&&tw(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:cw(e);var t}(t)),tw(t)?((l=lw(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=fw(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function gw(e){var t=lw(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function vw(e){return"html"===uw(e)?e:e.assignedSlot||e.parentNode||(nw(e)?e.host:null)||dw(e)}function bw(e){return["html","body","#document"].indexOf(uw(e))>=0?e.ownerDocument.body:tw(e)&&mw(e)?e:bw(vw(e))}function yw(e,t){var n;void 0===t&&(t=[]);var r=bw(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Qy(r),a=o?[i].concat(i.visualViewport||[],mw(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(yw(vw(a)))}function ww(e){return["table","td","th"].indexOf(uw(e))>=0}function xw(e){return tw(e)&&"fixed"!==pw(e).position?e.offsetParent:null}function _w(e){for(var t=Qy(e),n=xw(e);n&&ww(n)&&"static"===pw(n).position;)n=xw(n);return n&&("html"===uw(n)||"body"===uw(n)&&"static"===pw(n).position)?t:n||function(e){var t=/firefox/i.test(aw());if(/Trident/i.test(aw())&&tw(e)&&"fixed"===pw(e).position)return null;var n=vw(e);for(nw(n)&&(n=n.host);tw(n)&&["html","body"].indexOf(uw(n))<0;){var r=pw(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Ew="top",Cw="bottom",kw="right",Sw="left",Tw="auto",Nw=[Ew,Cw,kw,Sw],Rw="start",Iw="end",Mw="viewport",Pw="popper",Ow=Nw.reduce((function(e,t){return e.concat([t+"-"+Rw,t+"-"+Iw])}),[]),Dw=[].concat(Nw,[Tw]).reduce((function(e,t){return e.concat([t,t+"-"+Rw,t+"-"+Iw])}),[]),Aw=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Lw(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var zw={placement:"bottom",modifiers:[],strategy:"absolute"};function Bw(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Uw(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?jw(o):null,a=o?$w(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Ew:t={x:s,y:n.y-r.height};break;case Cw:t={x:s,y:n.y+n.height};break;case kw:t={x:n.x+n.width,y:l};break;case Sw:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Ww(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Rw:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Iw:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var Gw={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Uw({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Yw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qw(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,m=a.y,h=void 0===m?0:m,g="function"==typeof u?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Sw,w=Ew,x=window;if(c){var _=_w(n),E="clientHeight",C="clientWidth";if(_===Qy(n)&&"static"!==pw(_=dw(n)).position&&"absolute"===s&&(E="scrollHeight",C="scrollWidth"),o===Ew||(o===Sw||o===kw)&&i===Iw)w=Cw,h-=(d&&_===x&&x.visualViewport?x.visualViewport.height:_[E])-r.height,h*=l?1:-1;if(o===Sw||(o===Ew||o===Cw)&&i===Iw)y=kw,p-=(d&&_===x&&x.visualViewport?x.visualViewport.width:_[C])-r.width,p*=l?1:-1}var k,S=Object.assign({position:s},c&&Yw),T=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:iw(t*r)/r||0,y:iw(n*r)/r||0}}({x:p,y:h}):{x:p,y:h};return p=T.x,h=T.y,l?Object.assign({},S,((k={})[w]=b?"0":"",k[y]=v?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",k)):Object.assign({},S,((t={})[w]=b?h+"px":"",t[y]=v?p+"px":"",t.transform="",t))}var Kw={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:jw(t.placement),variation:$w(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,qw(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,qw(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Xw={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];tw(o)&&uw(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});tw(r)&&uw(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Zw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Dw.reduce((function(e,n){return e[n]=function(e,t,n){var r=jw(e),o=[Sw,Ew].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Sw,kw].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},Jw={left:"right",right:"left",bottom:"top",top:"bottom"};function Qw(e){return e.replace(/left|right|bottom|top/g,(function(e){return Jw[e]}))}var ex={start:"end",end:"start"};function tx(e){return e.replace(/start|end/g,(function(e){return ex[e]}))}function nx(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nw(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ox(e,t,n){return t===Mw?rx(function(e,t){var n=Qy(e),r=dw(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=sw();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+fw(e),y:l}}(e,n)):ew(t)?function(e,t){var n=lw(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):rx(function(e){var t,n=dw(e),r=cw(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=rw(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=rw(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+fw(e),l=-r.scrollTop;return"rtl"===pw(o||n).direction&&(s+=rw(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(dw(e)))}function ix(e,t,n,r){var o="clippingParents"===t?function(e){var t=yw(vw(e)),n=["absolute","fixed"].indexOf(pw(e).position)>=0&&tw(e)?_w(e):e;return ew(n)?t.filter((function(e){return ew(e)&&nx(e,n)&&"body"!==uw(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=ox(e,n,r);return t.top=rw(o.top,t.top),t.right=ow(o.right,t.right),t.bottom=ow(o.bottom,t.bottom),t.left=rw(o.left,t.left),t}),ox(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ax(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function sx(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function lx(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Mw:c,d=n.elementContext,f=void 0===d?Pw:d,p=n.altBoundary,m=void 0!==p&&p,h=n.padding,g=void 0===h?0:h,v=ax("number"!=typeof g?g:sx(g,Nw)),b=f===Pw?"reference":Pw,y=e.rects.popper,w=e.elements[m?b:f],x=ix(ew(w)?w:w.contextElement||dw(e.elements.popper),l,u,a),_=lw(e.elements.reference),E=Uw({reference:_,element:y,strategy:"absolute",placement:o}),C=rx(Object.assign({},y,E)),k=f===Pw?C:_,S={top:x.top-k.top+v.top,bottom:k.bottom-x.bottom+v.bottom,left:x.left-k.left+v.left,right:k.right-x.right+v.right},T=e.modifiersData.offset;if(f===Pw&&T){var N=T[o];Object.keys(S).forEach((function(e){var t=[kw,Cw].indexOf(e)>=0?1:-1,n=[Ew,Cw].indexOf(e)>=0?"y":"x";S[e]+=N[n]*t}))}return S}var cx={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=void 0===p||p,h=n.allowedAutoPlacements,g=t.options.placement,v=jw(g),b=l||(v===g||!m?[Qw(g)]:function(e){if(jw(e)===Tw)return[];var t=Qw(e);return[tx(e),t,tx(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat(jw(n)===Tw?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Dw:l,u=$w(r),d=u?s?Ow:Ow.filter((function(e){return $w(e)===u})):Nw,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=lx(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[jw(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,x=t.rects.popper,_=new Map,E=!0,C=y[0],k=0;k=0,I=R?"width":"height",M=lx(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=R?N?kw:Sw:N?Cw:Ew;w[I]>x[I]&&(P=Qw(P));var O=Qw(P),D=[];if(i&&D.push(M[T]<=0),s&&D.push(M[P]<=0,M[O]<=0),D.every((function(e){return e}))){C=S,E=!1;break}_.set(S,D)}if(E)for(var A=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},L=m?3:1;L>0;L--){if("break"===A(L))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ux(e,t,n){return rw(e,ow(t,n))}var dx={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,m=n.tetherOffset,h=void 0===m?0:m,g=lx(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=jw(t.placement),b=$w(t.placement),y=!b,w=Ww(v),x="x"===w?"y":"x",_=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,k="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(_){if(i){var R,I="y"===w?Ew:Sw,M="y"===w?Cw:kw,P="y"===w?"height":"width",O=_[w],D=O+g[I],A=O-g[M],L=p?-C[P]/2:0,z=b===Rw?E[P]:C[P],B=b===Rw?-C[P]:-E[P],F=t.elements.arrow,V=p&&F?gw(F):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=H[I],$=H[M],W=ux(0,E[P],V[P]),U=y?E[P]/2-L-W-j-S.mainAxis:z-W-j-S.mainAxis,G=y?-E[P]/2+L+W+$+S.mainAxis:B+W+$+S.mainAxis,Y=t.elements.arrow&&_w(t.elements.arrow),q=Y?"y"===w?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(R=null==T?void 0:T[w])?R:0,X=O+G-K,Z=ux(p?ow(D,O+U-K-q):D,O,p?rw(A,X):A);_[w]=Z,N[w]=Z-O}if(s){var J,Q="x"===w?Ew:Sw,ee="x"===w?Cw:kw,te=_[x],ne="y"===x?"height":"width",re=te+g[Q],oe=te-g[ee],ie=-1!==[Ew,Sw].indexOf(v),ae=null!=(J=null==T?void 0:T[x])?J:0,se=ie?re:te-E[ne]-C[ne]-ae+S.altAxis,le=ie?te+E[ne]+C[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=ux(e,t,n);return r>n?n:r}(se,te,le):ux(p?se:re,te,p?le:oe);_[x]=ce,N[x]=ce-te}t.modifiersData[r]=N}},requiresIfExists:["offset"]};var fx={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=jw(n.placement),l=Ww(s),c=[Sw,kw].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return ax("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:sx(e,Nw))}(o.padding,n),d=gw(i),f="y"===l?Ew:Sw,p="y"===l?Cw:kw,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],h=a[l]-n.rects.reference[l],g=_w(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=m/2-h/2,y=u[f],w=v-d[c]-u[p],x=v/2-d[c]/2+b,_=ux(y,x,w),E=l;n.modifiersData[r]=((t={})[E]=_,t.centerOffset=_-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&nx(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function px(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function mx(e){return[Ew,kw,Cw,Sw].some((function(t){return e[t]>=0}))}var hx={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=lx(t,{elementContext:"reference"}),s=lx(t,{altBoundary:!0}),l=px(a,r),c=px(s,o,i),u=mx(l),d=mx(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},gx=Fw({defaultModifiers:[Hw,Gw,Kw,Xw,Zw,cx,dx,fx,hx]});function vx(e){void 0===e&&(e={});var t,n,r=Ap(e),o=r.visible,i=void 0!==o&&o,a=r.animated,s=void 0!==a&&a,l=Hp(h(r,["visible","animated"])),c=(0,b.useState)(i),u=c[0],d=c[1],f=(0,b.useState)(s),p=f[0],g=f[1],v=(0,b.useState)(!1),y=v[0],w=v[1],x=(t=u,n=(0,b.useRef)(null),U((function(){n.current=t}),[t]),n),_=null!=x.current&&x.current!==u;p&&!y&&_&&w(!0),(0,b.useEffect)((function(){if("number"==typeof p&&y){var e=setTimeout((function(){return w(!1)}),p);return function(){clearTimeout(e)}}return function(){}}),[p,y]);var E=(0,b.useCallback)((function(){return d(!0)}),[]),C=(0,b.useCallback)((function(){return d(!1)}),[]),k=(0,b.useCallback)((function(){return d((function(e){return!e}))}),[]),S=(0,b.useCallback)((function(){return w(!1)}),[]);return m(m({},l),{},{visible:u,animated:p,animating:y,show:E,hide:C,toggle:k,setVisible:d,setAnimated:g,stopAnimation:S})}var bx=ee("Mac")&&!ee("Chrome")&&ee("Safari");function yx(e){return function(t){return e&&!A(t,e)?e:t}}function wx(e){void 0===e&&(e={});var t=Ap(e),n=t.gutter,r=void 0===n?12:n,o=t.placement,i=void 0===o?"bottom":o,a=t.unstable_flip,s=void 0===a||a,l=t.unstable_offset,c=t.unstable_preventOverflow,u=void 0===c||c,d=t.unstable_fixed,f=void 0!==d&&d,p=t.modal,g=void 0!==p&&p,v=h(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),y=(0,b.useRef)(null),w=(0,b.useRef)(null),x=(0,b.useRef)(null),_=(0,b.useRef)(null),E=(0,b.useState)(i),C=E[0],k=E[1],S=(0,b.useState)(i),T=S[0],N=S[1],R=(0,b.useState)(l||[0,r])[0],I=(0,b.useState)({position:"fixed",left:"100%",top:"100%"}),M=I[0],P=I[1],O=(0,b.useState)({}),D=O[0],A=O[1],L=function(e){void 0===e&&(e={});var t=Ap(e),n=t.modal,r=void 0===n||n,o=vx(h(t,["modal"])),i=(0,b.useState)(r),a=i[0],s=i[1],l=(0,b.useRef)(null);return m(m({},o),{},{modal:a,setModal:s,unstable_disclosureRef:l})}(m({modal:g},v)),z=(0,b.useCallback)((function(){return!!y.current&&(y.current.forceUpdate(),!0)}),[]),B=(0,b.useCallback)((function(e){e.placement&&N(e.placement),e.styles&&(P(yx(e.styles.popper)),_.current&&A(yx(e.styles.arrow)))}),[]);return U((function(){return w.current&&x.current&&(y.current=gx(w.current,x.current,{placement:C,strategy:f?"fixed":"absolute",onFirstUpdate:bx?B:void 0,modifiers:[{name:"eventListeners",enabled:L.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:s,options:{padding:8}},{name:"offset",options:{offset:R}},{name:"preventOverflow",enabled:u,options:{tetherOffset:function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!_.current,options:{element:_.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:L.visible&&!0,fn:function(e){var t=e.state;return B(t)}}]})),function(){y.current&&(y.current.destroy(),y.current=null)}}),[C,f,L.visible,s,R,u]),(0,b.useEffect)((function(){if(L.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=y.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[L.visible]),m(m({},L),{},{unstable_referenceRef:w,unstable_popoverRef:x,unstable_arrowRef:_,unstable_popoverStyles:M,unstable_arrowStyles:D,unstable_update:z,unstable_originalPlacement:C,placement:T,place:k})}var xx={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};var _x=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],Ex=[].concat(_x,["unstable_portal"]),Cx=F({name:"TooltipReference",compose:re,keys:_x,useProps:function(e,t){var n=t.ref,r=t.onFocus,o=t.onBlur,i=t.onMouseEnter,a=t.onMouseLeave,s=h(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),l=G(r),c=G(o),u=G(i),d=G(a),f=(0,b.useCallback)((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),p=(0,b.useCallback)((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),g=(0,b.useCallback)((function(t){var n,r;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),v=(0,b.useCallback)((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return m({ref:H(e.unstable_referenceRef,n),tabIndex:0,onFocus:f,onBlur:p,onMouseEnter:g,onMouseLeave:v,"aria-describedby":e.baseId},s)}}),kx=z({as:"div",useHook:Cx});const Sx=(0,s.createContext)({});var Tx=F({name:"DisclosureContent",compose:re,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,i=h(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,s=(0,b.useState)(null),l=s[0],c=s[1],u=!e.visible&&!a,d=u?m({display:"none"},o):o,f=G(n),p=G(r),g=(0,b.useRef)(0);(0,b.useEffect)((function(){if(e.animated)return g.current=window.requestAnimationFrame((function(){g.current=window.requestAnimationFrame((function(){e.visible?c("enter"):c(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(g.current)}}),[e.animated,e.visible,a]);var v=(0,b.useCallback)((function(t){var n;Y(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),y=(0,b.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),v(e)}),[v]),w=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),v(e)}),[v]);return m({id:e.baseId,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,onTransitionEnd:y,onAnimationEnd:w,hidden:u,style:d},i)}}),Nx=z({as:"div",useHook:Tx});function Rx(){return W?document.body:null}var Ix=(0,b.createContext)(Rx());function Mx(e){var t=e.children,n=(0,b.useContext)(Ix)||Rx(),r=(0,b.useState)((function(){if(W){var e=document.createElement("div");return e.className=Mx.__className,e}return null}))[0];return U((function(){if(r&&n)return n.appendChild(r),function(){n.removeChild(r)}}),[r,n]),r?(0,It.createPortal)((0,b.createElement)(Ix.Provider,{value:r},t),r):null}function Px(e){e.defaultPrevented||"Escape"===e.key&&xx.show(null)}Mx.__className="__reakit-portal",Mx.__selector="."+Mx.__className;var Ox=F({name:"Tooltip",compose:Tx,keys:Ex,useOptions:function(e){var t=e.unstable_portal;return m({unstable_portal:void 0===t||t},h(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=t.wrapElement,i=h(t,["ref","style","wrapElement"]);(0,b.useEffect)((function(){var t;j(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",Px)}),[]);var a=(0,b.useCallback)((function(t){return e.unstable_portal&&(t=(0,b.createElement)(Mx,null,t)),o?o(t):t}),[e.unstable_portal,o]);return m({ref:H(e.unstable_popoverRef,n),role:"tooltip",style:m(m({},e.unstable_popoverStyles),{},{pointerEvents:"none"},r),wrapElement:a},i)}}),Dx=z({as:"div",memo:!0,useHook:Ox});var Ax=ju((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=Hu(e,"Shortcut");if(!r)return null;let l,c;return"string"==typeof r?l=r:(l=r.display,c=r.ariaLabel),(0,s.createElement)(td,a({as:n,className:o,"aria-label":c,ref:t},i),l)}),"Shortcut");const Lx=$f("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",ph.transitionDurationFastest," ease;font-size:",ph.fontSize,";&[data-enter]{opacity:1;}",""),zx=Qu("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",kp.white,";padding:4px 8px;"),Bx={name:"12mkfdx",styles:"outline:none"},Fx=Qu(Ax,{target:"e7tfjmw0"})("display:inline-block;margin-left:",qm(1),";"),{TooltipPopoverView:Vx}=t;var Hx=ju((function(e,t){const{children:n,className:r,...o}=Hu(e,"TooltipContent"),{tooltip:i}=(0,s.useContext)(Sx),l=Vu()(Lx,r);return(0,s.createElement)(Dx,a({as:td},o,i,{className:l,ref:t}),(0,s.createElement)(Vx,null,n))}),"TooltipContent");const jx=ju((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:l,focusable:c=!0,gutter:u=4,id:d,modal:f=!0,placement:p,visible:g=!1,shortcut:v,...y}=Hu(e,"Tooltip"),w=function(e){void 0===e&&(e={});var t=Ap(e),n=t.placement,r=void 0===n?"top":n,o=t.unstable_timeout,i=void 0===o?0:o,a=h(t,["placement","unstable_timeout"]),s=(0,b.useState)(i),l=s[0],c=s[1],u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=wx(m(m({},a),{},{placement:r})),p=(f.modal,f.setModal,h(f,["modal","setModal"])),g=(0,b.useCallback)((function(){null!==u.current&&window.clearTimeout(u.current),null!==d.current&&window.clearTimeout(d.current)}),[]),v=(0,b.useCallback)((function(){g(),p.hide(),d.current=window.setTimeout((function(){xx.hide(p.baseId)}),l)}),[g,p.hide,l,p.baseId]),y=(0,b.useCallback)((function(){g(),!l||xx.currentTooltipId?(xx.show(p.baseId),p.show()):(xx.show(null),u.current=window.setTimeout((function(){xx.show(p.baseId),p.show()}),l))}),[g,l,p.show,p.baseId]);return(0,b.useEffect)((function(){return xx.subscribe((function(e){e!==p.baseId&&(g(),p.visible&&p.hide())}))}),[p.baseId,g,p.visible,p.hide]),(0,b.useEffect)((function(){return function(){g(),xx.hide(p.baseId)}}),[g,p.baseId]),m(m({},p),{},{hide:v,show:y,unstable_timeout:l,unstable_setTimeout:c})}({animated:n?r:void 0,baseId:o||d,gutter:u,placement:p,visible:g,...y}),x=(0,s.useMemo)((()=>({tooltip:w})),[w]);return(0,s.createElement)(Sx.Provider,{value:x},l&&(0,s.createElement)(Hx,{unstable_portal:f,ref:t},l,v&&(0,s.createElement)(Fx,{shortcut:v})),i&&(0,s.createElement)(kx,a({},w,i.props,{ref:null==i?void 0:i.ref}),(e=>(c||(e.tabIndex=void 0),(0,s.cloneElement)(i,e)))))}),"Tooltip");var $x=jx;const Wx=e=>{const{color:t,colorType:n}=e,[r,o]=(0,s.useState)(null),i=(0,s.useRef)(),a=(0,d.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));return(0,s.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),(0,s.createElement)($x,{content:(0,s.createElement)(Rh,{color:"white"},r===t.toHex()?(0,u.__)("Copied!"):(0,u.__)("Copy")),placement:"bottom"},(0,s.createElement)(Zy,{isSmall:!0,ref:a,icon:Jy,showTooltip:!1}))},Ux=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:a}=e;return(0,s.createElement)(Uv,{spacing:4},(0,s.createElement)($y,{min:t,max:n,label:r,hideLabelFromVision:!0,value:a,onChange:e=>{i(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,s.createElement)(qv,{as:Rh,paddingLeft:qm(4),color:kp.ui.theme,lineHeight:1},o),spinControls:"none",size:"__unstable-large"}),(0,s.createElement)(Uy,{__nextHasNoMarginBottom:!0,label:r,hideLabelFromVision:!0,min:t,max:n,value:a,onChange:i,withInputField:!1}))},Gx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:a,a:l}=t.toRgb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ux,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n(gp({r:e,g:i,b:a,a:l}))}),(0,s.createElement)(Ux,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n(gp({r:o,g:e,b:a,a:l}))}),(0,s.createElement)(Ux,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>n(gp({r:o,g:i,b:e,a:l}))}),r&&(0,s.createElement)(Ux,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>n(gp({r:o,g:i,b:a,a:e/100}))}))},Yx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:a,a:l}=t.toHsl();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ux,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n(gp({h:e,s:i,l:a,a:l}))}}),(0,s.createElement)(Ux,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n(gp({h:o,s:e,l:a,a:l}))}}),(0,s.createElement)(Ux,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a,onChange:e=>{n(gp({h:o,s:i,l:e,a:l}))}}),r&&(0,s.createElement)(Ux,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>{n(gp({h:o,s:i,l:a,a:e/100}))}}))},qx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,s.createElement)(Rv,{prefix:(0,s.createElement)(qv,{as:Rh,marginLeft:qm(4),color:kp.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n(gp(t))},maxLength:r?9:7,label:(0,u.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{var n,r,o,i;const a=null===(n=t.payload)||void 0===n||null===(r=n.event)||void 0===r?void 0:r.nativeEvent;if("insertFromPaste"!==(null==a?void 0:a.inputType))return{...e};const s=null!==(o=e.value)&&void 0!==o&&o.startsWith("#")?e.value.slice(1).toUpperCase():null===(i=e.value)||void 0===i?void 0:i.toUpperCase();return{...e,value:s}},__unstableInputWidth:"9em"})},Kx=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,s.createElement)(Yx,i);case"rgb":return(0,s.createElement)(Gx,i);default:return(0,s.createElement)(qx,i)}};function Xx(){return(Xx=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Jx(e){var t=(0,b.useRef)(e),n=(0,b.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var Qx=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(n_(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=t_(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(r_(t),!function(e,t){return t&&!e_(e)}(t,l.current)&&r)){if(e_(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(n_(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),u=c[0],d=c[1],f=c[2];return(0,b.useEffect)((function(){return f}),[f]),b.createElement("div",Xx({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),i_=function(e){return e.filter(Boolean).join(" ")},a_=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=i_(["react-colorful__pointer",e.className]);return b.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},b.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},s_=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},l_=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:s_(e.h),s:s_(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:s_(o/2),a:s_(r,2)}}),c_=function(e){var t=l_(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},u_=function(e){var t=l_(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},d_=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:s_(255*[r,s,a,a,l,r][c]),g:s_(255*[l,r,r,s,a,a][c]),b:s_(255*[a,a,l,r,r,s][c]),a:s_(o,2)}},f_=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?m_({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)}):{h:0,s:0,v:0,a:1}},p_=f_,m_=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:s_(60*(s<0?s+6:s)),s:s_(i?a/i*100:0),v:s_(i/255*100),a:o}},h_=b.memo((function(e){var t=e.hue,n=e.onChange,r=i_(["react-colorful__hue",e.className]);return b.createElement("div",{className:r},b.createElement(o_,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Qx(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":s_(t),"aria-valuemax":"360","aria-valuemin":"0"},b.createElement(a_,{className:"react-colorful__hue-pointer",left:t/360,color:c_({h:t,s:100,v:100,a:1})})))})),g_=b.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:c_({h:t.h,s:100,v:100,a:1})};return b.createElement("div",{className:"react-colorful__saturation",style:r},b.createElement(o_,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Qx(t.s+100*e.left,0,100),v:Qx(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+s_(t.s)+"%, Brightness "+s_(t.v)+"%"},b.createElement(a_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:c_(t)})))})),v_=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},b_=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function y_(e,t,n){var r=Jx(n),o=(0,b.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,b.useRef)({color:t,hsva:i});(0,b.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,b.useEffect)((function(){var t;v_(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,b.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var w_,x_="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,__=new Map,E_=function(e){x_((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!__.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',__.set(t,r);var o=w_||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},C_=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Zx(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);E_(s);var l=y_(n,o,i),c=l[0],u=l[1],d=i_(["react-colorful",t]);return b.createElement("div",Xx({},a,{ref:s,className:d}),b.createElement(g_,{hsva:c,onChange:u}),b.createElement(h_,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},k_=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+u_(Object.assign({},n,{a:0}))+", "+u_(Object.assign({},n,{a:1}))+")"},i=i_(["react-colorful__alpha",t]),a=s_(100*n.a);return b.createElement("div",{className:i},b.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),b.createElement(o_,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:Qx(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},b.createElement(a_,{className:"react-colorful__alpha-pointer",left:n.a,color:u_(n)})))},S_=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Zx(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);E_(s);var l=y_(n,o,i),c=l[0],u=l[1],d=i_(["react-colorful",t]);return b.createElement("div",Xx({},a,{ref:s,className:d}),b.createElement(g_,{hsva:c,onChange:u}),b.createElement(h_,{hue:c.h,onChange:u}),b.createElement(k_,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},T_={defaultColor:"rgba(0, 0, 0, 1)",toHsva:f_,fromHsva:function(e){var t=d_(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:b_},N_=function(e){return b.createElement(S_,Xx({},e,{colorModel:T_}))},R_={defaultColor:"rgb(0, 0, 0)",toHsva:p_,fromHsva:function(e){var t=d_(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:b_},I_=function(e){return b.createElement(C_,Xx({},e,{colorModel:R_}))};const M_=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?N_:I_,i=(0,s.useMemo)((()=>t.toRgbString()),[t]);return(0,s.createElement)(o,{color:i,onChange:e=>{r(gp(e))}})};function P_(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[a,l]=(0,s.useState)(i);let c;return c=o&&"function"==typeof n?n:o||"function"!=typeof n?l:e=>{n(e),l(e)},[o?r:a,c]}bp([yp]);const O_=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],D_=ju(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:l,...c}=Hu(e,"ColorPicker"),[f,p]=P_({onChange:o,value:r,defaultValue:i}),m=(0,s.useMemo)((()=>gp(f||"")),[f]),h=(0,d.useDebounce)(p),g=(0,s.useCallback)((e=>{h(e.toHex())}),[h]),[v,b]=(0,s.useState)(l||"hex");return(0,s.createElement)(Xy,a({ref:t},c),(0,s.createElement)(M_,{onChange:g,color:m,enableAlpha:n}),(0,s.createElement)(Yy,null,(0,s.createElement)(qy,{justify:"space-between"},(0,s.createElement)(Wy,{__nextHasNoMarginBottom:!0,options:O_,value:v,onChange:e=>b(e),label:(0,u.__)("Color format"),hideLabelFromVision:!0}),(0,s.createElement)(Wx,{color:m,colorType:l||v})),(0,s.createElement)(Ky,{direction:"column",gap:2},(0,s.createElement)(Kx,{colorType:v,color:m,onChange:g,enableAlpha:n}))))}),"ColorPicker");var A_=D_;function L_(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const z_=sc()((e=>{const t=gp(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));const B_=e=>(0,s.createElement)(A_,function(e){const{onChangeComplete:t}=e,n=(0,s.useCallback)((e=>{t(z_(e))}),[t]);return function(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}(e)?{color:L_(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}(e));var F_=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function V_(e){const{actions:t,className:n,options:r,children:o}=e;return(0,s.createElement)("div",{className:c()("components-circular-option-picker",n)},(0,s.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,s.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}V_.Option=function(e){const{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e,l=(0,s.createElement)(id,a({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,s.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},o?(0,s.createElement)(zf,{text:o},l):l,n&&(0,s.createElement)(ay,a({icon:F_},r||{})))},V_.ButtonAction=function(e){const{className:t,children:n,...r}=e;return(0,s.createElement)(id,a({className:c()("components-circular-option-picker__clear",t),variant:"tertiary"},r),n)},V_.DropdownLinkAction=function(e){const{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,s.createElement)(ty,a({className:c()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,s.createElement)(id,a({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};var H_=ju((function(e,t){const n=function(e){const{expanded:t=!1,...n}=Hu(e,"VStack");return Wv({direction:"column",expanded:t,...n})}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"VStack");var j_=ju((function(e,t){const n=ih(e);return(0,s.createElement)(td,a({as:"span"},n,{ref:t}))}),"Truncate");var $_=ju((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=Hu(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...Nh({color:kp.gray[900],size:Sh(n),isBlock:!0,weight:ph.fontWeightHeading,...r}),...i,as:o}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Heading");const W_=Qu($_,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),U_=Qu("div",{target:"eovvns30"})("margin-left:",qm(-2),";margin-right:",qm(-2),";&:first-of-type{margin-top:",qm(-2),";}&:last-of-type{margin-bottom:",qm(-2),";}",(e=>{let{paddingSize:t="small"}=e;if("none"===t)return;const n={small:qm(2),medium:qm(4)};return $f("padding:",n[t]||n.small,";","")}),";");var G_=ju((function(e,t){const{paddingSize:n="small",...r}=Hu(e,"DropdownContentWrapper");return(0,s.createElement)(U_,a({},r,{paddingSize:n,ref:t}))}),"DropdownContentWrapper");bp([yp,Qb]);const Y_=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function q_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;const l=(0,s.useMemo)((()=>r.map(((e,t)=>{let{color:r,name:a}=e;const l=gp(r),c=i===r;return(0,s.createElement)(V_.Option,{key:`${r}-${t}`,isSelected:c,selectedIconProps:c?{fill:l.contrast()>l.contrast("#000")?"#fff":"#000"}:{},tooltipText:a||(0,u.sprintf)((0,u.__)("Color code: %s"),r),style:{backgroundColor:r,color:r},onClick:c?n:()=>o(r,t),"aria-label":a?(0,u.sprintf)((0,u.__)("Color: %s"),a):(0,u.sprintf)((0,u.__)("Color code: %s"),r)})}))),[r,i,o,n]);return(0,s.createElement)(V_,{className:t,options:l,actions:a})}function K_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;return 0===r.length?null:(0,s.createElement)(H_,{spacing:3,className:t},r.map(((e,t)=>{let{name:l,colors:c}=e;return(0,s.createElement)(H_,{spacing:2,key:t},(0,s.createElement)(W_,null,l),(0,s.createElement)(q_,{clearColor:n,colors:c,onChange:e=>o(e,t),value:i,actions:r.length===t+1?a:null}))})))}function X_(e){let{isRenderedInSidebar:t,popoverProps:n,...r}=e;const o=(0,s.useMemo)((()=>({shift:!0,...t?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...n})),[t,n]);return(0,s.createElement)(ty,a({contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:o},r))}bp([yp,Qb]);const Z_=(0,s.forwardRef)((function(e,t){const{clearable:n=!0,colors:r=[],disableCustomColors:o=!1,enableAlpha:i=!1,onChange:l,value:c,__experimentalIsRenderedInSidebar:d=!1,...f}=e,[p,m]=(0,s.useState)(c),h=(0,s.useCallback)((()=>l(void 0)),[l]),g=(0,s.useCallback)((e=>{m(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=null==r?void 0:r.getComputedStyle(t).backgroundColor;return o?gp(o).toHex():e})(c,e))}),[c]),v=Y_(r),b=(0,s.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const r=/^var\(/.test(e),o=r?e:gp(e).toHex(),i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?n:gp(n).toHex()))return t;return(0,u.__)("Custom")}(c,r,v)),[c,r,v]),y=gp(null!=p?p:""),w=null!=c&&c.startsWith("#")?c.substring(1):null!=c?c:"",x=w?(0,u.sprintf)((0,u.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),b,w):(0,u.__)("Custom color picker."),_={clearable:n,clearColor:h,onChange:l,value:c,actions:!!n&&(0,s.createElement)(V_.ButtonAction,{onClick:h},(0,u.__)("Clear"))};return(0,s.createElement)(H_,a({spacing:3,ref:t},f),!o&&(0,s.createElement)(X_,{isRenderedInSidebar:d,renderContent:()=>(0,s.createElement)(G_,{paddingSize:"none"},(0,s.createElement)(B_,{color:p,onChange:e=>l(e),enableAlpha:i})),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Xm,{as:"button",ref:g,justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":x,style:(r=c,void 0===r||0===gp(r).alpha()?{color:"#000"}:{background:c,color:y.contrast()>y.contrast("#000")?"#fff":"#000"})},(0,s.createElement)(jm,{isBlock:!0,as:j_,className:"components-color-palette__custom-color-name"},b),(0,s.createElement)(jm,{as:"span",className:"components-color-palette__custom-color-value"},w));var r}}),v?(0,s.createElement)(K_,a({},_,{colors:r})):(0,s.createElement)(q_,a({},_,{colors:r})))}));var J_=Z_;const Q_="web"===s.Platform.OS,eE={px:{value:"px",label:Q_?"px":(0,u.__)("Pixels (px)"),a11yLabel:(0,u.__)("Pixels (px)"),step:1},"%":{value:"%",label:Q_?"%":(0,u.__)("Percentage (%)"),a11yLabel:(0,u.__)("Percent (%)"),step:.1},em:{value:"em",label:Q_?"em":(0,u.__)("Relative to parent font size (em)"),a11yLabel:(0,u._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:Q_?"rem":(0,u.__)("Relative to root font size (rem)"),a11yLabel:(0,u._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:Q_?"vw":(0,u.__)("Viewport width (vw)"),a11yLabel:(0,u.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:Q_?"vh":(0,u.__)("Viewport height (vh)"),a11yLabel:(0,u.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:Q_?"vmin":(0,u.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,u.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:Q_?"vmax":(0,u.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,u.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:Q_?"ch":(0,u.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,u.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:Q_?"ex":(0,u.__)("x-height of the font (ex)"),a11yLabel:(0,u.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:Q_?"cm":(0,u.__)("Centimeters (cm)"),a11yLabel:(0,u.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:Q_?"mm":(0,u.__)("Millimeters (mm)"),a11yLabel:(0,u.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:Q_?"in":(0,u.__)("Inches (in)"),a11yLabel:(0,u.__)("Inches (in)"),step:.001},pc:{value:"pc",label:Q_?"pc":(0,u.__)("Picas (pc)"),a11yLabel:(0,u.__)("Picas (pc)"),step:1},pt:{value:"pt",label:Q_?"pt":(0,u.__)("Points (pt)"),a11yLabel:(0,u.__)("Points (pt)"),step:1}},tE=Object.values(eE),nE=[eE.px,eE["%"],eE.em,eE.rem,eE.vw,eE.vh],rE=eE.px;function oE(e,t,n){return aE(t?`${null!=e?e:""}${t}`:e,n)}function iE(e){return Array.isArray(e)&&!!e.length}function aE(e){var t,n;let r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tE;if(void 0!==e||null===e){r=`${e}`.trim();const t=parseFloat(r);o=isFinite(t)?t:void 0}const a=null===(t=r)||void 0===t?void 0:t.match(/[\d.\-\+]*\s*(.*)/),s=null==a||null===(n=a[1])||void 0===n?void 0:n.toLowerCase();let l;if(iE(i)){const e=i.find((e=>e.value===s));l=null==e?void 0:e.value}else l=rE.value;return[o,l]}function sE(e,t,n,r){const[o,i]=aE(e,t),a=null!=o?o:n;let s=i||r;return!s&&iE(t)&&(s=t[0].value),[a,s]}const lE=e=>{let{units:t=tE,availableUnits:n=[],defaultValues:r}=e;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n,t);return r&&o.forEach(((e,t)=>{if(r[e.value]){const[n]=aE(r[e.value]);o[t].default=n}})),o};function cE(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:a,previousStyleSelection:l,size:c="default",__experimentalIsRenderedInSidebar:u=!1,...d}=Hu(e,"BorderControlDropdown"),[f]=aE(null==t?void 0:t.width),p=0===f,m=Vu(),h=(0,s.useMemo)((()=>m((e=>$f("background:#fff;&&>button{height:","__unstable-large"===e?"40px":"30px",";width:","__unstable-large"===e?"40px":"30px",";padding:0;display:flex;align-items:center;justify-content:center;",zh({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",ph.borderWidth," solid ",kp.ui.border,";&:focus,&:hover:not( :disabled ){",zb," border-color:",kp.ui.borderFocus,";z-index:1;position:relative;}}",""))(c),n)),[n,m,c]),g=(0,s.useMemo)((()=>m($b)),[m]),v=(0,s.useMemo)((()=>m(Vb(t,c))),[t,m,c]),b=(0,s.useMemo)((()=>m(Hb)),[m]),y=(0,s.useMemo)((()=>m(jb)),[m]),w=(0,s.useMemo)((()=>m(Wb)),[m]);return{...d,border:t,className:h,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:g,indicatorWrapperClassName:v,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?l:null==t?void 0:t.style,r=p&&e?"1px":null==t?void 0:t.width;a({color:e,style:n,width:r})},onStyleChange:e=>{const n=p&&e?"1px":null==t?void 0:t.width;a({...t,style:e,width:n})},onReset:()=>{a({...t,color:void 0,style:void 0})},popoverContentClassName:y,popoverControlsClassName:b,resetButtonClassName:w,__experimentalIsRenderedInSidebar:u}}const uE=ju(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:l,enableStyle:c,indicatorClassName:d,indicatorWrapperClassName:f,onReset:p,onColorChange:m,onStyleChange:h,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:y,__unstablePopoverProps:w,...x}=cE(e),{color:_,style:E}=r||{},C=((e,t)=>{if(e&&t){if(Y_(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(_,o),k=((e,t,n,r)=>r?t?n?(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,t.color,n):(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?n?(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',e,n):(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',e):(0,u.__)("Border color and style picker."):t?(0,u.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?(0,u.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',e):(0,u.__)("Border color picker."))(_,C,E,c),S=_||E&&"none"!==E,T=n?"bottom left":void 0;return(0,s.createElement)(ty,a({renderToggle:e=>{let{onToggle:t}=e;return(0,s.createElement)(id,{onClick:t,variant:"tertiary","aria-label":k,tooltipPosition:T,label:(0,u.__)("Border color and style picker"),showTooltip:!0},(0,s.createElement)("span",{className:f},(0,s.createElement)(Xb,{className:d,colorValue:_})))},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(G_,{paddingSize:"medium"},(0,s.createElement)(H_,{className:v,spacing:6},y?(0,s.createElement)(Uv,null,(0,s.createElement)(_v,null,(0,u.__)("Border color")),(0,s.createElement)(id,{isSmall:!0,label:(0,u.__)("Close border color"),icon:Nb,onClick:t})):void 0,(0,s.createElement)(J_,{className:g,value:_,onChange:m,colors:o,disableCustomColors:i,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:l}),c&&(0,s.createElement)(Kb,{label:(0,u.__)("Style"),value:E,onChange:h}))),S&&(0,s.createElement)(G_,{paddingSize:"none"},(0,s.createElement)(id,{className:b,variant:"tertiary",onClick:()=>{p(),t()}},(0,u.__)("Reset to default"))))},popoverProps:{...w}},x,{ref:t}))}),"BorderControlDropdown");var dE=uE;function fE(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r,size:o="default",unit:i="px",units:l=nE,...u}=e;if(!iE(l)||1===(null==l?void 0:l.length))return(0,s.createElement)(Db,{className:"components-unit-control__unit-label",selectSize:o},i);const d=c()("components-unit-control__select",t);return(0,s.createElement)(Ab,a({className:d,onChange:e=>{const{value:t}=e.target,n=l.find((e=>e.value===t));null==r||r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},u),l.map((e=>(0,s.createElement)("option",{value:e.value,key:e.value},e.label))))}const pE=(0,s.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:d=!1,isPressEnterToChange:f=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:m=!0,label:h,onChange:g,onUnitChange:v,size:b="default",unit:y,units:w=nE,value:x,onBlur:_,onFocus:E,...C}=e;"unit"in e&&Kl()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const k=null!=x?x:void 0,S=(0,s.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tE;const r=Array.isArray(n)?[...n]:[],[,o]=oE(e,t,tE);return o&&!r.some((e=>e.value===o))&&eE[o]&&r.unshift(eE[o]),r}(k,y,w)),[k,y,w]),[T,N]=oE(k,y,S),[R,I]=py(1===S.length?S[0].value:y,{initial:N,fallback:""});(0,s.useEffect)((()=>{void 0!==N&&I(N)}),[N,I]);const M=(0,s.useRef)(void 0),P=c()("components-unit-control","components-unit-control-wrapper",i),O=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(M.current=void 0);const[t,n]=sE(e.currentTarget.value,S,T,R);if(M.current=t,f&&n!==R){const t={event:e,data:Array.isArray(S)?S.find((e=>e.value===n)):void 0};null==v||v(n,t),I(n)}},D=(e,t)=>{const n={...e};var r;t.type===tv&&(void 0!==M.current&&(n.value=(null!==(r=M.current)&&void 0!==r?r:"").toString(),M.current=void 0));return n};let A=D;n&&(A=(e,t)=>{const r=D(e,t);return n(r,t)});const L=d?null:(0,s.createElement)(fE,{"aria-label":(0,u.__)("Select unit"),disabled:l,isUnitSelectTabbable:m,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=T?T:""}${e}`;p&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),null==g||g(r,t),null==v||v(e,t),I(e)},size:b,unit:R,units:S,onBlur:_,onFocus:E});let z=C.step;if(!z&&S){var B;const e=S.find((e=>e.value===R));z=null!==(B=null==e?void 0:e.step)&&void 0!==B?B:1}return(0,s.createElement)(Pb,a({type:f?"text":"number"},C,{autoComplete:r,className:P,disabled:l,spinControls:"none",isPressEnterToChange:f,label:h,onBlur:e=>{O(e),null==_||_(e)},onKeyDown:e=>{const{key:t}=e;"Enter"===t&&O(e)},onChange:(e,t)=>{if(""===e||null==e)return void(null==g||g("",t));const n=sE(e,S,T,R).join("");null==g||g(n,t)},ref:t,size:b,suffix:L,value:null!=T?T:"",step:z,__unstableStateReducer:A,onFocus:E}))}));var mE=pE;function hE(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:a=!0,shouldSanitizeBorder:l=!0,size:c="default",value:u,width:d,__experimentalIsRenderedInSidebar:f=!1,...p}=Hu(e,"BorderControl"),[m,h]=aE(null==u?void 0:u.width),g=h||"px",v=0===m,[b,y]=(0,s.useState)(),[w,x]=(0,s.useState)(),_=(0,s.useCallback)((e=>{if(l)return o((e=>{const t=void 0===(null==e?void 0:e.width)||""===e.width,n=void 0===(null==e?void 0:e.color);if(!t||!n)return e})(e));o(e)}),[o,l]),E=(0,s.useCallback)((e=>{const t=""===e?void 0:e,[n]=aE(e),r=0===n,o={...u,width:t};r&&!v&&(y(null==u?void 0:u.color),x(null==u?void 0:u.style),o.color=void 0,o.style="none"),!r&&v&&(void 0===o.color&&(o.color=b),"none"===o.style&&(o.style=w)),_(o)}),[u,v,b,w,_]),C=(0,s.useCallback)((e=>{E(`${e}${g}`)}),[E,g]),k=Vu(),S=(0,s.useMemo)((()=>k(Bb,t)),[t,k]);let T=d;r&&(T="__unstable-large"===c?"116px":"90px");const N=(0,s.useMemo)((()=>{const e=!!T&&Fb,t=(e=>$f("height:","__unstable-large"===e?"40px":"30px",";",""))(c);return k($f(Pb,"{flex:1 1 40%;}&& ",Ab,"{min-height:0;}",""),e,t)}),[T,k,c]),R=(0,s.useMemo)((()=>k($f("flex:1 1 60%;",zh({marginRight:qm(3)})(),";",""))),[k]);return{...p,className:S,colors:n,enableAlpha:i,enableStyle:a,innerWrapperClassName:N,inputWidth:T,onBorderChange:_,onSliderChange:C,onWidthChange:E,previousStyleSelection:w,sliderClassName:R,value:u,widthUnit:g,widthValue:m,size:c,__experimentalIsRenderedInSidebar:f}}const gE=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"legend"},t):(0,s.createElement)(_v,{as:"legend"},t):null},vE=ju(((e,t)=>{const{colors:n,disableCustomColors:r,disableUnits:o,enableAlpha:i,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:d,inputWidth:f,label:p,onBorderChange:m,onSliderChange:h,onWidthChange:g,placeholder:v,__unstablePopoverProps:b,previousStyleSelection:y,showDropdownHeader:w,size:x,sliderClassName:_,value:E,widthUnit:C,widthValue:k,withSlider:S,__experimentalIsRenderedInSidebar:T,...N}=hE(e);return(0,s.createElement)(td,a({as:"fieldset"},N,{ref:t}),(0,s.createElement)(gE,{label:p,hideLabelFromVision:c}),(0,s.createElement)(Uv,{spacing:4,className:d},(0,s.createElement)(mE,{prefix:(0,s.createElement)(dE,{border:E,colors:n,__unstablePopoverProps:b,disableCustomColors:r,enableAlpha:i,enableStyle:l,onChange:m,previousStyleSelection:y,showDropdownHeader:w,__experimentalIsRenderedInSidebar:T,size:x}),label:(0,u.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:g,value:(null==E?void 0:E.width)||"",placeholder:v,disableUnits:o,__unstableInputWidth:f,size:x}),S&&(0,s.createElement)(jy,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:h,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1})))}),"BorderControl");var bE=vE;const yE={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function wE(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:l=!1,justify:c,rowGap:u,rows:d,templateColumns:f,templateRows:p,...m}=Hu(e,"Grid"),h=Ym(Array.isArray(i)?i:[i]),g=Ym(Array.isArray(d)?d:[d]),v=f||!!i&&`repeat( ${h}, 1fr )`,b=p||!!d&&`repeat( ${g}, 1fr )`,y=Vu();return{...m,className:(0,s.useMemo)((()=>{const e=function(e){return e?yE[e]:{}}(n),i=$f({alignItems:t,display:l?"inline-grid":"grid",gap:`calc( ${ph.gridBase} * ${a} )`,gridTemplateColumns:v||void 0,gridTemplateRows:b||void 0,gridRowGap:u,gridColumnGap:o,justifyContent:c,verticalAlign:l?"middle":void 0,...e},"","");return y(i,r)}),[t,n,r,o,y,a,v,b,l,c,u])}}var xE=ju((function(e,t){const n=wE(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Grid");function _E(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:a=!1,...l}=Hu(e,"BorderBoxControlSplitControls"),c=Vu(),u=(0,s.useMemo)((()=>c((e=>$f("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[c,t,i]);return{...l,centeredClassName:(0,s.useMemo)((()=>c(Eb,t)),[c,t]),className:u,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,s.useMemo)((()=>c($f(zh({marginLeft:"auto"})(),";",""),t)),[c,t]),size:i,__experimentalIsRenderedInSidebar:a}}var EE=ju(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:c,popoverPlacement:f,popoverOffset:p,rightAlignedClassName:m,size:h="default",value:g,__experimentalIsRenderedInSidebar:v,...b}=_E(e),[y,w]=(0,s.useState)(null),x=(0,s.useMemo)((()=>f?{placement:f,offset:p,anchor:y,shift:!0}:void 0),[f,p,y]),_={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,isCompact:!0,__experimentalIsRenderedInSidebar:v,size:h},E=(0,d.useMergeRefs)([w,t]);return(0,s.createElement)(xE,a({},b,{ref:E,gap:4}),(0,s.createElement)(Tb,{value:g,size:h}),(0,s.createElement)(bE,a({className:n,hideLabelFromVision:!0,label:(0,u.__)("Top border"),onChange:e=>c(e,"top"),__unstablePopoverProps:x,value:null==g?void 0:g.top},_)),(0,s.createElement)(bE,a({hideLabelFromVision:!0,label:(0,u.__)("Left border"),onChange:e=>c(e,"left"),__unstablePopoverProps:x,value:null==g?void 0:g.left},_)),(0,s.createElement)(bE,a({className:m,hideLabelFromVision:!0,label:(0,u.__)("Right border"),onChange:e=>c(e,"right"),__unstablePopoverProps:x,value:null==g?void 0:g.right},_)),(0,s.createElement)(bE,a({className:n,hideLabelFromVision:!0,label:(0,u.__)("Bottom border"),onChange:e=>c(e,"bottom"),__unstablePopoverProps:x,value:null==g?void 0:g.bottom},_)))}),"BorderBoxControlSplitControls");const CE=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?$/;const kE=["top","right","bottom","left"],SE=["color","style","width"],TE=e=>!e||!SE.some((t=>void 0!==e[t])),NE=e=>{if(!e)return!1;if(RE(e)){return!kE.every((t=>TE(e[t])))}return!TE(e)},RE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==kE.indexOf(e)))},IE=e=>{if(!RE(e))return!1;const t=kE.map((t=>ME(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},ME=(e,t)=>{if(TE(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")},PE=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(CE);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function OE(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:a="default",value:l,__experimentalIsRenderedInSidebar:c=!1,...u}=Hu(e,"BorderBoxControl"),d=IE(l),f=RE(l),p=f?(e=>{if(!e)return;const t=[],n=[],r=[];kE.forEach((o=>{var i,a,s;t.push(null===(i=e[o])||void 0===i?void 0:i.color),n.push(null===(a=e[o])||void 0===a?void 0:a.style),r.push(null===(s=e[o])||void 0===s?void 0:s.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:PE(r)}})(l):l,m=f?l:(e=>{if(e&&!TE(e))return{top:e,right:e,bottom:e,left:e}})(l),h=!isNaN(parseFloat(`${null==p?void 0:p.width}`)),[g,v]=(0,s.useState)(!d),b=Vu(),y=(0,s.useMemo)((()=>b(wb,t)),[b,t]),w=(0,s.useMemo)((()=>b($f("flex:1;",zh({marginRight:"24px"})(),";",""))),[b]),x=(0,s.useMemo)((()=>b(xb)),[b]);return{...u,className:y,colors:n,disableUnits:d&&!h,enableAlpha:o,enableStyle:i,hasMixedBorders:d,isLinked:g,linkedControlClassName:w,onLinkedChange:e=>{if(!e)return r(void 0);if(!d||(t=e)&&SE.every((e=>void 0!==t[e])))return r(TE(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(p,e),o={top:{...null==l?void 0:l.top,...n},right:{...null==l?void 0:l.right,...n},bottom:{...null==l?void 0:l.bottom,...n},left:{...null==l?void 0:l.left,...n}};if(IE(o))return r(o);const i=TE(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...m,[t]:e};IE(n)?r(n):r(e)},toggleLinked:()=>v(!g),linkedValue:p,size:a,splitValue:m,wrapperClassName:x,__experimentalIsRenderedInSidebar:c}}const DE=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"label"},t):(0,s.createElement)(_v,null,t):null},AE=ju(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:l,enableStyle:c,hasMixedBorders:f,hideLabelFromVision:p,isLinked:m,label:h,linkedControlClassName:g,linkedValue:v,onLinkedChange:b,onSplitChange:y,popoverPlacement:w,popoverOffset:x,size:_,splitValue:E,toggleLinked:C,wrapperClassName:k,__experimentalIsRenderedInSidebar:S,...T}=OE(e),[N,R]=(0,s.useState)(null),I=(0,s.useMemo)((()=>w?{placement:w,offset:x,anchor:N,shift:!0}:void 0),[w,x,N]),M=(0,d.useMergeRefs)([R,t]);return(0,s.createElement)(td,a({className:n},T,{ref:M}),(0,s.createElement)(DE,{label:h,hideLabelFromVision:p}),(0,s.createElement)(td,{className:k},m?(0,s.createElement)(bE,{className:g,colors:r,disableUnits:i,disableCustomColors:o,enableAlpha:l,enableStyle:c,onChange:b,placeholder:f?(0,u.__)("Mixed"):void 0,__unstablePopoverProps:I,shouldSanitizeBorder:!1,value:v,withSlider:!0,width:"__unstable-large"===_?"116px":"110px",__experimentalIsRenderedInSidebar:S,size:_}):(0,s.createElement)(EE,{colors:r,disableCustomColors:o,enableAlpha:l,enableStyle:c,onChange:y,popoverPlacement:w,popoverOffset:x,value:E,__experimentalIsRenderedInSidebar:S,size:_}),(0,s.createElement)(kb,{onClick:C,isLinked:m,size:_})))}),"BorderBoxControl");var LE=AE;const zE=Qu("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),BE=Qu(Xm,{target:"e7pk0lh5"})({name:"5bhc30",styles:"margin-bottom:8px"}),FE=Qu(Xm,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),VE=Qu("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),HE=Qu(Xm,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),jE=Qu(Xm,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var $E={name:"1ch9yvl",styles:"border-radius:0"},WE={name:"tg3mx0",styles:"border-radius:2px"};const UE=e=>{let{isFirst:t,isLast:n,isOnly:r}=e;return t?zh({borderTopRightRadius:0,borderBottomRightRadius:0})():n?zh({borderTopLeftRadius:0,borderBottomLeftRadius:0})():r?WE:$E},GE=e=>{let{isFirst:t,isOnly:n}=e;return zh({marginLeft:t||n?0:-1})()},YE=Qu(mE,{target:"e7pk0lh0"})("max-width:60px;",UE,";",GE,";"),qE=()=>{};function KE(e){let{isFirst:t,isLast:n,isOnly:r,onHoverOn:o=qE,onHoverOff:i=qE,label:l,value:c,...u}=e;const d=(f=e=>{let{event:t,...n}=e;n.hovering?o(t,n):i(t,n)},Fg(Hg),Zg({hover:f},p||{},"hover"));var f,p;return(0,s.createElement)(VE,d(),(0,s.createElement)(XE,{text:l},(0,s.createElement)(YE,a({"aria-label":l,className:"component-box-control__unit-control",isFirst:t,isLast:n,isOnly:r,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:c},u))))}function XE(e){let{children:t,text:n}=e;return n?(0,s.createElement)(zf,{text:n,position:"top"},(0,s.createElement)("div",null,t)):t}const ZE={all:(0,u.__)("All"),top:(0,u.__)("Top"),bottom:(0,u.__)("Bottom"),left:(0,u.__)("Left"),right:(0,u.__)("Right"),mixed:(0,u.__)("Mixed"),vertical:(0,u.__)("Vertical"),horizontal:(0,u.__)("Horizontal")},JE={top:void 0,right:void 0,bottom:void 0,left:void 0},QE=["top","right","bottom","left"];function eC(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function tC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QE;const r=aC(n),o=r.map((t=>aE(e[t]))),i=o.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),a=o.map((e=>e[1])),s=i.every((e=>e===i[0]))?i[0]:"";let l;var c;"number"==typeof s?l=eC(a):l=null!==(c=nC(t))&&void 0!==c?c:eC(a);return[s,l].join("")}function nC(e){if(!e||"object"!=typeof e)return;return eC(Object.values(e).filter(Boolean))}function rC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QE;const r=tC(e,t,n),o=isNaN(parseFloat(r));return o}function oC(e){return void 0!==e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function iC(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function aC(e){const t=[];if(null==e||!e.length)return QE;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=QE.filter((t=>e.includes(t)));t.push(...n)}return t}function sC(e,t,n){const r={...e};return null!=n&&n.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):QE.forEach((e=>r[e]=t)),r}const lC=()=>{};function cC(e){let{onChange:t=lC,onFocus:n=lC,onHoverOn:r=lC,onHoverOff:o=lC,values:i,sides:l,selectedUnits:c,setSelectedUnits:u,...d}=e;const f=tC(i,c,l),p=oC(i)&&rC(i,c,l),m=p?ZE.mixed:null;return(0,s.createElement)(KE,a({},d,{disableUnits:p,isOnly:!0,value:f,onChange:e=>{const n=!isNaN(parseFloat(e)),r=sC(i,n?e:void 0,l);t(r)},onUnitChange:e=>{const t=sC(c,e,l);u(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{r({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{o({top:!1,bottom:!1,left:!1,right:!1})},placeholder:m}))}const uC=()=>{};function dC(e){let{onChange:t=uC,onFocus:n=uC,onHoverOn:r=uC,onHoverOff:o=uC,values:i,selectedUnits:l,setSelectedUnits:c,sides:u,...d}=e;const f=e=>t=>{n(t,{side:e})},p=e=>()=>{r({[e]:!0})},m=e=>()=>{o({[e]:!1})},h=e=>(n,r)=>{let{event:o}=r;const{altKey:a}=o,s={...i},l=!isNaN(parseFloat(n))?n:void 0;if(s[e]=l,a)switch(e){case"top":s.bottom=l;break;case"bottom":s.top=l;break;case"left":s.right=l;break;case"right":s.left=l}(e=>{t(e)})(s)},g=e=>t=>{const n={...l};n[e]=t,c(n)},v=null!=u&&u.length?QE.filter((e=>u.includes(e))):QE,b=v[0],y=v[v.length-1],w=b===y&&b;return(0,s.createElement)(HE,{className:"component-box-control__input-controls-wrapper"},(0,s.createElement)(jE,{gap:0,align:"top",className:"component-box-control__input-controls"},v.map((e=>{const[t,n]=aE(i[e]),r=i[e]?n:l[e];return(0,s.createElement)(KE,a({},d,{isFirst:b===e,isLast:y===e,isOnly:w===e,value:[t,r].join(""),onChange:h(e),onUnitChange:g(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:m(e),label:ZE[e],key:`box-control-${e}`}))}))))}const fC=["vertical","horizontal"];function pC(e){let{onChange:t,onFocus:n,onHoverOn:r,onHoverOff:o,values:i,selectedUnits:l,setSelectedUnits:c,sides:u,...d}=e;const f=e=>t=>{n&&n(t,{side:e})},p=e=>()=>{r&&("vertical"===e&&r({top:!0,bottom:!0}),"horizontal"===e&&r({left:!0,right:!0}))},m=e=>()=>{o&&("vertical"===e&&o({top:!1,bottom:!1}),"horizontal"===e&&o({left:!1,right:!1}))},h=e=>n=>{if(!t)return;const r={...i},o=!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},g=e=>t=>{const n={...l};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),c(n)},v=null!=u&&u.length?fC.filter((e=>u.includes(e))):fC,b=v[0],y=v[v.length-1],w=b===y&&b;return(0,s.createElement)(jE,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},v.map((e=>{const[t,n]=aE("vertical"===e?i.top:i.left),r="vertical"===e?l.top:l.left;return(0,s.createElement)(KE,a({},d,{isFirst:b===e,isLast:y===e,isOnly:w===e,value:[t,null!=r?r:n].join(""),onChange:h(e),onUnitChange:g(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:m(e),label:ZE[e],key:e}))})))}const mC=Qu("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),hC=Qu("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),gC=Qu("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return $f({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),vC=Qu(gC,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),bC=Qu(gC,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),yC=Qu(bC,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),wC=Qu(vC,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),xC=Qu(bC,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),_C=Qu(vC,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function EC(e){let{size:t=24,side:n="all",sides:r,...o}=e;const i=e=>!(e=>(null==r?void 0:r.length)&&!r.includes(e))(e)&&("all"===n||n===e),l=i("top")||i("vertical"),c=i("right")||i("horizontal"),u=i("bottom")||i("vertical"),d=i("left")||i("horizontal"),f=t/24;return(0,s.createElement)(mC,a({style:{transform:`scale(${f})`}},o),(0,s.createElement)(hC,null,(0,s.createElement)(yC,{isFocused:l}),(0,s.createElement)(wC,{isFocused:c}),(0,s.createElement)(xC,{isFocused:u}),(0,s.createElement)(_C,{isFocused:d})))}function CC(e){let{isLinked:t,...n}=e;const r=t?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,s.createElement)(zf,{text:r},(0,s.createElement)(id,a({},n,{className:"component-box-control__linked-button",isSmall:!0,icon:t?bb:yb,iconSize:24,"aria-label":r})))}const kC={min:0},SC=()=>{};function TC(e){let{id:t,inputProps:n=kC,onChange:r=SC,label:o=(0,u.__)("Box Control"),values:i,units:l,sides:c,splitOnAxis:f=!1,allowReset:p=!0,resetValues:m=JE,onMouseOver:h,onMouseOut:g}=e;const[v,b]=py(i,{fallback:JE}),y=v||JE,w=oC(i),x=1===(null==c?void 0:c.length),[_,E]=(0,s.useState)(w),[C,k]=(0,s.useState)(!w||!rC(y)||x),[S,T]=(0,s.useState)(iC(C,f)),[N,R]=(0,s.useState)({top:aE(null==i?void 0:i.top)[1],right:aE(null==i?void 0:i.right)[1],bottom:aE(null==i?void 0:i.bottom)[1],left:aE(null==i?void 0:i.left)[1]}),I=function(e){const t=(0,d.useInstanceId)(TC,"inspector-box-control");return e||t}(t),M=`${I}-heading`,P={...n,onChange:e=>{r(e),b(e),E(!0)},onFocus:(e,t)=>{let{side:n}=t;T(n)},isLinked:C,units:l,selectedUnits:N,setSelectedUnits:R,sides:c,values:y,onMouseOver:h,onMouseOut:g};return(0,s.createElement)(zE,{id:I,role:"group","aria-labelledby":M},(0,s.createElement)(BE,{className:"component-box-control__header"},(0,s.createElement)(jm,null,(0,s.createElement)(Sv.VisualLabel,{id:M},o)),p&&(0,s.createElement)(jm,null,(0,s.createElement)(id,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{r(m),b(m),R(m),E(!1)},disabled:!_},(0,u.__)("Reset")))),(0,s.createElement)(FE,{className:"component-box-control__header-control-wrapper"},(0,s.createElement)(jm,null,(0,s.createElement)(EC,{side:S,sides:c})),C&&(0,s.createElement)(Hm,null,(0,s.createElement)(cC,a({"aria-label":o},P))),!C&&f&&(0,s.createElement)(Hm,null,(0,s.createElement)(pC,P)),!x&&(0,s.createElement)(jm,null,(0,s.createElement)(CC,{onClick:()=>{k(!C),T(iC(!C,f))},isLinked:C}))),!C&&!f&&(0,s.createElement)(dC,P))}var NC=(0,s.forwardRef)((function(e,t){const{className:n,...r}=e,o=c()("components-button-group",n);return(0,s.createElement)("div",a({ref:t,role:"group",className:o},r))}));const RC={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function IC(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const MC=ju((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:l=0,value:c=0,...u}=Hu(e,"Elevation"),d=Vu();return{...u,className:(0,s.useMemo)((()=>{let e=Jm(i)?i:2*c,s=Jm(t)?t:c/2;a||(e=Jm(i)?i:void 0,s=Jm(t)?t:void 0);const u=`box-shadow ${ph.transitionDuration} ${ph.transitionTimingFunction}`,f={};return f.Base=$f({borderRadius:n,bottom:l,boxShadow:IC(c),opacity:ph.elevationIntensity,left:l,right:l,top:l,transition:u},Sp("transition"),"",""),Jm(e)&&(f.hover=$f("*:hover>&{box-shadow:",IC(e),";}","")),Jm(s)&&(f.active=$f("*:active>&{box-shadow:",IC(s),";}","")),Jm(o)&&(f.focus=$f("*:focus>&{box-shadow:",IC(o),";}","")),d(RC,f.Base,f.hover,f.focus,f.active,r)}),[t,n,r,d,o,i,a,l,c]),"aria-hidden":!0}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Elevation");var PC=MC;const OC=`calc(${ph.cardBorderRadius} - 1px)`,DC=$f("box-shadow:0 0 0 1px ",ph.surfaceBorderColor,";outline:none;",""),AC={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},LC={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},zC={name:"13udsys",styles:"height:100%"},BC={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},FC={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},VC={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},HC=$f("&:first-of-type{border-top-left-radius:",OC,";border-top-right-radius:",OC,";}&:last-of-type{border-bottom-left-radius:",OC,";border-bottom-right-radius:",OC,";}",""),jC=$f("border-color:",ph.colorDivider,";",""),$C={name:"1t90u8d",styles:"box-shadow:none"},WC={name:"1e1ncky",styles:"border:none"},UC=$f("border-radius:",OC,";",""),GC=$f("padding:",ph.cardPaddingXSmall,";",""),YC={large:$f("padding:",ph.cardPaddingLarge,";",""),medium:$f("padding:",ph.cardPaddingMedium,";",""),small:$f("padding:",ph.cardPaddingSmall,";",""),xSmall:GC,extraSmall:GC},qC=$f("background-color:",kp.ui.backgroundDisabled,";",""),KC=$f("background-color:",ph.surfaceColor,";color:",kp.gray[900],";position:relative;","");ph.surfaceBackgroundColor;function XC(e){let{borderBottom:t,borderLeft:n,borderRight:r,borderTop:o}=e;const i=`1px solid ${ph.surfaceBorderColor}`;return $f({borderBottom:t?i:void 0,borderLeft:n?i:void 0,borderRight:r?i:void 0,borderTop:o?i:void 0},"","")}const ZC=$f("",""),JC=$f("background:",ph.surfaceBackgroundTintColor,";",""),QC=$f("background:",ph.surfaceBackgroundTertiaryColor,";",""),ek=e=>[e,e].join(" "),tk=e=>["90deg",[ph.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),nk=e=>[[ph.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),rk=(e,t)=>$f("background:",(e=>[`linear-gradient( ${tk(e)} ) center`,`linear-gradient( ${nk(e)} ) center`,ph.surfaceBorderBoldColor].join(","))(t),";background-size:",ek(e),";",""),ok=[`linear-gradient( ${[`${ph.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${ph.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),ik=(e,t,n)=>{switch(e){case"dotted":return rk(t,n);case"grid":return(e=>$f("background:",ph.surfaceBackgroundColor,";background-image:",ok,";background-size:",ek(e),";",""))(t);case"primary":return ZC;case"secondary":return JC;case"tertiary":return QC}};function ak(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:l="primary",...c}=Hu(e,"Surface"),u=Vu();return{...c,className:(0,s.useMemo)((()=>{const e={borders:XC({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return u(KC,e.borders,ik(l,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,u,l])}}function sk(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=Hu(function(e){let{elevation:t,isElevated:n,...r}=e;const o={...r};let i=t;var a;return n&&(Kl()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(a=i)&&void 0!==a||(i=2)),void 0!==i&&(o.elevation=i),o}(e),"Card"),l=Vu();return{...ak({...a,className:(0,s.useMemo)((()=>l(DC,r&&$C,o&&UC,t)),[t,l,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}var lk=ju((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:l,...c}=sk(e),u=i?ph.cardBorderRadius:0,d=Vu(),f=(0,s.useMemo)((()=>d($f({borderRadius:u},"",""))),[d,u]),p=(0,s.useMemo)((()=>{const e={size:l,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,l]);return(0,s.createElement)(oc,{value:p},(0,s.createElement)(td,a({},c,{ref:t}),(0,s.createElement)(td,{className:d(zC)},n),(0,s.createElement)(PC,{className:f,isInteractive:!1,value:r?1:0}),(0,s.createElement)(PC,{className:f,isInteractive:!1,value:r})))}),"Card");const ck=$f("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",ph.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",ph.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",ph.colorScrollbarThumbHover,";}}",""),uk={name:"13udsys",styles:"height:100%"},dk={name:"7zq9w",styles:"scroll-behavior:smooth"},fk={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},pk={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},mk={name:"umwchj",styles:"overflow-y:auto"};var hk=ju((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Hu(e,"Scrollable"),i=Vu();return{...o,className:(0,s.useMemo)((()=>i(uk,ck,r&&dk,"x"===n&&fk,"y"===n&&pk,"auto"===n&&mk,t)),[t,i,n,r])}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Scrollable");var gk=ju((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Hu(e,"CardBody"),a=Vu();return{...i,className:(0,s.useMemo)((()=>a(BC,HC,YC[o],r&&qC,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,s.createElement)(hk,a({},r,{ref:t})):(0,s.createElement)(td,a({},r,{ref:t}))}),"CardBody"),vk=F({name:"Separator",compose:re,keys:["orientation"],useOptions:function(e){var t=e.orientation;return m({orientation:void 0===t?"horizontal":t},h(e,["orientation"]))},useProps:function(e,t){return m({role:"separator","aria-orientation":e.orientation},t)}}),bk=z({as:"hr",memo:!0,useHook:vk});const yk={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var wk={name:"1u4hpl4",styles:"display:inline"};const xk=Qu("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?wk:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return $f({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return $f({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:n,marginStart:r,marginEnd:o}=e;return $f(zh({[yk[t].start]:qm(null!=r?r:n),[yk[t].end]:qm(null!=o?o:n)})(),"","")}),";");var _k=ju((function(e,t){const n=Hu(e,"Divider");return(0,s.createElement)(bk,a({as:xk},n,{ref:t}))}),"Divider");var Ek=ju((function(e,t){const n=function(e){const{className:t,...n}=Hu(e,"CardDivider"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(VC,jC,"components-card__divider",t)),[t,r])}}(e);return(0,s.createElement)(_k,a({},n,{ref:t}))}),"CardDivider");var Ck=ju((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=Hu(e,"CardFooter"),l=Vu();return{...a,className:(0,s.useMemo)((()=>l(LC,HC,jC,YC[i],r&&WC,o&&qC,"components-card__footer",t)),[t,l,r,o,i]),justify:n}}(e);return(0,s.createElement)(Xm,a({},n,{ref:t}))}),"CardFooter");var kk=ju((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Hu(e,"CardHeader"),a=Vu();return{...i,className:(0,s.useMemo)((()=>a(AC,HC,jC,YC[o],n&&WC,r&&qC,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,s.createElement)(Xm,a({},n,{ref:t}))}),"CardHeader");var Sk=ju((function(e,t){const n=function(e){const{className:t,...n}=Hu(e,"CardMedia"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(FC,HC,"components-card__media",t)),[t,r])}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"CardMedia");var Tk=function e(t){const{__nextHasNoMarginBottom:n,label:r,className:o,heading:i,checked:l,indeterminate:u,help:f,onChange:p,...m}=t;i&&Kl()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[h,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),y=(0,d.useRefEffect)((e=>{e&&(e.indeterminate=!!u,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[l,u]),w=`inspector-checkbox-control-${(0,d.useInstanceId)(e)}`;return(0,s.createElement)(Tv,{__nextHasNoMarginBottom:n,label:i,id:w,help:f,className:c()("components-checkbox-control",o)},(0,s.createElement)("span",{className:"components-checkbox-control__input-container"},(0,s.createElement)("input",a({ref:y,id:w,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>p(e.target.checked),checked:l,"aria-describedby":f?w+"__help":void 0},m)),v?(0,s.createElement)(ay,{icon:Wm,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,h?(0,s.createElement)(ay,{icon:F_,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,s.createElement)("label",{className:"components-checkbox-control__label",htmlFor:w},r))};function Nk(e){let{className:t,children:n,onCopy:r,onFinishCopy:o,text:i,...l}=e;Kl()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const u=(0,s.useRef)(),f=(0,d.useCopyToClipboard)(i,(()=>{r(),clearTimeout(u.current),o&&(u.current=setTimeout((()=>o()),4e3))}));(0,s.useEffect)((()=>{clearTimeout(u.current)}),[]);const p=c()("components-clipboard-button",t);return(0,s.createElement)(id,a({},l,{className:p,ref:f,onCopy:e=>{e.target.focus()}}),n)}var Rk=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const Ik=$f("appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;&:hover{color:",kp.ui.theme,";}&:focus{background-color:transparent;color:",kp.ui.theme,";border-color:",kp.ui.theme,";outline:3px solid transparent;}",""),Mk={name:"1bcj5ek",styles:"width:100%;display:block"},Pk={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},Ok=$f("border:1px solid ",ph.surfaceBorderColor,";",""),Dk=$f(">*:not( marquee )>*{border-bottom:1px solid ",ph.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),Ak=ph.controlBorderRadius,Lk=$f("border-radius:",Ak,";",""),zk=$f("border-radius:",Ak,";>*:first-of-type>*{border-top-left-radius:",Ak,";border-top-right-radius:",Ak,";}>*:last-of-type>*{border-bottom-left-radius:",Ak,";border-bottom-right-radius:",Ak,";}",""),Bk=`calc(${ph.fontSize} * ${ph.fontLineHeightBase})`,Fk=`calc((${ph.controlHeight} - ${Bk} - 2px) / 2)`,Vk=`calc((${ph.controlHeightSmall} - ${Bk} - 2px) / 2)`,Hk=`calc((${ph.controlHeightLarge} - ${Bk} - 2px) / 2)`,jk={small:$f("padding:",Vk," ",ph.controlPaddingXSmall,";",""),medium:$f("padding:",Fk," ",ph.controlPaddingX,";",""),large:$f("padding:",Hk," ",ph.controlPaddingXLarge,";","")};const $k=(0,s.createContext)({size:"medium"}),Wk=()=>(0,s.useContext)($k);var Uk=ju((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=Hu(e,"ItemGroup");return{isBordered:n,className:Vu()(n&&Ok,o&&Dk,r&&zk,t),role:i,isSeparated:o,...a}}(e),{size:l}=Wk(),c={spacedAround:!n&&!r,size:o||l};return(0,s.createElement)($k.Provider,{value:c},(0,s.createElement)(td,a({},i,{ref:t})))}),"ItemGroup");function Gk(e){return Math.max(0,Math.min(100,e))}function Yk(e,t,n){const r=e.slice();return r[t]=n,r}function qk(e,t,n){if(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some(((e,o)=>{let{position:s}=e;return o!==t&&(Math.abs(s-n)({placement:"bottom",offset:8})),[]),i=c()("components-custom-gradient-picker__control-point-dropdown",n);return(0,s.createElement)(X_,a({isRenderedInSidebar:t,popoverProps:o,className:i},r))}function Qk(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:r,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:l,onStopControlPointChange:c,__experimentalIsRenderedInSidebar:d}=e;const f=(0,s.useRef)(),p=e=>{const t=Xk(e.clientX,r.current),{initialPosition:n,index:o,significantMoveHappened:s}=f.current;!s&&Math.abs(n-t)>=5&&(f.current.significantMoveHappened=!0),a(qk(i,o,t))},m=()=>{window&&window.removeEventListener&&f.current&&f.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",m),c(),f.current.listenersActivated=!1)},h=(0,s.useRef)();return h.current=m,(0,s.useEffect)((()=>()=>{h.current()}),[]),i.map(((e,r)=>{const h=null==e?void 0:e.position;return o!==h&&(0,s.createElement)(Jk,{isRenderedInSidebar:d,key:r,onClose:c,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(Zk,{key:r,onClick:()=>{f.current&&f.current.significantMoveHappened||(n?c():l(),o())},onMouseDown:()=>{window&&window.addEventListener&&(f.current={initialPosition:h,index:r,significantMoveHappened:!1,listenersActivated:!0},l(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",m))},onKeyDown:t=>{"ArrowLeft"===t.code?(t.stopPropagation(),a(qk(i,r,Gk(e.position-10)))):"ArrowRight"===t.code&&(t.stopPropagation(),a(qk(i,r,Gk(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:o=>{let{onClose:l}=o;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(B_,{enableAlpha:!n,color:e.color,onChange:e=>{a(Kk(i,r,gp(e).toRgbString()))}}),!t&&i.length>2&&(0,s.createElement)(Uv,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,s.createElement)(id,{onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,r)),l()},variant:"link"},(0,u.__)("Remove Control Point"))))},style:{left:`${e.position}%`,transform:"translateX( -50% )"}})}))}Qk.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:r,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:l}=e;const[c,u]=(0,s.useState)(!1);return(0,s.createElement)(Jk,{isRenderedInSidebar:l,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(id,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?o():(u(!1),r()),n()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:$m})},renderContent:()=>(0,s.createElement)(B_,{enableAlpha:!a,onChange:e=>{c?n(function(e,t,n){const r=e.findIndex((e=>e.position===t));return Kk(e,r,n)}(t,i,gp(e).toRgbString())):(n(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(t,i,gp(e).toRgbString())),u(!0))}}),style:null!==i?{left:`${i}%`,transform:"translateX( -50% )"}:void 0})};var eS=Qk;function tS(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const nS={id:"IDLE"};function rS(e){let{background:t,hasGradient:n,value:r,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:l}=e;const u=(0,s.useRef)(),[d,f]=(0,s.useReducer)(tS,nS),p=e=>{const t=Xk(e.clientX,u.current);r.some((e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===d.id&&f({type:"STOP_INSERTER_MOVE"}):f({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===d.id,h="INSERTING_CONTROL_POINT"===d.id;return(0,s.createElement)("div",{className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:p,onMouseMove:p,style:{background:t},onMouseLeave:()=>{f({type:"STOP_INSERTER_MOVE"})}},(0,s.createElement)("div",{ref:u,className:"components-custom-gradient-picker__markers-container"},!i&&(m||h)&&(0,s.createElement)(eS.InsertPoint,{__experimentalIsRenderedInSidebar:l,disableAlpha:a,insertPosition:d.insertPosition,value:r,onChange:o,onOpenInserter:()=>{f({type:"OPEN_INSERTER"})},onCloseInserter:()=>{f({type:"CLOSE_INSERTER"})}}),(0,s.createElement)(eS,{__experimentalIsRenderedInSidebar:l,disableAlpha:a,disableRemove:i,gradientPickerDomRef:u,ignoreMarkerPosition:h?d.insertPosition:void 0,value:r,onChange:o,onStartControlPointChange:()=>{f({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{f({type:"STOP_CONTROL_CHANGE"})}})))}var oS=n(7115);const iS="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",aS={type:"angular",value:90},sS=[{value:"linear-gradient",label:(0,u.__)("Linear")},{value:"radial-gradient",label:(0,u.__)("Radial")}],lS={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function cS(e){let{type:t,value:n,length:r}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(r)}`}function uS(e){let{type:t,orientation:n,colorStops:r}=e;const o=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(n);return`${t}(${[o,...r.sort(((e,t)=>{var n,r,o,i;return(null!==(n=null==e||null===(r=e.length)||void 0===r?void 0:r.value)&&void 0!==n?n:0)-(null!==(o=null==t||null===(i=t.length)||void 0===i?void 0:i.value)&&void 0!==o?o:0)})).map(cS)].filter(Boolean).join(",")})`}function dS(e){return void 0===e.length||"%"!==e.length.type}function fS(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}bp([yp]);const pS=Qu(Hm,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),mS=Qu(Hm,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),hS=e=>{var t,n;let{gradientAST:r,hasGradient:o,onChange:i}=e;const a=null!==(t=null==r||null===(n=r.orientation)||void 0===n?void 0:n.value)&&void 0!==t?t:180;return(0,s.createElement)(ob,{__nextHasNoMarginBottom:!0,onChange:e=>{i(uS({...r,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:o?a:""})},gS=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const{type:o}=t;return(0,s.createElement)(dy,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,u.__)("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&r(uS({...t,...t.orientation?{}:{orientation:aS},type:"linear-gradient"})),"radial-gradient"===e&&(()=>{const{orientation:e,...n}=t;r(uS({...n,type:"radial-gradient"}))})()},options:sS,size:"__unstable-large",value:n&&o})};function vS(e){let{__nextHasNoMargin:t=!1,value:n,onChange:r,__experimentalIsRenderedInSidebar:o}=e;const i=function(e){var t;let n;try{n=oS.parse(e)[0],n.value=e}catch(e){n=oS.parse(iS)[0],n.value=iS}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=lS[n.orientation.value].toString()),n.colorStops.some(dS)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=uS(n)}return n}(n),a=function(e){return uS({type:"linear-gradient",orientation:aS,colorStops:e.colorStops})}(i),l=i.value!==iS,u=i.colorStops.map((e=>({color:fS(e),position:parseInt(e.length.value)})));return t||Kl()("Outer margin styles for wp.components.CustomGradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,s.createElement)(H_,{spacing:4,className:c()("components-custom-gradient-picker",{"is-next-has-no-margin":t})},(0,s.createElement)(rS,{__experimentalIsRenderedInSidebar:o,background:a,hasGradient:l,value:u,onChange:e=>{r(uS(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:r,g:o,b:i,a:a}=gp(n).toRgb();return{length:{type:"%",value:null==t?void 0:t.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,o,i,a]:[r,o,i]}}))}}(i,e)))}}),(0,s.createElement)(Xm,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,s.createElement)(pS,null,(0,s.createElement)(gS,{gradientAST:i,hasGradient:l,onChange:r})),(0,s.createElement)(mS,null,"linear-gradient"===i.type&&(0,s.createElement)(hS,{gradientAST:i,hasGradient:l,onChange:r}))))}const bS=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function yS(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a}=e;const l=(0,s.useMemo)((()=>r.map(((e,t)=>{let{gradient:r,name:a}=e;return(0,s.createElement)(V_.Option,{key:r,value:r,isSelected:i===r,tooltipText:a||(0,u.sprintf)((0,u.__)("Gradient code: %s"),r),style:{color:"rgba( 0,0,0,0 )",background:r},onClick:i===r?n:()=>o(r,t),"aria-label":a?(0,u.sprintf)((0,u.__)("Gradient: %s"),a):(0,u.sprintf)((0,u.__)("Gradient code: %s"),r)})}))),[r,i,o,n]);return(0,s.createElement)(V_,{className:t,options:l,actions:a})}function wS(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:l}=e;return(0,s.createElement)(H_,{spacing:3,className:t},r.map(((e,t)=>{let{name:c,gradients:u}=e;return(0,s.createElement)(H_,{spacing:2,key:t},(0,s.createElement)(W_,null,c),(0,s.createElement)(yS,a({clearGradient:n,gradients:u,onChange:e=>o(e,t),value:i},r.length===t+1?{actions:l}:{})))})))}function xS(e){let{__nextHasNoMargin:t=!1,className:n,gradients:r,onChange:o,value:i,clearable:l=!0,disableCustomGradients:c=!1,__experimentalIsRenderedInSidebar:d}=e;const f=(0,s.useCallback)((()=>o(void 0)),[o]),p=bS(r)?wS:yS;t||Kl()("Outer margin styles for wp.components.GradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"});const m=t?{}:{marginTop:null!=r&&r.length?void 0:3,marginBottom:l?0:6};return(0,s.createElement)(qv,a({marginBottom:0},m),(0,s.createElement)(H_,{spacing:null!=r&&r.length?4:0},!c&&(0,s.createElement)(vS,{__nextHasNoMargin:!0,__experimentalIsRenderedInSidebar:d,value:i,onChange:o}),((null==r?void 0:r.length)||l)&&(0,s.createElement)(p,{className:n,clearable:l,clearGradient:f,gradients:r,onChange:o,value:i,actions:l&&!c&&(0,s.createElement)(V_.ButtonAction,{onClick:f},(0,u.__)("Clear"))})))}var _S=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})),ES=window.wp.dom;const CS=()=>{},kS=["menuitem","menuitemradio","menuitemcheckbox"];class SS extends s.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?ES.focus.tabbable:ES.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=CS,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role"),n=kS.includes(t),r="Tab"===e.code;(n||r)&&e.preventDefault()}if(!a)return;const s=t(e.target.ownerDocument.activeElement);if(!s)return;const{index:l,focusables:c}=s,u=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(l,c.length,a):l+a;u>=0&&u(0,s.createElement)(SS,a({},e,{forwardedRef:t}));TS.displayName="NavigableContainer";var NS=(0,s.forwardRef)(TS);var RS=(0,s.forwardRef)((function(e,t){let{role:n="menu",orientation:r="vertical",...o}=e;return(0,s.createElement)(NS,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:n,"aria-orientation":"presentation"===n?null:r,eventToOffset:e=>{const{code:t}=e;let n=["ArrowDown"],o=["ArrowUp"];return"horizontal"===r&&(n=["ArrowRight"],o=["ArrowLeft"]),"both"===r&&(n=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),n.includes(t)?1:o.includes(t)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t)?0:void 0}},o))}));function IS(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}function MS(e){return"function"==typeof e}var PS=function(e){const{children:t,className:n,controls:r,icon:o=_S,label:i,popoverProps:l,toggleProps:u,menuProps:d,disableOpenOnArrowDown:f=!1,text:p,noIcons:m}=e;if(!(null!=r&&r.length||MS(t)))return null;let h;null!=r&&r.length&&(h=r,Array.isArray(h[0])||(h=[h]));const g=IS({className:"components-dropdown-menu__popover"},l);return(0,s.createElement)(ty,{className:c()("components-dropdown-menu",n),popoverProps:g,renderToggle:e=>{var t;let{isOpen:n,onToggle:r}=e;const l=IS({className:c()("components-dropdown-menu__toggle",{"is-opened":n})},u);return(0,s.createElement)(id,a({},l,{icon:o,onClick:e=>{r(e),l.onClick&&l.onClick(e)},onKeyDown:e=>{(e=>{f||n||"ArrowDown"!==e.code||(e.preventDefault(),r())})(e),l.onKeyDown&&l.onKeyDown(e)},"aria-haspopup":"true","aria-expanded":n,label:i,text:p,showTooltip:null===(t=null==u?void 0:u.showTooltip)||void 0===t||t}),l.children)},renderContent:e=>{var n;const r=IS({"aria-label":i,className:c()("components-dropdown-menu__menu",{"no-icons":m})},d);return(0,s.createElement)(RS,a({},r,{role:"menu"}),MS(t)?t(e):null,null===(n=h)||void 0===n?void 0:n.flatMap(((t,n)=>t.map(((t,r)=>(0,s.createElement)(id,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))}})};const OS=Qu(V_.Option,{target:"e5bw3229"})("width:",qm(6),";height:",qm(6),";pointer-events:none;"),DS=Qu(Iv,{target:"e5bw3228"})(jh,"{background:",kp.gray[100],";border-radius:",ph.controlBorderRadius,";",Wh,Wh,Wh,Wh,"{height:",qm(8),";}",qh,qh,qh,"{border-color:transparent;box-shadow:none;}}"),AS=Qu(td,{target:"e5bw3227"})("padding:3px 0 3px ",qm(3),";height:calc( 40px - ",ph.borderWidth," );border:1px solid ",ph.surfaceBorderColor,";border-bottom-color:transparent;&:first-of-type{border-top-left-radius:",ph.controlBorderRadius,";border-top-right-radius:",ph.controlBorderRadius,";}&:last-of-type{border-bottom-left-radius:",ph.controlBorderRadius,";border-bottom-right-radius:",ph.controlBorderRadius,";border-bottom-color:",ph.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",kp.ui.theme,";}"),LS=Qu("div",{target:"e5bw3226"})("line-height:",qm(8),";margin-left:",qm(2),";margin-right:",qm(2),";white-space:nowrap;overflow:hidden;",AS,":hover &{color:",kp.ui.theme,";}"),zS=Qu($_,{target:"e5bw3225"})("text-transform:uppercase;line-height:",qm(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),BS=Qu(td,{target:"e5bw3224"})("height:",qm(6),";display:flex;"),FS=Qu(Uv,{target:"e5bw3223"})("margin-bottom:",qm(2),";"),VS=Qu(td,{target:"e5bw3222"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),HS=Qu(id,{target:"e5bw3221"})("&&{color:",kp.ui.theme,";}"),jS=Qu(id,{target:"e5bw3220"})("&&{margin-top:",qm(1),";}"),$S="#000";function WS(e){let{value:t,onChange:n,label:r}=e;return(0,s.createElement)(DS,{label:r,hideLabelFromVision:!0,value:t,onChange:n})}function US(e){let{isGradient:t,element:n,onChange:r,onClose:o=(()=>{})}=e;return(0,s.createElement)(If,{placement:"left-start",offset:20,className:"components-palette-edit__popover",onClose:o},!t&&(0,s.createElement)(B_,{color:n.color,enableAlpha:!0,onChange:e=>r({...n,color:e})}),t&&(0,s.createElement)("div",{className:"components-palette-edit__popover-gradient-picker"},(0,s.createElement)(vS,{__nextHasNoMargin:!0,__experimentalIsRenderedInSidebar:!0,value:n.gradient,onChange:e=>r({...n,gradient:e})})))}function GS(e){let{canOnlyChangeValues:t,element:n,onChange:r,isEditing:o,onStartEditing:i,onRemove:l,onStopEditing:c,slugPrefix:f,isGradient:p}=e;const m=(0,d.__experimentalUseFocusOutside)(c),h=p?n.gradient:n.color;return(0,s.createElement)(AS,a({className:o?"is-selected":void 0,as:"div",onClick:i},o?{...m}:{style:{cursor:"pointer"}}),(0,s.createElement)(Uv,{justify:"flex-start"},(0,s.createElement)(jm,null,(0,s.createElement)(OS,{style:{background:h,color:"transparent"}})),(0,s.createElement)(jm,null,o&&!t?(0,s.createElement)(WS,{label:p?(0,u.__)("Gradient name"):(0,u.__)("Color name"),value:n.name,onChange:e=>r({...n,name:e,slug:f+(0,ec.kebabCase)(e)})}):(0,s.createElement)(LS,null,n.name)),o&&!t&&(0,s.createElement)(jm,null,(0,s.createElement)(jS,{isSmall:!0,icon:Rb,label:(0,u.__)("Remove color"),onClick:l}))),o&&(0,s.createElement)(US,{isGradient:p,onChange:r,element:n}))}function YS(e,t){let{slug:n,color:r,gradient:o}=t;return new RegExp(`^${e}color-([\\d]+)$`).test(n)&&(!!r&&r===$S||!!o&&o===iS)}function qS(e){let{elements:t,onChange:n,editingElement:r,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:l}=e;const c=(0,s.useRef)();(0,s.useEffect)((()=>{c.current=t}),[t]),(0,s.useEffect)((()=>()=>{if(c.current.some(((e,t)=>YS(a,e)))){const e=c.current.filter((e=>!YS(a,e)));n(e.length?e:void 0)}}),[]);const u=(0,d.useDebounce)(n,100);return(0,s.createElement)(H_,{spacing:3},(0,s.createElement)(Uk,{isRounded:!0},t.map(((e,c)=>(0,s.createElement)(GS,{isGradient:l,canOnlyChangeValues:i,key:c,element:e,onStartEditing:()=>{r!==c&&o(c)},onChange:e=>{u(t.map(((t,n)=>n===c?e:t)))},onRemove:()=>{o(null);const e=t.filter(((e,t)=>t!==c));n(e.length?e:void 0)},isEditing:c===r,onStopEditing:()=>{c===r&&o(null)},slugPrefix:a})))))}const KS=[];function XS(e){let{gradients:t,colors:n=KS,onChange:r,paletteLabel:o,emptyMessage:i,canOnlyChangeValues:a,canReset:l,slugPrefix:c=""}=e;const f=!!t,p=f?t:n,[m,h]=(0,s.useState)(!1),[g,v]=(0,s.useState)(null),b=m&&g&&p[g]&&!p[g].slug,y=p.length>0,w=(0,d.useDebounce)(r,100),x=(0,s.useCallback)(((e,t)=>{const n=p[t];n&&n[f?"gradient":"color"]===e?v(t):h(!0)}),[f,p]);return(0,s.createElement)(VS,null,(0,s.createElement)(FS,null,(0,s.createElement)(zS,null,o),(0,s.createElement)(BS,null,y&&m&&(0,s.createElement)(HS,{isSmall:!0,onClick:()=>{h(!1),v(null)}},(0,u.__)("Done")),!a&&(0,s.createElement)(id,{isSmall:!0,isPressed:b,icon:$m,label:f?(0,u.__)("Add gradient"):(0,u.__)("Add color"),onClick:()=>{const e=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof(null==t?void 0:t.slug)){const r=null==t?void 0:t.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return(0,u.sprintf)((0,u.__)("Color %s"),r)}(p,c);r([...p,{...f?{gradient:iS}:{color:$S},name:e,slug:c+(0,ec.kebabCase)(e)}]),h(!0),v(p.length)}}),y&&(!m||!a||l)&&(0,s.createElement)(PS,{icon:Rk,label:f?(0,u.__)("Gradient options"):(0,u.__)("Color options"),toggleProps:{isSmall:!0}},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(RS,{role:"menu"},!m&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{h(!0),t()},className:"components-palette-edit__menu-button"},(0,u.__)("Show details")),!a&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{v(null),h(!1),r(),t()},className:"components-palette-edit__menu-button"},f?(0,u.__)("Remove all gradients"):(0,u.__)("Remove all colors")),l&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{v(null),r(),t()}},f?(0,u.__)("Reset gradient"):(0,u.__)("Reset colors"))))})))),y&&(0,s.createElement)(s.Fragment,null,m&&(0,s.createElement)(qS,{canOnlyChangeValues:a,elements:p,onChange:r,editingElement:g,setEditingElement:v,slugPrefix:c,isGradient:f}),!m&&null!==g&&(0,s.createElement)(US,{isGradient:f,onClose:()=>v(null),onChange:e=>{w(p.map(((t,n)=>n===g?e:t)))},element:p[g]}),!m&&(f?(0,s.createElement)(xS,{__nextHasNoMargin:!0,gradients:t,onChange:x,clearable:!1,disableCustomGradients:!0}):(0,s.createElement)(J_,{colors:n,onChange:x,clearable:!1,disableCustomColors:!0}))),!y&&i)}const ZS=e=>{let{__next36pxDefaultSize:t}=e;return!t&&$f("height:28px;padding-left:",qm(1),";padding-right:",qm(1),";","")},JS=Qu(Xm,{target:"evuatpg0"})("height:34px;padding-left:",qm(2),";padding-right:",qm(2),";",ZS,";");const QS=(0,s.forwardRef)((function(e,t){const{value:n,isExpanded:r,instanceId:o,selectedSuggestionIndex:i,className:l,onChange:u,onFocus:d,onBlur:f,...p}=e,[m,h]=(0,s.useState)(!1),g=n?n.length+1:0;return(0,s.createElement)("input",a({ref:t,id:`components-form-token-input-${o}`,type:"text"},p,{value:n||"",onChange:e=>{u&&u({value:e.target.value})},onFocus:e=>{h(!0),null==d||d(e)},onBlur:e=>{h(!1),null==f||f(e)},size:g,className:c()(l,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":m&&-1!==i&&r?`components-form-token-suggestions-${o}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`}))}));var eT=QS,tT=n(5425),nT=n.n(tT);const rT=e=>{e.preventDefault()};var oT=function(e){let{selectedIndex:t,scrollIntoView:n,match:r,onHover:o,onSelect:i,suggestions:a=[],displayTransform:l,instanceId:u,__experimentalRenderItem:f}=e;const[p,m]=(0,s.useState)(!1),h=(0,d.useRefEffect)((e=>{let r;return t>-1&&n&&e.children[t]&&(m(!0),nT()(e.children[t],e,{onlyScrollIfNeeded:!0}),r=requestAnimationFrame((()=>{m(!1)}))),()=>{void 0!==r&&cancelAnimationFrame(r)}}),[t,n]),g=e=>()=>{p||null==o||o(e)},v=e=>()=>{null==i||i(e)};return(0,s.createElement)("ul",{ref:h,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${u}`,role:"listbox"},a.map(((e,n)=>{const o=(e=>{const t=l(r).toLocaleLowerCase();if(0===t.length)return null;const n=l(e),o=n.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:n.substring(0,o),suggestionMatch:n.substring(o,o+t.length),suggestionAfterMatch:n.substring(o+t.length)}})(e),i=c()("components-form-token-field__suggestion",{"is-selected":n===t});let a;return a="function"==typeof f?f({item:e}):o?(0,s.createElement)("span",{"aria-label":l(e)},o.suggestionBeforeMatch,(0,s.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):l(e),(0,s.createElement)("li",{id:`components-form-token-suggestions-${u}-${n}`,role:"option",className:i,key:"object"==typeof e&&"value"in e?null==e?void 0:e.value:l(e),onMouseDown:rT,onClick:v(e),onMouseEnter:g(e),"aria-selected":n===t},a)})))},iT=(0,d.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,s.useState)(),o=(0,s.useCallback)((e=>r((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,s.createElement)("div",(0,d.__experimentalUseFocusOutside)(n),(0,s.createElement)(e,a({ref:o},t)))}),"withFocusOutside");const aT=()=>{},sT=iT(class extends s.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});var lT=function e(t){var n;let{__nextHasNoMarginBottom:r=!1,__next36pxDefaultSize:o,value:i,label:a,options:l,onChange:f,onFilterValueChange:p=aT,hideLabelFromVision:m,help:h,allowReset:g=!0,className:v,messages:b={selected:(0,u.__)("Item selected.")},__experimentalRenderItem:y}=t;const[w,x]=P_({value:i,onChange:f}),_=l.find((e=>e.value===w)),E=null!==(n=null==_?void 0:_.label)&&void 0!==n?n:"",C=(0,d.useInstanceId)(e,"combobox-control"),[k,S]=(0,s.useState)(_||null),[T,N]=(0,s.useState)(!1),[R,I]=(0,s.useState)(!1),[M,P]=(0,s.useState)(""),O=(0,s.useRef)(),D=(0,s.useMemo)((()=>{const e=[],t=[],n=ub(M);return l.forEach((r=>{const o=ub(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,l]),A=e=>{x(e.value),(0,lb.speak)(b.selected,"assertive"),S(e),P(""),N(!1)},L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=D.indexOf(k);let n=t+e;n<0?n=D.length-1:n>=D.length&&(n=0),S(D[n]),N(!0)};return(0,s.useEffect)((()=>{const e=D.length>0,t=D.indexOf(k)>0;e&&!t&&S(D[0])}),[D,k]),(0,s.useEffect)((()=>{const e=D.length>0;if(T){const t=e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",D.length),D.length):(0,u.__)("No results.");(0,lb.speak)(t,"polite")}}),[D,T]),(0,s.createElement)(sT,{onFocusOutside:()=>{N(!1)}},(0,s.createElement)(Tv,{__nextHasNoMarginBottom:r,className:c()(v,"components-combobox-control"),tabIndex:"-1",label:a,id:`components-form-token-input-${C}`,hideLabelFromVision:m,help:h},(0,s.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.code){case"Enter":k&&(A(k),t=!0);break;case"ArrowUp":L(-1),t=!0;break;case"ArrowDown":L(1),t=!0;break;case"Escape":N(!1),S(null),t=!0}t&&e.preventDefault()}}},(0,s.createElement)(JS,{__next36pxDefaultSize:o},(0,s.createElement)(Hm,null,(0,s.createElement)(eT,{className:"components-combobox-control__input",instanceId:C,ref:O,value:T?M:E,onFocus:()=>{I(!0),N(!0),p(""),P("")},onBlur:()=>{I(!1)},isExpanded:T,selectedSuggestionIndex:D.indexOf(k),onChange:e=>{const t=e.value;P(t),p(t),R&&N(!0)}})),g&&(0,s.createElement)(jm,null,(0,s.createElement)(id,{className:"components-combobox-control__reset",icon:Nb,disabled:!w,onClick:()=>{x(null),O.current.focus()},label:(0,u.__)("Reset")}))),T&&(0,s.createElement)(oT,{instanceId:C,match:{label:M},displayTransform:e=>e.label,suggestions:D,selectedIndex:D.indexOf(k),onHover:S,onSelect:A,scrollIntoView:!0,__experimentalRenderItem:y}))))};const cT=new Set(["alert","status","log","marquee","timer"]);let uT=[],dT=!1;function fT(e){if(dT)return;Array.from(document.body.children).forEach((t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&cT.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),uT.push(t))})),dT=!0}let pT=0;const mT=(0,s.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:r="dialog",title:o=null,focusOnMount:i=!0,shouldCloseOnEsc:l=!0,shouldCloseOnClickOutside:f=!0,isDismissible:p=!0,aria:m={labelledby:void 0,describedby:void 0},onRequestClose:h,icon:g,closeButtonLabel:v,children:b,style:y,overlayClassName:w,className:x,contentLabel:_,onKeyDown:E,isFullScreen:C=!1,__experimentalHideHeader:k=!1}=e,S=(0,s.useRef)(),T=(0,d.useInstanceId)(mT),N=o?`components-modal-header-${T}`:m.labelledby,R=(0,d.useFocusOnMount)(i),I=(0,d.useConstrainedTabbing)(),M=(0,d.useFocusReturn)(),P=(0,d.__experimentalUseFocusOutside)(h),[O,D]=(0,s.useState)(!1);(0,s.useEffect)((()=>(pT++,1===pT&&(fT(S.current),document.body.classList.add(n)),()=>{pT--,0===pT&&(document.body.classList.remove(n),dT&&(uT.forEach((e=>{e.removeAttribute("aria-hidden")})),uT=[],dT=!1))})),[n]);const A=(0,s.useCallback)((e=>{var t,n;const r=null!==(t=null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.scrollTop)&&void 0!==t?t:-1;!O&&r>0?D(!0):O&&r<=0&&D(!1)}),[O]);return(0,s.createPortal)((0,s.createElement)("div",{ref:(0,d.useMergeRefs)([S,t]),className:c()("components-modal__screen-overlay",w),onKeyDown:function(e){e.nativeEvent.isComposing||229===e.keyCode||l&&"Escape"===e.code&&!e.defaultPrevented&&(e.preventDefault(),h&&h(e))}},(0,s.createElement)(of,{document:document},(0,s.createElement)("div",a({className:c()("components-modal__frame",x,{"is-full-screen":C}),style:y,ref:(0,d.useMergeRefs)([I,M,R]),role:r,"aria-label":_,"aria-labelledby":_?void 0:N,"aria-describedby":m.describedby,tabIndex:-1},f?P:{},{onKeyDown:E}),(0,s.createElement)("div",{className:c()("components-modal__content",{"hide-header":k,"has-scrolled-content":O}),role:"document",onScroll:A},!k&&(0,s.createElement)("div",{className:"components-modal__header"},(0,s.createElement)("div",{className:"components-modal__header-heading-container"},g&&(0,s.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},g),o&&(0,s.createElement)("h1",{id:N,className:"components-modal__header-heading"},o)),p&&(0,s.createElement)(id,{onClick:h,icon:Yl,label:v||(0,u.__)("Close")})),b)))),document.body)}));var hT=mT;const gT={name:"7g5ii0",styles:"&&{z-index:1000001;}"};var vT=ju((function(e,t){const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:l,cancelButtonText:c,...d}=Hu(e,"ConfirmDialog"),f=Vu()(gT),[p,m]=(0,s.useState)(),[h,g]=(0,s.useState)();(0,s.useEffect)((()=>{const e=void 0!==n;m(!e||n),g(!e)}),[n]);const v=(0,s.useCallback)((e=>t=>{null==e||e(t),h&&m(!1)}),[h,m]),b=(0,s.useCallback)((e=>{"Enter"===e.key&&v(r)(e)}),[v,r]),y=null!=c?c:(0,u.__)("Cancel"),w=null!=l?l:(0,u.__)("OK");return(0,s.createElement)(s.Fragment,null,p&&(0,s.createElement)(hT,a({onRequestClose:v(o),onKeyDown:b,closeButtonLabel:y,isDismissible:!0,ref:t,overlayClassName:f,__experimentalHideHeader:!0},d),(0,s.createElement)(H_,{spacing:8},(0,s.createElement)(Rh,null,i),(0,s.createElement)(Xm,{direction:"row",justify:"flex-end"},(0,s.createElement)(id,{variant:"tertiary",onClick:v(o)},y),(0,s.createElement)(id,{variant:"primary",onClick:v(r)},w)))))}),"ConfirmDialog"),bT=n(2652),yT=n.n(bT);n(2797);function wT(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function xT(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function _T(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}var CT=function(){return CT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&C>=0&&E<=h&&_<=m&&x>=O&&E<=A&&C>=L&&_<=D)return T;var z=getComputedStyle(R),B=parseInt(z.borderLeftWidth,10),F=parseInt(z.borderTopWidth,10),V=parseInt(z.borderRightWidth,10),H=parseInt(z.borderBottomWidth,10),j=0,$=0,W="offsetWidth"in R?R.offsetWidth-R.clientWidth-B-V:0,U="offsetHeight"in R?R.offsetHeight-R.clientHeight-F-H:0,G="offsetWidth"in R?0===R.offsetWidth?0:P/R.offsetWidth:0,Y="offsetHeight"in R?0===R.offsetHeight?0:M/R.offsetHeight:0;if(d===R)j="start"===o?k:"end"===o?k-h:"nearest"===o?ET(v,v+h,h,F,H,v+k,v+k+y,y):k-h/2,$="start"===i?S:"center"===i?S-m/2:"end"===i?S-m:ET(g,g+m,m,B,V,g+S,g+S+w,w),j=Math.max(0,j+v),$=Math.max(0,$+g);else{j="start"===o?k-O-F:"end"===o?k-A+H+U:"nearest"===o?ET(O,A,M,F,H+U,k,k+y,y):k-(O+M/2)+U/2,$="start"===i?S-L-B:"center"===i?S-(L+P/2)+W/2:"end"===i?S-D+V+W:ET(L,D,P,B,V+W,S,S+w,w);var q=R.scrollLeft,K=R.scrollTop;k+=K-(j=Math.max(0,Math.min(K+j/Y,R.scrollHeight-M/Y+U))),S+=q-($=Math.max(0,Math.min(q+$/G,R.scrollWidth-P/G+W)))}T.push({el:R,top:j,left:$})}return T}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function NT(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function RT(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a{n=null,e(...i)}),t)}return o.cancel=r,o}function IT(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function MT(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function PT(){return String(kT++)}function OT(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function DT(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=AT(t,r)?t[r]:e[r],n)),{})}function AT(e,t){return void 0!==e[t]}function LT(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function zT(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=BT(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function BT(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?BT(1,0,n,r,!1):BT(-1,n-1,n,r,!1):-1}function FT(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(NT(t,e,n)||r&&NT(t,n.document.activeElement,n))))}const VT=RT((e=>{jT(e).textContent=""}),500);function HT(e,t){const n=jT(t);e&&(n.textContent=e,VT(t))}function jT(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const $T={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function WT(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a=`on${XT(e)}Change`;o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const UT=RT(((e,t)=>{HT(e(),t)}),200),GT="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b.useLayoutEffect:b.useEffect;function YT(e){let{id:t=`downshift-${PT()}`,labelId:n,menuId:r,getItemId:o,toggleButtonId:i,inputId:a}=e;const s=(0,b.useRef)({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:o||(e=>`${t}-item-${e}`),toggleButtonId:i||`${t}-toggle-button`,inputId:a||`${t}-input`});return s.current}function qT(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function KT(e){return/^\S{1}$/.test(e)}function XT(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function ZT(e){const t=(0,b.useRef)(e);return t.current=e,t}function JT(e,t,n){const r=(0,b.useRef)(),o=(0,b.useRef)(),i=(0,b.useCallback)(((t,n)=>{o.current=n,t=DT(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[a,s]=(0,b.useReducer)(i,t),l=ZT(n),c=(0,b.useCallback)((e=>s({props:l.current,...e})),[l]),u=o.current;return(0,b.useEffect)((()=>{u&&r.current&&r.current!==a&&WT(u,DT(r.current,u.props),a),r.current=a}),[a,n,u]),[a,c]}function QT(e,t,n){const[r,o]=JT(e,t,n);return[DT(r,n),o]}const eN={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:TT,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function tN(e,t,n){void 0===n&&(n=$T);const r=e[`default${XT(t)}`];return void 0!==r?r:n[t]}function nN(e,t,n){void 0===n&&(n=$T);const r=e[t];if(void 0!==r)return r;const o=e[`initial${XT(t)}`];return void 0!==o?o:tN(e,t,n)}function rN(e){const t=nN(e,"selectedItem"),n=nN(e,"isOpen"),r=nN(e,"highlightedIndex"),o=nN(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oN(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):zT(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function iN(e,t,n,r){const o=(0,b.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,b.useEffect)((()=>{const i=()=>{o.current.isMouseDown=!0},a=i=>{o.current.isMouseDown=!1,e&&!FT(i.target,t.map((e=>e.current)),n)&&r()},s=()=>{o.current.isTouchMove=!1},l=()=>{o.current.isTouchMove=!0},c=i=>{!e||o.current.isTouchMove||FT(i.target,t.map((e=>e.current)),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),o}let aN=()=>ST;function sN(e,t,n){let{isInitialMount:r,highlightedIndex:o,items:i,environment:a,...s}=n;(0,b.useEffect)((()=>{r||UT((()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s})),a.document)}),t)}function lN(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=(0,b.useRef)(!0);return GT((()=>{t<0||!n||!Object.keys(r.current).length||(!1===s.current?s.current=!0:a(o(t),i))}),[t]),s}let cN=ST;function uN(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oN(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oN(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:tN(o,"highlightedIndex"),isOpen:tN(o,"isOpen"),selectedItem:tN(o,"selectedItem"),inputValue:tN(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function dN(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s=0&&{selectedItem:r.items[a]}}}break;case 13:i={highlightedIndex:oN(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:i={highlightedIndex:oN(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:i={isOpen:tN(r,"isOpen"),highlightedIndex:tN(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case 3:i={highlightedIndex:BT(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:i={highlightedIndex:BT(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:i={isOpen:!1,highlightedIndex:-1};break;case 7:{const n=t.key,o=`${e.inputValue}${n}`,a=dN({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case 0:i={highlightedIndex:zT(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 1:i={highlightedIndex:zT(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 20:i={selectedItem:t.selectedItem};break;default:return uN(e,t,mN)}return{...e,...i}}function gN(e){void 0===e&&(e={}),pN(e,gN);const t={...fN,...e},{items:n,scrollIntoView:r,environment:o,initialIsOpen:i,defaultIsOpen:a,itemToString:s,getA11ySelectionMessage:l,getA11yStatusMessage:c}=t,u=rN(t),[d,f]=QT(hN,u,t),{isOpen:p,highlightedIndex:m,selectedItem:h,inputValue:g}=d,v=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)({}),x=(0,b.useRef)(!0),_=(0,b.useRef)(null),E=YT(t),C=(0,b.useRef)(),k=(0,b.useRef)(!0),S=ZT({state:d,props:t}),T=(0,b.useCallback)((e=>w.current[E.getItemId(e)]),[E]);sN(c,[p,m,g,n],{isInitialMount:k.current,previousResultCount:C.current,items:n,environment:o,itemToString:s,...d}),sN(l,[h],{isInitialMount:k.current,previousResultCount:C.current,items:n,environment:o,itemToString:s,...d});const N=lN({menuElement:y.current,highlightedIndex:m,isOpen:p,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:T});(0,b.useEffect)((()=>(_.current=RT((e=>{e({type:21,inputValue:""})}),500),()=>{_.current.cancel()})),[]),(0,b.useEffect)((()=>{g&&_.current(f)}),[f,g]),cN({isInitialMount:k.current,props:t,state:d}),(0,b.useEffect)((()=>{k.current?(i||a||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():o.document.activeElement===y.current&&v.current&&(x.current=!1,v.current.focus())}),[p]),(0,b.useEffect)((()=>{k.current||(C.current=n.length)}));const R=iN(p,[y,v],o,(()=>{f({type:8})})),I=aN();(0,b.useEffect)((()=>{k.current=!1}),[]),(0,b.useEffect)((()=>{p||(w.current={})}),[p]);const M=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:13,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:14,getItemNodeFromIndex:T,shiftKey:e.shiftKey})}})),[f,T]),P=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:0,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:1,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),f({type:3,getItemNodeFromIndex:T})},End(e){e.preventDefault(),f({type:4,getItemNodeFromIndex:T})},Escape(){f({type:2})},Enter(e){e.preventDefault(),f({type:5})}," "(e){e.preventDefault(),f({type:6})}})),[f,T]),O=(0,b.useCallback)((()=>{f({type:16})}),[f]),D=(0,b.useCallback)((()=>{f({type:18})}),[f]),A=(0,b.useCallback)((()=>{f({type:17})}),[f]),L=(0,b.useCallback)((e=>{f({type:19,highlightedIndex:e})}),[f]),z=(0,b.useCallback)((e=>{f({type:20,selectedItem:e})}),[f]),B=(0,b.useCallback)((()=>{f({type:22})}),[f]),F=(0,b.useCallback)((e=>{f({type:21,inputValue:e})}),[f]),V=(0,b.useCallback)((e=>({id:E.labelId,htmlFor:E.toggleButtonId,...e})),[E]),H=(0,b.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const c=S.current.state;return I("getMenuProps",l,r,y),{[r]:MT(a,(e=>{y.current=e})),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,tabIndex:-1,...c.isOpen&&c.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(c.highlightedIndex)},onMouseLeave:IT(n,(()=>{f({type:9})})),onKeyDown:IT(o,(e=>{const t=LT(e);t&&P[t]?P[t](e):KT(t)&&f({type:7,key:t,getItemNodeFromIndex:T})})),onBlur:IT(i,(()=>{if(!1===x.current)return void(x.current=!0);!R.current.isMouseDown&&f({type:8})})),...s}}),[f,S,P,R,I,E,T]),j=(0,b.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{f({type:12})},c=e=>{const t=LT(e);t&&M[t]?M[t](e):KT(t)&&f({type:15,key:t,getItemNodeFromIndex:T})},u={[o]:MT(i,(e=>{v.current=e})),id:E.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":S.current.state.isOpen,"aria-labelledby":`${E.labelId} ${E.toggleButtonId}`,...a};return a.disabled||(u.onClick=IT(n,l),u.onKeyDown=IT(r,c)),I("getToggleButtonProps",s,o,v),u}),[f,S,M,I,E,T]),$=(0,b.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,disabled:s,...l}=void 0===e?{}:e;const{state:c,props:u}=S.current,d=()=>{f({type:11,index:n})},p=qT(n,t,u.items);if(p<0)throw new Error("Pass either item or item index in getItemProps!");const m={disabled:s,role:"option","aria-selected":`${p===c.highlightedIndex}`,id:E.getItemId(p),[i]:MT(a,(e=>{e&&(w.current[E.getItemId(p)]=e)})),...l};return s||(m.onClick=IT(o,d)),m.onMouseMove=IT(r,(()=>{n!==c.highlightedIndex&&(N.current=!1,f({type:10,index:n,disabled:s}))})),m}),[f,S,N,E]);return{getToggleButtonProps:j,getLabelProps:V,getMenuProps:H,getItemProps:$,toggleMenu:O,openMenu:A,closeMenu:D,setHighlightedIndex:L,selectItem:z,reset:B,setInputValue:F,highlightedIndex:m,isOpen:p,selectedItem:h,inputValue:g}}gN.stateChangeTypes=mN;yT().array.isRequired,yT().func,yT().func,yT().func,yT().bool,yT().number,yT().number,yT().number,yT().bool,yT().bool,yT().bool,yT().any,yT().any,yT().any,yT().string,yT().string,yT().string,yT().string,yT().string,yT().string,yT().func,yT().string,yT().string,yT().func,yT().func,yT().func,yT().func,yT().func,yT().func,yT().shape({addEventListener:yT().func,removeEventListener:yT().func,document:yT().shape({getElementById:yT().func,activeElement:yT().any,body:yT().any})});yT().array,yT().array,yT().array,yT().func,yT().func,yT().func,yT().number,yT().number,yT().number,yT().func,yT().func,yT().string,yT().string,yT().shape({addEventListener:yT().func,removeEventListener:yT().func,document:yT().shape({getElementById:yT().func,activeElement:yT().any,body:yT().any})});const vN=e=>e.__nextUnconstrainedWidth?"":$f(jh,"{min-width:130px;}",""),bN=Qu(tg,{target:"eswuck60"})(vN,";"),yN=e=>null==e?void 0:e.name,wN=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case gN.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case gN.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function xN(e){var t;const{__next36pxDefaultSize:n=!1,__nextUnconstrainedWidth:r=!1,className:o,hideLabelFromVision:i,label:l,describedBy:d,options:f,onChange:p,size:m="default",value:h,onMouseOver:g,onMouseOut:v,onFocus:b,onBlur:y,__experimentalShowSelectedHint:w=!1}=e,{getLabelProps:x,getToggleButtonProps:_,getMenuProps:E,getItemProps:C,isOpen:k,highlightedIndex:S,selectedItem:T}=gN({initialSelectedItem:f[0],items:f,itemToString:yN,onSelectedItemChange:p,...null!=h?{selectedItem:h}:void 0,stateReducer:wN}),[N,R]=(0,s.useState)(!1);r||Kl()("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const I=E({className:"components-custom-select-control__menu","aria-hidden":!k}),M=(0,s.useCallback)((e=>{var t;e.stopPropagation(),null==I||null===(t=I.onKeyDown)||void 0===t||t.call(I,e)}),[I]);return null!==(t=I["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete I["aria-activedescendant"],(0,s.createElement)("div",{className:c()("components-custom-select-control",o)},i?(0,s.createElement)(nd,a({as:"label"},x()),l):(0,s.createElement)(_v,x({className:"components-custom-select-control__label"}),l),(0,s.createElement)(bN,{__next36pxDefaultSize:n,__nextUnconstrainedWidth:r,isFocused:k||N,__unstableInputWidth:r?void 0:"auto",labelPosition:r?void 0:"top",size:m,suffix:(0,s.createElement)(ly,null)},(0,s.createElement)(ry,a({onMouseOver:g,onMouseOut:v,as:"button",onFocus:function(e){R(!0),null==b||b(e)},onBlur:function(e){R(!1),null==y||y(e)},selectSize:m,__next36pxDefaultSize:n},_({"aria-label":l,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:d||(T?(0,u.sprintf)((0,u.__)("Currently selected: %s"),T.name):(0,u.__)("No selection"))})),yN(T),w&&T.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__hint"},T.__experimentalHint))),(0,s.createElement)("ul",a({},I,{onKeyDown:M}),k&&f.map(((e,t)=>(0,s.createElement)("li",C({item:e,index:t,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":t===S,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===T&&(0,s.createElement)(ay,{icon:F_,className:"components-custom-select-control__item-icon"}))))))}function _N(e){return(0,s.createElement)(xN,a({},e,{__experimentalShowSelectedHint:!1}))}function EN(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function CN(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function kN(e){CN(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function SN(e,t){CN(2,arguments);var n=kN(e),r=EN(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function TN(e,t){CN(2,arguments);var n=kN(e),r=EN(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var NN,RN,IN={};function MN(){return IN}function PN(e,t){var n,r,o,i,a,s,l,c;CN(1,arguments);var u=MN(),d=EN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=kN(e),p=f.getDay(),m=(p=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=kN(e),p=f.getDay(),m=6+(pr.getTime()}(e,t))&&(VN(e,n)||function(e,t){CN(2,arguments);var n=kN(e),r=kN(t);return n.getTime()-1}),[_]),k=(0,b.useCallback)((function(e,t){E(t?Array.isArray(e)?e:[e]:function(t){return t.concat(Array.isArray(e)?e:[e])})}),[]),S=(0,b.useCallback)((function(e){return E((function(t){return Array.isArray(e)?t.filter((function(t){return!e.map((function(e){return e.getTime()})).includes(t.getTime())})):t.filter((function(t){return!VN(t,e)}))}))}),[]),T=(0,b.useCallback)((function(e,t){return C(e)?S(e):k(e,t)}),[S,C,k]),N=(0,b.useCallback)((function(e,t,n){E(n?LN({start:e,end:t}):function(n){return n.concat(LN({start:e,end:t}))})}),[]),R=(0,b.useCallback)((function(e,t){E((function(n){return n.filter((function(n){return!LN({start:e,end:t}).map((function(e){return e.getTime()})).includes(n.getTime())}))}))}),[]),I=(0,b.useMemo)((function(){return function(e){CN(1,arguments);var t=e||{},n=kN(t.start),r=kN(t.end).getTime(),o=[];if(!(n.getTime()<=r))throw new RangeError("Invalid interval");var i=n;for(i.setHours(0,0,0,0),i.setDate(1);i.getTime()<=r;)o.push(kN(i)),i.setMonth(i.getMonth()+1);return o}({start:zN(d),end:AN(TN(d,c-1))}).map((function(e){return function(e,t){CN(1,arguments);var n=e||{},r=kN(n.start),o=kN(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=PN(r,t),s=PN(o,t);a.setHours(15),s.setHours(15),i=s.getTime();for(var l=[],c=a;c.getTime()<=i;)c.setHours(0),l.push(kN(c)),(c=ON(c,1)).setHours(15);return l}({start:zN(e),end:AN(e)},{weekStartsOn:r}).map((function(e){return LN({start:PN(e,{weekStartsOn:r}),end:BN(e,{weekStartsOn:r})})}))}))}),[d,r,c]);return{clearTime:WN,inRange:$N,viewing:d,setViewing:f,viewToday:p,viewMonth:m,viewPreviousMonth:h,viewNextMonth:g,viewYear:v,viewPreviousYear:y,viewNextYear:w,selected:_,setSelected:E,clearSelected:function(){return E([])},isSelected:C,select:k,deselect:S,toggle:T,selectRange:N,deselectRange:R,calendar:I}};function GN(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function YN(e){return YN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YN(e)}function qN(e){GN(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===YN(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function KN(e){GN(1,arguments);var t=qN(e);return t.setHours(0,0,0,0),t}function XN(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ZN(e,t){GN(2,arguments);var n=qN(e),r=XN(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function JN(e,t){GN(2,arguments);var n=XN(t);return ZN(e,-n)}function QN(e){return QN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QN(e)}function eR(e){return GN(1,arguments),e instanceof Date||"object"===QN(e)&&"[object Date]"===Object.prototype.toString.call(e)}function tR(e){if(GN(1,arguments),!eR(e)&&"number"!=typeof e)return!1;var t=qN(e);return!isNaN(Number(t))}function nR(e,t){GN(2,arguments);var n=qN(e).getTime(),r=XN(t);return new Date(n+r)}function rR(e,t){GN(2,arguments);var n=XN(t);return nR(e,-n)}var oR=864e5;function iR(e){GN(1,arguments);var t=1,n=qN(e),r=n.getUTCDay(),o=(r=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function sR(e){GN(1,arguments);var t=aR(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=iR(n);return r}var lR=6048e5;var cR={};function uR(){return cR}function dR(e,t){var n,r,o,i,a,s,l,c;GN(1,arguments);var u=uR(),d=XN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=qN(e),p=f.getUTCDay(),m=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var h=dR(m,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var v=dR(g,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function pR(e,t){var n,r,o,i,a,s,l,c;GN(1,arguments);var u=uR(),d=XN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=fR(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var m=dR(p,t);return m}var mR=6048e5;function hR(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return hR("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):hR(n+1,2)},d:function(e,t){return hR(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return hR(e.getUTCHours()%12||12,t.length)},H:function(e,t){return hR(e.getUTCHours(),t.length)},m:function(e,t){return hR(e.getUTCMinutes(),t.length)},s:function(e,t){return hR(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return hR(Math.floor(r*Math.pow(10,n-3)),t.length)}},vR=gR,bR="midnight",yR="noon",wR="morning",xR="afternoon",_R="evening",ER="night",CR={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return vR.y(e,t)},Y:function(e,t,n,r){var o=fR(e,r),i=o>0?o:1-o;return"YY"===t?hR(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):hR(i,t.length)},R:function(e,t){return hR(aR(e),t.length)},u:function(e,t){return hR(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return hR(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return hR(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return vR.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return hR(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){GN(1,arguments);var n=qN(e),r=dR(n,t).getTime()-pR(n,t).getTime();return Math.round(r/mR)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):hR(o,t.length)},I:function(e,t,n){var r=function(e){GN(1,arguments);var t=qN(e),n=iR(t).getTime()-sR(t).getTime();return Math.round(n/lR)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):hR(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):vR.d(e,t)},D:function(e,t,n){var r=function(e){GN(1,arguments);var t=qN(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/oR)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):hR(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return hR(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return hR(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return hR(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?yR:0===o?bR:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?_R:o>=12?xR:o>=4?wR:ER,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return vR.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):vR.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):hR(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):hR(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):vR.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):vR.s(e,t)},S:function(e,t){return vR.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return SR(o);case"XXXX":case"XX":return TR(o);default:return TR(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return SR(o);case"xxxx":case"xx":return TR(o);default:return TR(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kR(o,":");default:return"GMT"+TR(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kR(o,":");default:return"GMT"+TR(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return hR(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return hR((r._originalDate||e).getTime(),t.length)}};function kR(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+hR(i,2)}function SR(e,t){return e%60==0?(e>0?"-":"+")+hR(Math.abs(e)/60,2):TR(e,t)}function TR(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+hR(Math.floor(o/60),2)+n+hR(o%60,2)}var NR=CR,RR=function(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"})}},IR=function(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"})}},MR={p:IR,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return RR(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",RR(o,t)).replace("{{time}}",IR(i,t))}},PR=MR;function OR(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var DR=["D","DD"],AR=["YY","YYYY"];function LR(e){return-1!==DR.indexOf(e)}function zR(e){return-1!==AR.indexOf(e)}function BR(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var FR={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"}},VR=function(e,t,n){var r,o=FR[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function HR(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var jR={date:HR({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:HR({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:HR({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$R={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},WR=function(e,t,n,r){return $R[e]};function UR(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var GR={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:UR({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:UR({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:UR({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:UR({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:UR({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"})},YR=GR;function qR(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?XR(l,(function(e){return e.test(s)})):KR(l,(function(e){return e.test(s)}));a=e.valueCallback?e.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var u=t.slice(s.length);return{value:a,rest:u}}}function KR(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function XR(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(ZR.matchPattern);if(!n)return null;var r=n[0],o=e.match(ZR.parsePattern);if(!o)return null;var i=ZR.valueCallback?ZR.valueCallback(o[0]):o[0];i=t.valueCallback?t.valueCallback(i):i;var a=e.slice(r.length);return{value:i,rest:a}}),era:qR({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:qR({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:function(e){return e+1}}),month:qR({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:qR({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:qR({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"})},QR={code:"en-US",formatDistance:VR,formatLong:jR,formatRelative:WR,localize:YR,match:JR,options:{weekStartsOn:0,firstWeekContainsDate:1}},eI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nI=/^'([^]*?)'?$/,rI=/''/g,oI=/[a-zA-Z]/;function iI(e,t,n){var r,o,i,a,s,l,c,u,d,f,p,m,h,g,v,b,y,w;GN(2,arguments);var x=String(t),_=uR(),E=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:_.locale)&&void 0!==r?r:QR,C=XN(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:_.firstWeekContainsDate)&&void 0!==a?a:null===(d=_.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=XN(null!==(p=null!==(m=null!==(h=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(b=v.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var S=qN(e);if(!tR(S))throw new RangeError("Invalid time value");var T=OR(S),N=rR(S,T),R={firstWeekContainsDate:C,weekStartsOn:k,locale:E,_originalDate:S},I=x.match(tI).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,PR[t])(e,E.formatLong):e})).join("").match(eI).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return aI(r);var i=NR[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!zR(r)||BR(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!LR(r)||BR(r,t,String(e)),i(N,r,E.localize,R);if(o.match(oI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return I}function aI(e){var t=e.match(nI);return t?t[1].replace(rI,"'"):e}function sI(e,t){GN(2,arguments);var n=qN(e),r=qN(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function lI(e,t){GN(2,arguments);var n=qN(e),r=qN(t);return n.getTime()===r.getTime()}function cI(e,t){GN(2,arguments);var n=KN(e),r=KN(t);return n.getTime()===r.getTime()}function uI(e,t){GN(2,arguments);var n=qN(e),r=XN(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function dI(e,t){GN(2,arguments);var n=XN(t),r=7*n;return uI(e,r)}var fI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var pI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})),mI=window.wp.date;const hI=Qu("div",{target:"e105ri6r5"})({name:"1khn195",styles:"box-sizing:border-box"}),gI=Qu(Uv,{target:"e105ri6r4"})("margin-bottom:",qm(4),";"),vI=Qu($_,{target:"e105ri6r3"})("font-size:",ph.fontSize,";font-weight:",ph.fontWeight,";strong{font-weight:",ph.fontWeightHeading,";}"),bI=Qu("div",{target:"e105ri6r2"})("column-gap:",qm(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",qm(2),";"),yI=Qu("div",{target:"e105ri6r1"})("color:",kp.gray[700],";font-size:",ph.fontSize,";line-height:",ph.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),wI=Qu(id,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:100%;height:",qm(7),";width:",qm(7),";",(e=>e.isSelected&&`\n\t\t\tbackground: ${kp.ui.theme};\n\t\t\tcolor: ${kp.white};\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${kp.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tbackground: ${e.isSelected?kp.white:kp.ui.theme};\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 0;\n\t\t\tcontent: " ";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t`),";");function xI(e){return"string"==typeof e?new Date(e):qN(e)}const _I="yyyy-MM-dd'T'HH:mm:ss";function EI(e){let{day:t,column:n,isSelected:r,isFocusable:o,isFocusAllowed:i,isToday:a,isInvalid:l,numEvents:c,onClick:u,onKeyDown:d}=e;const f=(0,s.useRef)();return(0,s.useEffect)((()=>{f.current&&o&&i&&f.current.focus()}),[o]),(0,s.createElement)(wI,{ref:f,className:"components-datetime__date__day",disabled:l,tabIndex:o?0:-1,"aria-label":CI(t,r,c),column:n,isSelected:r,isToday:a,hasEvents:c>0,onClick:u,onKeyDown:d},(0,mI.dateI18n)("j",t,-t.getTimezoneOffset()))}function CI(e,t,n){const{formats:r}=(0,mI.getSettings)(),o=(0,mI.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,u.sprintf)((0,u._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,u.sprintf)((0,u.__)("%1$s. Selected"),o):n>0?(0,u.sprintf)((0,u._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}var kI=function(e){let{currentDate:t,onChange:n,events:r=[],isInvalidDate:o,onMonthPreviewed:i,startOfWeek:a=0}=e;const l=t?xI(t):new Date,{calendar:c,viewing:d,setSelected:f,setViewing:p,isSelected:m,viewPreviousMonth:h,viewNextMonth:g}=UN({selected:[KN(l)],viewing:KN(l),weekStartsOn:a}),[v,b]=(0,s.useState)(KN(l)),[y,w]=(0,s.useState)(!1),[x,_]=(0,s.useState)(t);return t!==x&&(_(t),f([KN(l)]),p(KN(l)),b(KN(l))),(0,s.createElement)(hI,{className:"components-datetime__date",role:"application","aria-label":(0,u.__)("Calendar")},(0,s.createElement)(gI,null,(0,s.createElement)(id,{icon:(0,u.isRTL)()?fI:pI,variant:"tertiary","aria-label":(0,u.__)("View previous month"),onClick:()=>{h(),b(JN(v,1)),null==i||i(iI(JN(d,1),_I))}}),(0,s.createElement)(vI,{level:3},(0,s.createElement)("strong",null,(0,mI.dateI18n)("F",d,-d.getTimezoneOffset()))," ",(0,mI.dateI18n)("Y",d,-d.getTimezoneOffset())),(0,s.createElement)(id,{icon:(0,u.isRTL)()?pI:fI,variant:"tertiary","aria-label":(0,u.__)("View next month"),onClick:()=>{g(),b(ZN(v,1)),null==i||i(iI(ZN(d,1),_I))}})),(0,s.createElement)(bI,{onFocus:()=>w(!0),onBlur:()=>w(!1)},c[0][0].map((e=>(0,s.createElement)(yI,{key:e.toString()},(0,mI.dateI18n)("D",e,-e.getTimezoneOffset())))),c[0].map((e=>e.map(((e,t)=>sI(e,d)?(0,s.createElement)(EI,{key:e.toString(),day:e,column:t+1,isSelected:m(e),isFocusable:lI(e,v),isFocusAllowed:y,isToday:cI(e,new Date),isInvalid:!!o&&o(e),numEvents:r.filter((t=>cI(t.date,e))).length,onClick:()=>{f([e]),b(e),null==n||n(iI(new Date(e.getFullYear(),e.getMonth(),e.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),_I))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=uI(e,(0,u.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=uI(e,(0,u.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=function(e,t){GN(2,arguments);var n=XN(t);return dI(e,-n)}(e,1)),"ArrowDown"===t.key&&(n=dI(e,1)),"PageUp"===t.key&&(n=JN(e,1)),"PageDown"===t.key&&(n=ZN(e,1)),"Home"===t.key&&(n=function(e,t){var n,r,o,i,a,s,l,c;GN(1,arguments);var u=uR(),d=XN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=qN(e),p=f.getDay(),m=(p=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=qN(e),p=f.getDay(),m=6+(p{const{timezone:e}=(0,mI.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",r=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offset}`,o="UTC"===e.string?(0,u.__)("Coordinated Universal Time"):`(${r}) ${e.string.replace("_"," ")}`;return(0,s.createElement)(zf,{position:"top center",text:o},(0,s.createElement)(HI,{className:"components-datetime__timezone"},r))};function $I(e,t){return t?(e%12+12)%24:e%12}function WI(e){return(t,n)=>{const r={...t};return n.type!==tv&&n.type!==cv&&n.type!==sv||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}var UI=function(e){let{is12Hour:t,currentTime:n,onChange:r}=e;const[o,i]=(0,s.useState)((()=>n?SI(xI(n)):new Date));(0,s.useEffect)((()=>{i(n?SI(xI(n)):new Date)}),[n]);const{day:a,month:l,year:c,minutes:d,hours:f,am:p}=(0,s.useMemo)((()=>({day:iI(o,"dd"),month:iI(o,"MM"),year:iI(o,"yyyy"),minutes:iI(o,"mm"),hours:iI(o,t?"hh":"HH"),am:iI(o,"a")})),[o,t]),m=e=>(n,a)=>{let{event:s}=a;if(!(s.target instanceof HTMLInputElement))return;if(!s.target.validity.valid)return;let l=Number(n);"hours"===e&&t&&(l=$I(l,"PM"===p));const c=function(e,t){if(GN(2,arguments),"object"!==RI(t)||null===t)throw new RangeError("values parameter must be an object");var n=qN(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=NI(n,t.month)),null!=t.date&&n.setDate(XN(t.date)),null!=t.hours&&n.setHours(XN(t.hours)),null!=t.minutes&&n.setMinutes(XN(t.minutes)),null!=t.seconds&&n.setSeconds(XN(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(XN(t.milliseconds)),n)}(o,{[e]:l});i(c),null==r||r(iI(c,_I))};function h(e){return()=>{if(p===e)return;const t=parseInt(f,10),n=function(e,t){GN(2,arguments);var n=qN(e),r=XN(t);return n.setHours(r),n}(o,$I(t,"PM"===e));i(n),null==r||r(iI(n,_I))}}const g=(0,s.createElement)(FI,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,u.__)("Day"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:a,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")}),v=(0,s.createElement)(zI,null,(0,s.createElement)(BI,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,u.__)("Month"),hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,value:l,options:[{value:"01",label:(0,u.__)("January")},{value:"02",label:(0,u.__)("February")},{value:"03",label:(0,u.__)("March")},{value:"04",label:(0,u.__)("April")},{value:"05",label:(0,u.__)("May")},{value:"06",label:(0,u.__)("June")},{value:"07",label:(0,u.__)("July")},{value:"08",label:(0,u.__)("August")},{value:"09",label:(0,u.__)("September")},{value:"10",label:(0,u.__)("October")},{value:"11",label:(0,u.__)("November")},{value:"12",label:(0,u.__)("December")}],onChange:e=>{const t=NI(o,Number(e)-1);i(t),null==r||r(iI(t,_I))}}));return(0,s.createElement)(II,{className:"components-datetime__time"},(0,s.createElement)(MI,null,(0,s.createElement)(Tv.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Time")),(0,s.createElement)(Uv,{className:"components-datetime__time-wrapper"},(0,s.createElement)(PI,{className:"components-datetime__time-field components-datetime__time-field-time"},(0,s.createElement)(DI,{className:"components-datetime__time-field-hours-input",label:(0,u.__)("Hours"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:f,step:1,min:t?1:0,max:t?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("hours"),__unstableStateReducer:WI(2)}),(0,s.createElement)(AI,{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,s.createElement)(LI,{className:"components-datetime__time-field-minutes-input",label:(0,u.__)("Minutes"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:d,step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("minutes"),__unstableStateReducer:WI(2)})),t&&(0,s.createElement)(NC,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,s.createElement)(id,{className:"components-datetime__time-am-button",variant:"AM"===p?"primary":"secondary",onClick:h("AM")},(0,u.__)("AM")),(0,s.createElement)(id,{className:"components-datetime__time-pm-button",variant:"PM"===p?"primary":"secondary",onClick:h("PM")},(0,u.__)("PM"))),(0,s.createElement)(qv,null),(0,s.createElement)(jI,null))),(0,s.createElement)(MI,null,(0,s.createElement)(Tv.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Date")),(0,s.createElement)(Uv,{className:"components-datetime__time-wrapper"},t?(0,s.createElement)(s.Fragment,null,v,g):(0,s.createElement)(s.Fragment,null,g,v),(0,s.createElement)(VI,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,u.__)("Year"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:c,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:WI(4)}))))};const GI=Qu(H_,{target:"e1p5onf01"})({name:"1khn195",styles:"box-sizing:border-box"}),YI=Qu("div",{target:"e1p5onf00"})({name:"l0rwn2",styles:"min-width:260px"}),qI=()=>{};const KI=(0,s.forwardRef)((function(e,t){let{currentDate:n,is12Hour:r,isInvalidDate:o,onMonthPreviewed:i=qI,onChange:a,events:l,startOfWeek:c,__nextRemoveHelpButton:d=!1,__nextRemoveResetButton:f=!1}=e;d||Kl()("Help button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."}),f||Kl()("Reset button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."});const[p,m]=(0,s.useState)(!1);return(0,s.createElement)(GI,{ref:t,className:"components-datetime",spacing:4},!p&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(UI,{currentTime:n,onChange:a,is12Hour:r}),(0,s.createElement)(kI,{currentDate:n,onChange:a,isInvalidDate:o,events:l,onMonthPreviewed:i,startOfWeek:c})),p&&(0,s.createElement)(YI,{className:"components-datetime__calendar-help"},(0,s.createElement)($_,{level:4},(0,u.__)("Click to Select")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,u.__)("Click the right or left arrows to select other months in the past or the future.")),(0,s.createElement)("li",null,(0,u.__)("Click the desired day to select it."))),(0,s.createElement)($_,{level:4},(0,u.__)("Navigating with a keyboard")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u._x)("Enter","keyboard button")},"↵")," ",(0,s.createElement)("span",null,(0,u.__)("Select the date in focus."))),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Left and Right Arrows")},"←/→")," ",(0,u.__)("Move backward (left) or forward (right) by one day.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Up and Down Arrows")},"↑/↓")," ",(0,u.__)("Move backward (up) or forward (down) by one week.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Page Up and Page Down")},(0,u.__)("PgUp/PgDn"))," ",(0,u.__)("Move backward (PgUp) or forward (PgDn) by one month.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Home and End")},(0,u.__)("Home/End"))," ",(0,u.__)("Go to the first (Home) or last (End) day of a week.")))),(!f||!d)&&(0,s.createElement)(Uv,{className:"components-datetime__buttons"},!f&&!p&&n&&(0,s.createElement)(id,{className:"components-datetime__date-reset-button",variant:"link",onClick:()=>null==a?void 0:a(null)},(0,u.__)("Reset")),(0,s.createElement)(qv,null),!d&&(0,s.createElement)(id,{className:"components-datetime__date-help-toggle",variant:"link",onClick:function(){m(!p)}},p?(0,u.__)("Close"):(0,u.__)("Calendar Help"))))}));var XI=KI;var ZI=[{name:(0,u._x)("None","Size of a UI element"),slug:"none"},{name:(0,u._x)("Small","Size of a UI element"),slug:"small"},{name:(0,u._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,u._x)("Large","Size of a UI element"),slug:"large"},{name:(0,u._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];var JI=function(e){const{label:t,value:n,sizes:r=ZI,icon:o,onChange:i,className:a=""}=e,l=(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(Zl,{icon:o}),t);return(0,s.createElement)(dy,{className:c()(a,"block-editor-dimension-control"),label:l,hideLabelFromVision:!1,value:n,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(r,e);t&&n!==t.slug?"function"==typeof i&&i(t.slug):i(void 0)},options:(e=>{const t=e.map((e=>{let{name:t,slug:n}=e;return{label:t,value:n}}));return[{label:(0,u.__)("Default"),value:""}].concat(t)})(r)})};const QI={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},eM=(0,s.createContext)(!1),{Consumer:tM,Provider:nM}=eM;function rM(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=Vu();return(0,s.createElement)(nM,{value:r},(0,s.createElement)("div",a({inert:r?"true":void 0,className:r?i(QI,t,"components-disabled"):void 0},o),n))}rM.Context=eM,rM.Consumer=tM;var oM=rM;const iM="is-dragging-components-draggable";var aM=function(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:a,transferData:l,__experimentalTransferDataType:c="text",__experimentalDragComponent:u}=e;const f=(0,s.useRef)(null),p=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>()=>{p.current()}),[]),(0,s.createElement)(s.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(c,JSON.stringify(l));const o=t.createElement("div");o.style.top="0",o.style.left="0";const s=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(s.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let u=0,m=0;if(f.current){u=e.clientX,m=e.clientY,o.style.transform=`translate( ${u}px, ${m}px )`;const n=t.createElement("div");n.innerHTML=f.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(a),n=e.getBoundingClientRect(),r=e.parentNode,i=n.top,s=n.left;o.style.width=`${n.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${a}`,u=s-0,m=i-0,o.style.transform=`translate( ${u}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),o.appendChild(l),null==r||r.appendChild(o)}let h=e.clientX,g=e.clientY;const v=(0,d.throttle)((function(e){if(h===e.clientX&&g===e.clientY)return;const t=u+e.clientX-h,n=m+e.clientY-g;o.style.transform=`translate( ${t}px, ${n}px )`,h=e.clientX,g=e.clientY,u=t,m=n,r&&r(e)}),16);let b;t.addEventListener("dragover",v),t.body.classList.add(iM),e.persist(),n&&(b=setTimeout((()=>n(e)))),p.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),s&&s.parentNode&&s.parentNode.removeChild(s),t.body.classList.remove(iM),t.removeEventListener("dragover",v),clearTimeout(b)}},onDraggableEnd:function(e){e.preventDefault(),p.current(),o&&o(e)}}),u&&(0,s.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},u))};var sM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var lM=function(e){let{className:t,label:n,onFilesDrop:r,onHTMLDrop:o,onDrop:i,...l}=e;const[f,p]=(0,s.useState)(),[m,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),b=(0,d.__experimentalUseDropZone)({onDrop(e){var t;const n=e.dataTransfer?(0,ES.getFilesFromDataTransfer)(e.dataTransfer):[],a=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/html");a&&o?o(a):n.length&&r?r(n):i&&i(e)},onDragStart(e){var t,n;p(!0);let r="default";null!==(t=e.dataTransfer)&&void 0!==t&&t.types.includes("text/html")?r="html":(null!==(n=e.dataTransfer)&&void 0!==n&&n.types.includes("Files")||(e.dataTransfer?(0,ES.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(r="file"),v(r)},onDragEnd(){p(!1),v(void 0)},onDragEnter(){h(!0)},onDragLeave(){h(!1)}}),y=(0,d.useReducedMotion)();let w;const x={hidden:{scaleY:0,opacity:0},show:{scaleY:1,opacity:1,transition:{type:"tween",duration:.2,delay:.1,delayChildren:.2}},exit:{scaleY:1,opacity:0,transition:{duration:.3,delayChildren:0}}},_={hidden:{opacity:0,scale:.75},show:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};m&&(w=(0,s.createElement)(Gl.div,{variants:x,initial:y?"show":"hidden",animate:"show",exit:y?"show":"exit",className:"components-drop-zone__content",style:{pointerEvents:"none"}},(0,s.createElement)(Gl.div,{variants:_},(0,s.createElement)(ay,{icon:sM,className:"components-drop-zone__content-icon"}),(0,s.createElement)("span",{className:"components-drop-zone__content-text"},n||(0,u.__)("Drop files to upload")))));const E=c()("components-drop-zone",t,{"is-active":(f||m)&&("file"===g&&r||"html"===g&&o||"default"===g&&i),"is-dragging-over-document":f,"is-dragging-over-element":m,[`is-dragging-${g}`]:!!g});return(0,s.createElement)("div",a({},l,{ref:b,className:E}),y?w:(0,s.createElement)(Om,null,w))};function cM(e){let{children:t}=e;return Kl()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),t}var uM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));function dM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}bp([yp]);var fM=function(e){let{values:t}=e;return t?(0,s.createElement)(Xb,{colorValue:dM(t,"135deg")}):(0,s.createElement)(Zl,{icon:uM})};function pM(e){let{label:t,value:n,colors:r,disableCustomColors:o,enableAlpha:i,onChange:a}=e;const[l,c]=(0,s.useState)(!1);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(id,{className:"components-color-list-picker__swatch-button",onClick:()=>c((e=>!e))},(0,s.createElement)(Uv,{justify:"flex-start",spacing:2},n?(0,s.createElement)(Xb,{colorValue:n,className:"components-color-list-picker__swatch-color"}):(0,s.createElement)(Zl,{icon:uM}),(0,s.createElement)("span",null,t))),l&&(0,s.createElement)(J_,{className:"components-color-list-picker__color-picker",colors:r,value:n,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i}))}var mM=function(e){let{colors:t,labels:n,value:r=[],disableCustomColors:o,enableAlpha:i,onChange:a}=e;return(0,s.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,s.createElement)(pM,{key:n,label:e,value:r[n],colors:t,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=r.slice();t[n]=e,a(t)}}))))};const hM=["#333","#CCC"];function gM(e){let{value:t,onChange:n}=e;const r=!!t,o=r?t:hM,i=dM(o),a=(l=o).map(((e,t)=>({position:100*t/(l.length-1),color:e})));var l;return(0,s.createElement)(rS,{disableInserter:!0,background:i,hasGradient:r,value:a,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}var vM=function(e){let{clearable:t=!0,unsetable:n=!0,colorPalette:r,duotonePalette:o,disableCustomColors:i,disableCustomDuotone:a,value:l,onChange:c}=e;const[d,f]=(0,s.useMemo)((()=>{return!(e=r)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:gp(t).brightness()}})).reduce(((e,t)=>{let[n,r]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=r.brightness?t:r]}),[{brightness:1},{brightness:0}]).map((e=>{let{color:t}=e;return t}));var e}),[r]),p="unset"===l,m=(0,s.createElement)(V_.Option,{key:"unset",value:"unset",isSelected:p,tooltipText:(0,u.__)("Unset"),className:"components-duotone-picker__color-indicator",onClick:()=>{c(p?void 0:"unset")}}),h=o.map((e=>{let{colors:t,slug:n,name:r}=e;const o={background:dM(t,"135deg"),color:"transparent"},i=null!=r?r:(0,u.sprintf)((0,u.__)("Duotone code: %s"),n),a=r?(0,u.sprintf)((0,u.__)("Duotone: %s"),r):i,d=Ql()(t,l);return(0,s.createElement)(V_.Option,{key:n,value:t,isSelected:d,"aria-label":a,tooltipText:i,style:o,onClick:()=>{c(d?void 0:t)}})}));return(0,s.createElement)(V_,{options:n?[m,...h]:h,actions:!!t&&(0,s.createElement)(V_.ButtonAction,{onClick:()=>c(void 0)},(0,u.__)("Clear"))},(0,s.createElement)(qv,{paddingTop:4},(0,s.createElement)(H_,{spacing:3},!i&&!a&&(0,s.createElement)(gM,{value:p?void 0:l,onChange:c}),!a&&(0,s.createElement)(mM,{labels:[(0,u.__)("Shadows"),(0,u.__)("Highlights")],colors:r,value:p?void 0:l,disableCustomColors:i,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=d),e[1]||(e[1]=f);const t=e.length>=2?e:void 0;c(t)}}))))};var bM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const yM=Qu(ay,{target:"esh4a730"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});var wM=(0,s.forwardRef)((function(e,t){const{href:n,children:r,className:o,rel:i="",...l}=e,d=[...new Set([...i.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),f=c()("components-external-link",o),p=!(null==n||!n.startsWith("#"));return(0,s.createElement)("a",a({},l,{className:f,href:n,onClick:t=>{p&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:d,ref:t}),r,(0,s.createElement)(nd,{as:"span"},(0,u.__)("(opens in a new tab)")),(0,s.createElement)(yM,{icon:bM,className:"components-external-link__icon"}))}));const xM={width:200,height:170},_M=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function EM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(".");return t[t.length-1]}function CM(e){return Math.round(100*e)}const kM=Qu("div",{target:"eeew7dm8"})({name:"w0nf6b",styles:"background-color:transparent;text-align:center;width:100%"}),SM=Qu("div",{target:"eeew7dm7"})({name:"megach",styles:"align-items:center;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"}),TM=Qu("div",{target:"eeew7dm6"})("background:",kp.gray[100],";box-sizing:border-box;height:",xM.height,"px;max-width:280px;min-width:",xM.width,"px;width:100%;"),NM=Qu(mE,{target:"eeew7dm5"})({name:"1pzk433",styles:"width:100px"});var RM={name:"1mn7kwb",styles:"padding-bottom:1em"};const IM=e=>{let{__nextHasNoMarginBottom:t}=e;return t?void 0:RM};var MM={name:"1mn7kwb",styles:"padding-bottom:1em"};const PM=e=>{let{hasHelpText:t=!1}=e;return t?MM:void 0},OM=Qu(Xm,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",PM," ",IM,";"),DM=Qu("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;opacity:",(e=>{let{showOverlay:t}=e;return t?1:0}),";"),AM=Qu("div",{target:"eeew7dm2"})({name:"1d42i6k",styles:"background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )"}),LM=Qu(AM,{target:"eeew7dm1"})({name:"1qp910y",styles:"height:1px;left:0;right:0"}),zM=Qu(AM,{target:"eeew7dm0"})({name:"1oz3zka",styles:"width:1px;top:0;bottom:0"}),BM=()=>{};function FM(e){let{__nextHasNoMarginBottom:t,hasHelpText:n,onChange:r=BM,point:o={x:.5,y:.5}}=e;const i=CM(o.x),a=CM(o.y),l=(e,t)=>{if(void 0===e)return;const n=parseInt(e,10);isNaN(n)||r({...o,[t]:n/100})};return(0,s.createElement)(OM,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:t,hasHelpText:n},(0,s.createElement)(VM,{label:(0,u.__)("Left"),value:[i,"%"].join(""),onChange:e=>l(e,"x"),dragDirection:"e"}),(0,s.createElement)(VM,{label:(0,u.__)("Top"),value:[a,"%"].join(""),onChange:e=>l(e,"y"),dragDirection:"s"}))}function VM(e){return(0,s.createElement)(NM,a({className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:100,min:0,units:[{value:"%",label:"%"}]},e))}const HM=Qu("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:48px;margin:-24px 0 0 -24px;position:absolute;user-select:none;width:48px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.6 );border-radius:50%;backdrop-filter:blur( 4px );box-shadow:rgb( 0 0 0 / 20% ) 0px 0px 10px;",(e=>{let{isDragging:t}=e;return t&&"cursor: grabbing;"}),";");function jM(e){let{left:t="50%",top:n="50%",...r}=e;const o=c()("components-focal-point-picker__icon_container"),i={left:t,top:n};return(0,s.createElement)(HM,a({},r,{className:o,style:i}))}function $M(e){let{bounds:t,...n}=e;return(0,s.createElement)(DM,a({},n,{className:"components-focal-point-picker__grid",style:{width:t.width,height:t.height}}),(0,s.createElement)(LM,{style:{top:"33%"}}),(0,s.createElement)(LM,{style:{top:"66%"}}),(0,s.createElement)(zM,{style:{left:"33%"}}),(0,s.createElement)(zM,{style:{left:"66%"}}))}function WM(e){let{alt:t,autoPlay:n,src:r,onLoad:o,mediaRef:i,muted:l=!0,...c}=e;if(!r)return(0,s.createElement)(TM,a({className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:i},c));const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&(e.startsWith("data:video/")||_M.includes(EM(e)))}(r);return u?(0,s.createElement)("video",a({},c,{autoPlay:n,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:l,onLoadedData:o,ref:i,src:r})):(0,s.createElement)("img",a({},c,{alt:t,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:r}))}var UM=function e(t){let{__nextHasNoMarginBottom:n,autoPlay:r=!0,className:o,help:i,label:l,onChange:f,onDrag:p,onDragEnd:m,onDragStart:h,resolvePoint:g,url:v,value:b={x:.5,y:.5},...y}=t;const[w,x]=(0,s.useState)(b),[_,E]=(0,s.useState)(!1),{startDrag:C,endDrag:k,isDragging:S}=(0,d.__experimentalUseDragging)({onDragStart:e=>{var t;null===(t=R.current)||void 0===t||t.focus();const n=O(e);n&&(null==h||h(n,e),x(n))},onDragMove:e=>{e.preventDefault();const t=O(e);t&&(null==p||p(t,e),x(t))},onDragEnd:()=>{null==m||m(),null==f||f(w)}}),{x:T,y:N}=S?w:b,R=(0,s.useRef)(null),[I,M]=(0,s.useState)(xM),P=(0,s.useRef)((()=>{if(!R.current)return;const{clientWidth:e,clientHeight:t}=R.current;M(e>0&&t>0?{width:e,height:t}:{...xM})}));(0,s.useEffect)((()=>{const e=P.current;if(!R.current)return;const{defaultView:t}=R.current.ownerDocument;return null==t||t.addEventListener("resize",e),()=>null==t?void 0:t.removeEventListener("resize",e)}),[]),(0,d.useIsomorphicLayoutEffect)((()=>{P.current()}),[]);const O=e=>{let{clientX:t,clientY:n,shiftKey:r}=e;if(!R.current)return;const{top:o,left:i}=R.current.getBoundingClientRect();let a=(t-i)/I.width,s=(n-o)/I.height;return r&&(a=.1*Math.round(a/.1),s=.1*Math.round(s/.1)),D({x:a,y:s})},D=e=>{var t;const n=null!==(t=null==g?void 0:g(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},A={left:T*I.width,top:N*I.height},L=c()("components-focal-point-picker-control",o),z=`inspector-focal-point-picker-control-${(0,d.useInstanceId)(e)}`;return tc((()=>{E(!0);const e=window.setTimeout((()=>{E(!1)}),600);return()=>window.clearTimeout(e)}),[T,N]),(0,s.createElement)(Tv,a({},y,{__nextHasNoMarginBottom:n,label:l,id:z,help:i,className:L}),(0,s.createElement)(kM,{className:"components-focal-point-picker-wrapper"},(0,s.createElement)(SM,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:T,y:N},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,a="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[a]=r[a]+i,null==f||f(D(r))},onMouseDown:C,onBlur:()=>{S&&k()},ref:R,role:"button",tabIndex:-1},(0,s.createElement)($M,{bounds:I,showOverlay:_}),(0,s.createElement)(WM,{alt:(0,u.__)("Media preview"),autoPlay:r,onLoad:P.current,src:v}),(0,s.createElement)(jM,a({},A,{isDragging:S})))),(0,s.createElement)(FM,{__nextHasNoMarginBottom:n,hasHelpText:!!i,point:{x:T,y:N},onChange:e=>{null==f||f(D(e))}}))};function GM(e){let{iframeRef:t,...n}=e;const r=(0,d.useMergeRefs)([t,(0,d.useFocusableIframe)()]);return Kl()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,s.createElement)("iframe",a({ref:r},n))}var YM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));function qM(e){const[t,...n]=e;if(!t)return null;const[,r]=aE(t.size);return n.every((e=>{const[,t]=aE(e.size);return t===r}))?r:null}const KM=Qu("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),XM=Qu(Tv.VisualLabel,{target:"e8tqeku3"})("display:flex;gap:",qm(1),";justify-content:flex-start;margin-bottom:0;"),ZM=Qu("span",{target:"e8tqeku2"})("color:",kp.gray[700],";"),JM=Qu("div",{target:"e8tqeku1"})((e=>!e.__nextHasNoMarginBottom&&`margin-bottom: ${qm(6)};`),";"),QM=Qu(id,{target:"e8tqeku0"})("&&&{height:",(e=>"__unstable-large"===e.size?"40px":"30px"),";}"),eP={key:"default",name:(0,u.__)("Default"),value:void 0},tP={key:"custom",name:(0,u.__)("Custom")};var nP=e=>{var t;const{fontSizes:n,value:r,disableCustomFontSizes:o,size:i,onChange:a,onSelectCustom:l}=e,c=!!qM(n),d=[eP,...n.map((e=>{let t;if(c){const[n]=aE(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,__experimentalHint:t}})),...o?[]:[tP]],f=r?null!==(t=d.find((e=>e.value===r)))&&void 0!==t?t:tP:eP;return(0,s.createElement)(xN,{__nextUnconstrainedWidth:!0,className:"components-font-size-picker__select",label:(0,u.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,u.sprintf)((0,u.__)("Currently selected font size: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;t===tP?l():a(t.value)},size:i})};const rP=e=>{const t=$f("border-color:",kp.ui.border,";","");return $f(e&&t," &:hover{border-color:",kp.ui.borderHover,";}&:focus-within{border-color:",kp.ui.borderFocus,";box-shadow:",ph.controlBoxShadowFocus,";outline:none;z-index:1;}","")},oP=e=>$f("min-height:",{default:"36px","__unstable-large":"40px"}[e],";",""),iP={name:"7whenc",styles:"display:flex;width:100%"},aP=Qu("div",{target:"eakva831"})("background:",kp.gray[900],";border-radius:",ph.controlBorderRadius,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",ph.transitionDurationFast," ease;",Sp("transition")," z-index:1;"),sP=Qu("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function lP(e){void 0===e&&(e={});var t=Ap(e),n=t.state,r=t.loop,o=void 0===r||r,i=h(t,["state","loop"]),a=(0,b.useState)(n),s=a[0],l=a[1],c=rm(m(m({},i),{},{loop:o}));return m(m({},c),{},{state:s,setState:l})}var cP=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],uP=[].concat(cP,["value","checked","unstable_checkOnFocus"]),dP=z({as:"div",useHook:F({name:"RadioGroup",compose:dm,keys:cP,useProps:function(e,t){return m({role:"radiogroup"},t)}}),useCreateElement:function(e,t,n){return N(e,t,n)}});var fP=(0,s.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,a]=(0,s.useState)(0),[l,c]=(0,s.useState)(0),[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const r=window.setTimeout((()=>{const{width:t,x:r}=n.getBoundingClientRect(),{x:o}=e.getBoundingClientRect();a(r-o-1),c(t)}),100);let i;return u||(i=window.requestAnimationFrame((()=>{d(!0)}))),()=>{window.clearTimeout(r),window.cancelAnimationFrame(i)}}),[u,t,n,o,r]),f?(0,s.createElement)(aP,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:u?void 0:"none",width:l}}):null}));const pP=(0,s.createContext)({});var mP=pP;const hP=(0,s.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:c,...u}=e;const f=(0,s.useRef)(),[p,m]=(0,d.useResizeObserver)(),h=lP({baseId:(0,d.useInstanceId)(hP,"toggle-group-control-as-radio-group").toString(),state:c}),g=(0,d.usePrevious)(c);return tc((()=>{g!==h.state&&i(h.state)}),[h.state]),tc((()=>{c!==h.state&&h.setState(c)}),[c]),(0,s.createElement)(mP.Provider,{value:{...h,isBlock:!r,size:l}},(0,s.createElement)(dP,a({},h,{"aria-label":o,as:td},u,{ref:(0,d.useMergeRefs)([f,t])}),p,(0,s.createElement)(fP,{state:h.state,containerRef:f,containerWidth:m.width,isAdaptiveWidth:r}),n))}));const gP=(0,s.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:c,...u}=e;const f=(0,s.useRef)(),[p,m]=(0,d.useResizeObserver)(),h=(0,d.useInstanceId)(gP,"toggle-group-control-as-button-group").toString(),[g,v]=(0,s.useState)(c),b={baseId:h,state:g,setState:v},y=(0,d.usePrevious)(c);return tc((()=>{y!==b.state&&i(b.state)}),[b.state]),tc((()=>{c!==b.state&&b.setState(c)}),[c]),(0,s.createElement)(mP.Provider,{value:{...b,isBlock:!r,isDeselectable:!0,size:l}},(0,s.createElement)(td,a({"aria-label":o},u,{ref:(0,d.useMergeRefs)([f,t]),role:"group"}),p,(0,s.createElement)(fP,{state:b.state,containerRef:f,containerWidth:m.width,isAdaptiveWidth:r}),n))})),vP=()=>{};const bP=ju((function(e,t){const{__nextHasNoMarginBottom:n=!1,className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,isDeselectable:l=!1,label:c,hideLabelFromVision:u=!1,help:d,onChange:f=vP,size:p="default",value:m,children:h,...g}=Hu(e,"ToggleGroupControl"),v=Vu(),b=(0,s.useMemo)((()=>v((e=>{let{isBlock:t,isDeselectable:n,size:r}=e;return $f("background:",kp.ui.background,";border:1px solid transparent;border-radius:",ph.controlBorderRadius,";display:inline-flex;min-width:0;padding:2px;position:relative;transition:transform ",ph.transitionDurationFastest," linear;",Sp("transition")," ",oP(r)," ",!n&&rP(t),";","")})({isBlock:i,isDeselectable:l,size:p}),i&&iP,r)),[r,v,i,l,p]),y=l?gP:hP;return(0,s.createElement)(Tv,{help:d,__nextHasNoMarginBottom:n},!u&&(0,s.createElement)(sP,null,(0,s.createElement)(Tv.VisualLabel,null,c)),(0,s.createElement)(y,a({},g,{children:h,className:b,isAdaptiveWidth:o,label:c,onChange:f,ref:t,size:p,value:m})))}),"ToggleGroupControl");var yP=bP;function wP(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function xP(e,t){var n=_e(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var _P=F({name:"Radio",compose:ke,keys:uP,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,a=void 0!==i&&i,s=e.unstable_checkOnFocus,l=void 0===s||s,c=h(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return m(m({checked:o,unstable_clickOnEnter:a,unstable_checkOnFocus:l},c),{},{value:null!=(n=c.value)?n:r})},useProps:function(e,t){var n=t.ref,r=t.onChange,o=t.onClick,i=h(t,["ref","onChange","onClick"]),a=(0,b.useRef)(null),s=(0,b.useState)(!0),l=s[0],c=s[1],u=wP(e),d=G(e.currentId===e.id),f=G(r),p=G(o);!function(e){var t=(0,b.useState)((function(){return wP(e)}))[0],n=(0,b.useState)(e.currentId)[0],r=e.id,o=e.setCurrentId;(0,b.useEffect)((function(){t&&r&&n!==r&&(null==o||o(r))}),[t,r,o,n])}(e),(0,b.useEffect)((function(){var e=a.current;e&&("INPUT"===e.tagName&&"radio"===e.type||c(!1))}),[]);var g=(0,b.useCallback)((function(t){var n,r;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),v=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),e.defaultPrevented||l||xP(e.currentTarget,g)}),[g,l]);return(0,b.useEffect)((function(){var t=a.current;t&&e.unstable_moves&&d.current&&e.unstable_checkOnFocus&&xP(t,g)}),[e.unstable_moves,e.unstable_checkOnFocus,g]),m({ref:H(a,n),role:l?void 0:"radio",type:l?"radio":void 0,value:l?e.value:void 0,name:l?e.baseId:void 0,"aria-checked":u,checked:u,onChange:g,onClick:v},i)}}),EP=z({as:"input",memo:!0,useHook:_P});const CP=Qu("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),kP={name:"82a6rk",styles:"flex:1"},SP=e=>{let{isDeselectable:t,isIcon:n,isPressed:r,size:o}=e;return $f("align-items:center;appearance:none;background:transparent;border:none;border-radius:",ph.controlBorderRadius,";color:",kp.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",ph.transitionDurationFast," linear,color ",ph.transitionDurationFast," linear,font-weight 60ms linear;",Sp("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",ph.toggleGroupControlBackgroundColor,";}",t&&NP," ",n&&IP({size:o})," ",r&&TP,";","")},TP=$f("color:",kp.white,";&:active{background:transparent;}",""),NP=$f("color:",kp.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",kp.white,",0 0 0 ",ph.borderWidthFocus," ",kp.ui.theme,";outline:2px solid transparent;}",""),RP=Qu("div",{target:"et6ln9s0"})("display:flex;font-size:",ph.fontSize,";line-height:1;"),IP=e=>{let{size:t="default"}=e;return $f("color:",kp.gray[900],";width:",{default:"30px","__unstable-large":"34px"}[t],";padding-left:0;padding-right:0;","")},{ButtonContentView:MP,LabelView:PP}=o,OP=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,s.createElement)(zf,{text:n,position:"top center"},r):(0,s.createElement)(s.Fragment,null,r)};const DP=ju((function e(t,n){const r=(0,s.useContext)(pP),o=Hu({...t,id:(0,d.useInstanceId)(e,r.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:i=!1,isDeselectable:l=!1,size:c="default",...u}=r,{className:f,isIcon:p=!1,value:m,children:h,showTooltip:g=!1,...v}=o,b=u.state===m,y=Vu(),w=y(i&&kP),x=y(SP({isDeselectable:l,isIcon:p,isPressed:b,size:c}),f),_={...v,className:x,"data-value":m,ref:n};return(0,s.createElement)(PP,{className:w},(0,s.createElement)(OP,{showTooltip:g,text:v["aria-label"]},l?(0,s.createElement)("button",a({},_,{"aria-pressed":b,type:"button",onClick:()=>{l&&b?u.setState(void 0):u.setState(m)}}),(0,s.createElement)(MP,null,h)):(0,s.createElement)(EP,a({},_,u,{as:"button",value:m}),(0,s.createElement)(MP,null,h))))}),"ToggleGroupControlOptionBase");var AP=DP;var LP=(0,s.forwardRef)((function(e,t){const{label:n,...r}=e,o=r["aria-label"]||n;return(0,s.createElement)(AP,a({},r,{"aria-label":o,ref:t}),n)}));const zP=[(0,u.__)("S"),(0,u.__)("M"),(0,u.__)("L"),(0,u.__)("XL"),(0,u.__)("XXL")],BP=[(0,u.__)("Small"),(0,u.__)("Medium"),(0,u.__)("Large"),(0,u.__)("Extra Large"),(0,u.__)("Extra Extra Large")];var FP=e=>{const{fontSizes:t,value:n,__nextHasNoMarginBottom:r,size:o,onChange:i}=e;return(0,s.createElement)(yP,{__nextHasNoMarginBottom:r,label:(0,u.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:i,isBlock:!0,size:o},t.map(((e,t)=>(0,s.createElement)(LP,{key:e.slug,value:e.size,label:zP[t],"aria-label":e.name||BP[t],showTooltip:!0}))))};const VP=(0,s.forwardRef)(((e,t)=>{var n;const{__nextHasNoMarginBottom:r=!1,fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:a=!1,onChange:l,size:c="default",value:d,withSlider:f=!1,withReset:p=!0}=e;r||Kl()("Bottom margin styles for wp.components.FontSizePicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const m=lE({availableUnits:["px","em","rem"]}),h=i.length>5,g=i.find((e=>e.size===d)),v=!!d&&!g,[b,y]=(0,s.useState)(!a&&v),w=(0,s.useMemo)((()=>{if(b)return(0,u.__)("Custom");if(!h)return g?g.name||BP[i.indexOf(g)]:"";const e=qM(i);return e?`(${e})`:""}),[b,h,g,i]);if(0===i.length&&a)return null;const x="string"==typeof d||"string"==typeof(null===(n=i[0])||void 0===n?void 0:n.size),[_,E]=aE(d,m),C=!!E&&["em","rem"].includes(E);return(0,s.createElement)(KM,{ref:t,className:"components-font-size-picker"},(0,s.createElement)(nd,{as:"legend"},(0,u.__)("Font size")),(0,s.createElement)(qv,null,(0,s.createElement)(Uv,{className:"components-font-size-picker__header"},(0,s.createElement)(XM,{"aria-label":`${(0,u.__)("Size")} ${w||""}`},(0,u.__)("Size"),w&&(0,s.createElement)(ZM,{className:"components-font-size-picker__header__hint"},w)),!a&&(0,s.createElement)(id,{label:b?(0,u.__)("Use size preset"):(0,u.__)("Set custom size"),icon:YM,onClick:()=>{y(!b)},isPressed:b,isSmall:!0}))),(0,s.createElement)(JM,{className:"components-font-size-picker__controls",__nextHasNoMarginBottom:r},!!i.length&&h&&!b&&(0,s.createElement)(nP,{fontSizes:i,value:d,disableCustomFontSizes:a,size:c,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:Number(e),i.find((t=>t.size===e)))},onSelectCustom:()=>y(!0)}),!h&&!b&&(0,s.createElement)(FP,{fontSizes:i,value:d,__nextHasNoMarginBottom:r,size:c,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:Number(e),i.find((t=>t.size===e)))}}),!a&&b&&(0,s.createElement)(Xm,{className:"components-font-size-picker__custom-size-control"},(0,s.createElement)(jm,{isBlock:!0},(0,s.createElement)(mE,{label:(0,u.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:parseInt(e,10))},size:c,units:x?m:[],min:0})),f&&(0,s.createElement)(jm,{isBlock:!0},(0,s.createElement)(qv,{marginX:2,marginBottom:0},(0,s.createElement)(jy,{__nextHasNoMarginBottom:r,className:"components-font-size-picker__custom-input",label:(0,u.__)("Custom Size"),hideLabelFromVision:!0,value:_,initialPosition:o,withInputField:!1,onChange:e=>{void 0===e?null==l||l(void 0):x?null==l||l(e+(null!=E?E:"px")):null==l||l(e)},min:0,max:C?10:100,step:C?.1:1}))),p&&(0,s.createElement)(jm,null,(0,s.createElement)(QM,{disabled:void 0===d,onClick:()=>{null==l||l(void 0)},isSmall:!0,variant:"secondary",size:c},(0,u.__)("Reset"))))))}));var HP=VP;var jP=function(e){let{accept:t,children:n,multiple:r=!1,onChange:o,onClick:i,render:l,...c}=e;const u=(0,s.useRef)(null),d=()=>{var e;null===(e=u.current)||void 0===e||e.click()},f=l?l({openFileDialog:d}):(0,s.createElement)(id,a({onClick:d},c),n);return(0,s.createElement)("div",{className:"components-form-file-upload"},f,(0,s.createElement)("input",{type:"file",ref:u,multiple:r,style:{display:"none"},accept:t,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))};const $P=()=>{};var WP=function(e){const{className:t,checked:n,id:r,disabled:o,onChange:i=$P,...l}=e,u=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":o});return(0,s.createElement)("span",{className:u},(0,s.createElement)("input",a({className:"components-form-toggle__input",id:r,type:"checkbox",checked:n,onChange:i,disabled:o},l)),(0,s.createElement)("span",{className:"components-form-toggle__track"}),(0,s.createElement)("span",{className:"components-form-toggle__thumb"}))};const UP=()=>{};function GP(e){let{value:t,status:n,title:r,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:l=UP,onMouseEnter:f,onMouseLeave:p,messages:m,termPosition:h,termsCount:g}=e;const v=(0,d.useInstanceId)(GP),b=c()("components-form-token-field__token",{"is-error":"error"===n,"is-success":"success"===n,"is-validating":"validating"===n,"is-borderless":i,"is-disabled":a}),y=o(t),w=(0,u.sprintf)((0,u.__)("%1$s (%2$s of %3$s)"),y,h,g);return(0,s.createElement)("span",{className:b,onMouseEnter:f,onMouseLeave:p,title:r},(0,s.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${v}`},(0,s.createElement)(nd,{as:"span"},w),(0,s.createElement)("span",{"aria-hidden":"true"},y)),(0,s.createElement)(id,{className:"components-form-token-field__remove-token",icon:Nb,onClick:a?void 0:()=>l({value:t}),label:m.remove,"aria-describedby":`components-form-token-field__token-text-${v}`}))}const YP=e=>{let{__next36pxDefaultSize:t,hasTokens:n}=e;return!t&&$f("padding-top:",qm(n?1:.5),";padding-bottom:",qm(n?1:.5),";","")},qP=Qu(Xm,{target:"ehq8nmi0"})("padding:5px ",qm(1),";",YP,";"),KP=e=>e;var XP=function e(t){const{autoCapitalize:n,autoComplete:r,maxLength:o,placeholder:i,label:l=(0,u.__)("Add item"),className:f,suggestions:p=[],maxSuggestions:m=100,value:h=[],displayTransform:g=KP,saveTransform:v=(e=>e.trim()),onChange:b=(()=>{}),onInputChange:y=(()=>{}),onFocus:w,isBorderless:x=!1,disabled:_=!1,tokenizeOnSpace:E=!1,messages:C={added:(0,u.__)("Item added."),removed:(0,u.__)("Item removed."),remove:(0,u.__)("Remove item"),__experimentalInvalid:(0,u.__)("Invalid item")},__experimentalRenderItem:k,__experimentalExpandOnFocus:S=!1,__experimentalValidateInput:T=(()=>!0),__experimentalShowHowTo:N=!0,__next36pxDefaultSize:R=!1,__experimentalAutoSelectFirstMatch:I=!1}=t,M=(0,d.useInstanceId)(e),[P,O]=(0,s.useState)(""),[D,A]=(0,s.useState)(0),[L,z]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[V,H]=(0,s.useState)(-1),[j,$]=(0,s.useState)(!1),W=(0,d.usePrevious)(p),U=(0,d.usePrevious)(h),G=(0,s.useRef)(null),Y=(0,s.useRef)(null),q=(0,d.useDebounce)(lb.speak,500);function K(){var e;null===(e=G.current)||void 0===e||e.focus()}function X(){var e;return G.current===(null===(e=G.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function Z(){fe()?z(!1):(O(""),A(0),z(!1),F(!1),H(-1),$(!1))}function J(e){e.target===Y.current&&L&&e.preventDefault()}function Q(e){se(e.value),K()}function ee(e){const t=e.value,n=E?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&ie(r.slice(0,-1)),O(o),y(o)}function te(e){let t=!1;return X()&&de()&&(e(),t=!0),t}function ne(){const e=ue()-1;e>-1&&se(h[e])}function re(){const e=ue();e!function(e){return h.some((t=>le(e)===le(t)))}(e))))];if(t.length>0){const e=[...h];e.splice(ue(),0,...t),b(e)}}function ae(e){T(e)?(ie([e]),(0,lb.speak)(C.added,"assertive"),O(""),H(-1),$(!1),F(!S),L&&K()):(0,lb.speak)(C.__experimentalInvalid,"assertive")}function se(e){const t=h.filter((t=>le(t)!==le(e)));b(t),(0,lb.speak)(C.removed,"assertive")}function le(e){return"object"==typeof e?e.value:e}function ce(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:v,i=o(e);const a=[],s=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?a.push(e):t>0&&s.push(e))})),t=a.concat(s)),t.slice(0,r)}function ue(){return h.length-D}function de(){return 0===P.length}function fe(){return v(P).length>0}function pe(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=P.trim().length>1,n=ce(P),r=n.length>0,o=X()&&S;if(F(o||t&&r),e&&(I&&t&&r?(H(0),$(!0)):(H(-1),$(!1))),t){const e=r?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,u.__)("No results.");q(e,"assertive")}}function me(e,t,n){const r=le(e),o="string"!=typeof e?e.status:void 0,i=t+1,a=n.length;return(0,s.createElement)(jm,{key:"token-"+r},(0,s.createElement)(GP,{value:r,status:o,title:"string"!=typeof e?e.title:void 0,displayTransform:g,onClickRemove:Q,isBorderless:"string"!=typeof e&&e.isBorderless||x,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==o&&_,messages:C,termsCount:a,termPosition:i}))}(0,s.useEffect)((()=>{L&&!X()&&K()}),[L]),(0,s.useEffect)((()=>{const e=!uf()(p,W||[]);(e||h!==U)&&pe(e)}),[p,W,h,U]),(0,s.useEffect)((()=>{pe()}),[P]),(0,s.useEffect)((()=>{pe()}),[I]),_&&L&&(z(!1),O(""));const he=c()(f,"components-form-token-field__input-container",{"is-active":L,"is-disabled":_});let ge={className:"components-form-token-field",tabIndex:-1};const ve=ce();return _||(ge=Object.assign({},ge,{onKeyDown:function(e){let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.key){case"Backspace":t=te(ne);break;case"Enter":t=oe();break;case"ArrowLeft":t=function(){let e=!1;return de()&&(A((e=>Math.min(e+1,h.length))),e=!0),e}();break;case"ArrowUp":H((e=>(0===e?ce(P,p,h,m,v).length:e)-1)),$(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return de()&&(A((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":H((e=>(e+1)%ce(P,p,h,m,v).length)),$(!0),t=!0;break;case"Delete":t=te(re);break;case"Space":E&&(t=oe());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(O(e.target.value),F(!1),H(-1),$(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){let t=!1;","===e.key&&(fe()&&ae(P),t=!0);t&&e.preventDefault()},onFocus:function(e){X()||e.target===Y.current?(z(!0),F(S||B)):z(!1),"function"==typeof w&&w(e)}})),(0,s.createElement)("div",ge,(0,s.createElement)(_v,{htmlFor:`components-form-token-input-${M}`,className:"components-form-token-field__label"},l),(0,s.createElement)("div",{ref:Y,className:he,tabIndex:-1,onMouseDown:J,onTouchStart:J},(0,s.createElement)(qP,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next36pxDefaultSize:R,hasTokens:!!h.length},function(){const e=h.map(me);return e.splice(ue(),0,function(){const e={instanceId:M,autoCapitalize:n,autoComplete:r,placeholder:0===h.length?i:"",key:"input",disabled:_,value:P,onBlur:Z,isExpanded:B,selectedSuggestionIndex:V};return(0,s.createElement)(eT,a({},e,{onChange:o&&h.length>=o?void 0:ee,ref:G}))}()),e}()),B&&(0,s.createElement)(oT,{instanceId:M,match:v(P),displayTransform:g,suggestions:ve,selectedIndex:V,scrollIntoView:j,onHover:function(e){const t=ce().indexOf(e);t>=0&&(H(t),$(!1))},onSelect:function(e){ae(e)},__experimentalRenderItem:k})),N&&(0,s.createElement)("p",{id:`components-form-token-suggestions-howto-${M}`,className:"components-form-token-field__help"},E?(0,u.__)("Separate with commas, spaces, or the Enter key."):(0,u.__)("Separate with commas or the Enter key.")))};const ZP=e=>{let{isSelected:t}=e;return(0,s.createElement)(i.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Circle,{cx:"4",cy:"4",r:"4",fill:t?"#419ECD":"#E1E3E6"}))};function JP(e){let{currentPage:t,numberOfPages:n,setCurrentPage:r}=e;return(0,s.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,u.__)("Guide controls")},Array.from({length:n}).map(((e,o)=>(0,s.createElement)("li",{key:o,"aria-current":o===t?"step":void 0},(0,s.createElement)(id,{key:o,icon:(0,s.createElement)(ZP,{isSelected:o===t}),"aria-label":(0,u.sprintf)((0,u.__)("Page %1$d of %2$d"),o+1,n),onClick:()=>r(o)})))))}function QP(e){let{children:t,className:n,contentLabel:r,finishButtonText:o,onFinish:i,pages:a=[]}=e;const l=(0,s.useRef)(),[d,f]=(0,s.useState)(0);(0,s.useEffect)((()=>{s.Children.count(t)&&Kl()("Passing children to ",{since:"5.5",alternative:"the `pages` prop"})}),[t]),(0,s.useEffect)((()=>{var e,t;l.current&&(null===(e=ES.focus.tabbable.find(l.current))||void 0===e||null===(t=e[0])||void 0===t||t.focus())}),[d]),s.Children.count(t)&&(a=s.Children.map(t,(e=>({content:e}))));const p=d>0,m=d{p&&f(d-1)},g=()=>{m&&f(d+1)};return 0===a.length?null:(0,s.createElement)(hT,{className:c()("components-guide",n),contentLabel:r,onRequestClose:i,onKeyDown:e=>{"ArrowLeft"===e.code?(h(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:l},(0,s.createElement)("div",{className:"components-guide__container"},(0,s.createElement)("div",{className:"components-guide__page"},a[d].image,a.length>1&&(0,s.createElement)(JP,{currentPage:d,numberOfPages:a.length,setCurrentPage:f}),a[d].content),(0,s.createElement)("div",{className:"components-guide__footer"},p&&(0,s.createElement)(id,{className:"components-guide__back-button",onClick:h},(0,u.__)("Previous")),m&&(0,s.createElement)(id,{className:"components-guide__forward-button",onClick:g},(0,u.__)("Next")),!m&&(0,s.createElement)(id,{className:"components-guide__finish-button",onClick:i},o||(0,u.__)("Finish")))))}function eO(e){return(0,s.useEffect)((()=>{Kl()("",{since:"5.5",alternative:"the `pages` prop in "})}),[]),(0,s.createElement)("div",e)}var tO=(0,s.forwardRef)((function(e,t){let{label:n,labelPosition:r,size:o,tooltip:i,...l}=e;return Kl()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,s.createElement)(id,a({},l,{ref:t,tooltipPosition:r,iconSize:o,showTooltip:void 0!==i?!!i:void 0,label:i||n}))}));var nO=ju((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=Hu(e,"Item"),{spacedAround:l,size:c}=Wk(),u=i||c,d=t||(void 0!==r?"button":"div"),f=Vu(),p=(0,s.useMemo)((()=>f("button"===d&&Ik,jk[u]||jk.medium,Pk,l&&Lk,n)),[d,n,f,u,l]),m=f(Mk);return{as:d,className:p,onClick:r,wrapperClassName:m,role:o,...a}}(e);return(0,s.createElement)("div",{role:n,className:r},(0,s.createElement)(td,a({},o,{ref:t})))}),"Item");var rO=ju((function(e,t){const n=Hu(e,"InputControlPrefixWrapper");return(0,s.createElement)(qv,a({marginBottom:0},n,{ref:t}))}),"InputControlPrefixWrapper");function oO(e){let{target:t,callback:n,shortcut:r,bindGlobal:o,eventName:i}=e;return(0,d.useKeyboardShortcut)(r,n,{bindGlobal:o,target:t,eventName:i}),null}var iO=function(e){let{children:t,shortcuts:n,bindGlobal:r,eventName:o}=e;const i=(0,s.useRef)(null),a=Object.entries(null!=n?n:{}).map((e=>{let[t,n]=e;return(0,s.createElement)(oO,{key:t,shortcut:t,callback:n,bindGlobal:r,eventName:o,target:i})}));return s.Children.count(t)?(0,s.createElement)("div",{ref:i},a,t):(0,s.createElement)(s.Fragment,null,a)};var aO=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,d.useInstanceId)(e);if(!s.Children.count(n))return null;const l=`components-menu-group-label-${a}`,u=c()(r,"components-menu-group",{"has-hidden-separator":i});return(0,s.createElement)("div",{className:u},o&&(0,s.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},o),(0,s.createElement)("div",{role:"group","aria-labelledby":o?l:void 0},n))};var sO=(0,s.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:l="right",shortcut:u,isSelected:d,role:f="menuitem",suffix:p,...m}=e;return o=c()("components-menu-item__button",o),r&&(n=(0,s.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)("span",{className:"components-menu-item__info"},r))),i&&"string"!=typeof i&&(i=(0,s.cloneElement)(i,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===l})})),(0,s.createElement)(id,a({ref:t,"aria-checked":"menuitemcheckbox"===f||"menuitemradio"===f?d:void 0,role:f,icon:"left"===l?i:void 0,className:o},m),(0,s.createElement)("span",{className:"components-menu-item__item"},n),!p&&(0,s.createElement)(Mf,{className:"components-menu-item__shortcut",shortcut:u}),!p&&i&&"right"===l&&(0,s.createElement)(Zl,{icon:i}),p)}));const lO=()=>{};function cO(e){let{choices:t=[],onHover:n=lO,onSelect:r,value:o}=e;return t.map((e=>{const t=o===e.value;return(0,s.createElement)(sO,{key:e.value,role:"menuitemradio",icon:t&&F_,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||r(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)}))}var uO=(0,s.forwardRef)((function(e,t){let{eventToOffset:n,...r}=e;return(0,s.createElement)(NS,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:e=>{const{code:t,shiftKey:r}=e;return"Tab"===t?r?-1:1:n?n(e):void 0}},r))}));const dO="root",fO=()=>{},pO=(0,s.createContext)({activeItem:void 0,activeMenu:dO,setActiveMenu:fO,isMenuEmpty:fO,navigationTree:{items:{},getItem:fO,addItem:fO,removeItem:fO,menus:{},getMenu:fO,addMenu:fO,removeMenu:fO,childMenu:{},traverseMenu:fO,isMenuEmpty:fO}}),mO=()=>(0,s.useContext)(pO);var hO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));const gO=(0,s.forwardRef)((function(e,t){let{__nextHasNoMarginBottom:n,className:r,onChange:o,onKeyDown:i,value:l,label:f,placeholder:p=(0,u.__)("Search"),hideLabelFromVision:m=!0,help:h,onClose:g,...v}=e;const b=(0,s.useRef)(),y=`components-search-control-${(0,d.useInstanceId)(gO)}`;return(0,s.createElement)(Tv,{__nextHasNoMarginBottom:n,label:f,id:y,hideLabelFromVision:m,help:h,className:c()(r,"components-search-control")},(0,s.createElement)("div",{className:"components-search-control__input-wrapper"},(0,s.createElement)("input",a({},v,{ref:(0,d.useMergeRefs)([b,t]),className:"components-search-control__input",id:y,type:"search",placeholder:p,onChange:e=>o(e.target.value),onKeyDown:i,autoComplete:"off",value:l||""})),(0,s.createElement)("div",{className:"components-search-control__icon"},g?(0,s.createElement)(id,{icon:Nb,label:(0,u.__)("Close search"),onClick:g}):l?(0,s.createElement)(id,{icon:Nb,label:(0,u.__)("Reset search"),onClick:()=>{var e;o(""),null===(e=b.current)||void 0===e||e.focus()}}):(0,s.createElement)(ay,{icon:hO}))))}));var vO=gO;const bO=Qu("div",{target:"ejwewyf11"})("width:100%;box-sizing:border-box;padding:0 ",qm(4),";overflow:hidden;"),yO=Qu("div",{target:"ejwewyf10"})("margin-top:",qm(6),";margin-bottom:",qm(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",qm(6),";}.components-navigation__group+.components-navigation__group{margin-top:",qm(6),";}"),wO=Qu(id,{target:"ejwewyf9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),xO=Qu("div",{target:"ejwewyf8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),_O=Qu("span",{target:"ejwewyf7"})("height:",qm(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",qm(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),EO=Qu(vO,{target:"ejwewyf6"})({name:"za3n3e",styles:"input[type='search'].components-search-control__input{margin:0;background:#303030;color:#fff;&:focus{background:#434343;color:#fff;}&::placeholder{color:rgba( 255, 255, 255, 0.6 );}}svg{fill:white;}.components-button.has-icon{padding:0;min-width:auto;}"}),CO=Qu($_,{target:"ejwewyf5"})("min-height:",qm(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",qm(2),";padding:",(()=>(0,u.isRTL)()?`${qm(1)} ${qm(4)} ${qm(1)} ${qm(2)}`:`${qm(1)} ${qm(2)} ${qm(1)} ${qm(4)}`),";"),kO=Qu("li",{target:"ejwewyf4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",qm(2)," ",qm(4),";",zh({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",kp.ui.theme,";color:",kp.white,";>button,>a{color:",kp.white,";opacity:1;}}>svg path{color:",kp.gray[600],";}"),SO=Qu("div",{target:"ejwewyf3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",qm(1.5)," ",qm(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),TO=Qu("span",{target:"ejwewyf2"})("display:flex;margin-right:",qm(2),";"),NO=Qu("span",{target:"ejwewyf1"})("margin-left:",(()=>(0,u.isRTL)()?"0":qm(2)),";margin-right:",(()=>(0,u.isRTL)()?qm(2):"0"),";display:inline-flex;padding:",qm(1)," ",qm(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",Sp("animation"),";"),RO=Qu(Rh,{target:"ejwewyf0"})((()=>(0,u.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;"),IO=()=>{const[e,t]=(0,s.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}},MO=()=>{};function PO(e){let{activeItem:t,activeMenu:n=dO,children:r,className:o,onActivateMenu:i=MO}=e;const[a,l]=(0,s.useState)(n),[d,f]=(0,s.useState)(),p=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=IO(),{nodes:o,getNode:i,addNode:a,removeNode:l}=IO(),[c,u]=(0,s.useState)({}),d=e=>c[e]||[],f=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{u((n=>{const r={...n};return r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r})),a(e,t)},removeMenu:l,childMenu:c,traverseMenu:f,isMenuEmpty:e=>{let t=!0;return f(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,u.isRTL)()?"right":"left",h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;p.getMenu(e)&&(f(t),l(e),i(e))},g=(0,s.useRef)(!1);(0,s.useEffect)((()=>{g.current||(g.current=!0)}),[]),(0,s.useEffect)((()=>{n!==a&&h(n)}),[n]);const v={activeItem:t,activeMenu:a,setActiveMenu:h,navigationTree:p},b=c()("components-navigation",o),y=km({type:"slide-in",origin:d});return(0,s.createElement)(bO,{className:b},(0,s.createElement)("div",{key:a,className:c()({[y]:g.current&&d})},(0,s.createElement)(pO.Provider,{value:v},r)))}var OO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var DO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var AO=(0,s.forwardRef)((function(e,t){var n;let{backButtonLabel:r,className:o,href:i,onClick:a,parentMenu:l}=e;const{setActiveMenu:d,navigationTree:f}=mO(),p=c()("components-navigation__back-button",o),m=null===(n=f.getMenu(l))||void 0===n?void 0:n.title,h=(0,u.isRTL)()?OO:DO;return(0,s.createElement)(wO,{className:p,href:i,variant:"tertiary",ref:t,onClick:e=>{"function"==typeof a&&a(e);const t=(0,u.isRTL)()?"left":"right";l&&!e.defaultPrevented&&d(l,t)}},(0,s.createElement)(ay,{icon:h}),r||m||(0,u.__)("Back"))}));const LO=(0,s.createContext)({group:void 0});let zO=0;function BO(e){let{children:t,className:n,title:r}=e;const[o]=(0,s.useState)("group-"+ ++zO),{navigationTree:{items:i}}=mO(),a={group:o};if(!Object.values(i).some((e=>e.group===o&&e._isVisible)))return(0,s.createElement)(LO.Provider,{value:a},t);const l=`components-navigation__group-title-${o}`,u=c()("components-navigation__group",n);return(0,s.createElement)(LO.Provider,{value:a},(0,s.createElement)("li",{className:u},r&&(0,s.createElement)(CO,{className:"components-navigation__group-title",id:l,level:3},r),(0,s.createElement)("ul",{"aria-labelledby":l,role:"group"},t)))}function FO(e){const{badge:t,title:n}=e;return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(RO,{className:"components-navigation__item-title",variant:"body.small",as:"span"},n),t&&(0,s.createElement)(NO,{className:"components-navigation__item-badge"},t))}const VO=(0,s.createContext)({menu:void 0,search:""}),HO=()=>(0,s.useContext)(VO),jO=e=>ab()(e).replace(/^\//,"").toLowerCase(),$O=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=mO(),{group:i}=(0,s.useContext)(LO),{menu:a,search:l}=HO();(0,s.useEffect)((()=>{const s=n===a,c=!l||((e,t)=>-1!==jO(e).indexOf(jO(t)))(t.title,l);return r(e,{...t,group:i,menu:a,_isVisible:s&&c}),()=>{o(e)}}),[n,l])};let WO=0;function UO(e){var t;const{children:n,className:r,title:o,href:i,...l}=e,[u]=(0,s.useState)("item-"+ ++WO);$O(u,e);const{navigationTree:d}=mO();if(null===(t=d.getItem(u))||void 0===t||!t._isVisible)return null;const f=c()("components-navigation__item",r);return(0,s.createElement)(kO,a({className:f},l),n)}const GO=()=>{};function YO(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:l,onClick:d=GO,title:f,icon:p,hideIfTargetMenuEmpty:m,isText:h,...g}=e,{activeItem:v,setActiveMenu:b,navigationTree:{isMenuEmpty:y}}=mO();if(m&&l&&y(l))return null;const w=i&&v===i,x=c()(r,{"is-active":w}),_=(0,u.isRTL)()?DO:OO,E=n?e:{...e,onClick:void 0},C=h?g:{as:id,href:o,onClick:e=>{l&&b(l),d(e)},"aria-current":w?"page":void 0,...g};return(0,s.createElement)(UO,a({},E,{className:x}),n||(0,s.createElement)(SO,C,p&&(0,s.createElement)(TO,null,(0,s.createElement)(ay,{icon:p})),(0,s.createElement)(FO,{title:f,badge:t}),l&&(0,s.createElement)(ay,{icon:_})))}var qO=(0,d.createHigherOrderComponent)((e=>t=>(0,s.createElement)(e,a({},t,{speak:lb.speak,debouncedSpeak:(0,d.useDebounce)(lb.speak,500)}))),"withSpokenMessages");var KO=qO((function(e){let{debouncedSpeak:t,onCloseSearch:n,onSearch:r,search:o,title:i}=e;const{navigationTree:{items:a}}=mO(),{menu:l}=HO(),c=(0,s.useRef)();(0,s.useEffect)((()=>{const e=setTimeout((()=>{c.current.focus()}),100);return()=>{clearTimeout(e)}}),[]),(0,s.useEffect)((()=>{if(!o)return;const e=Object.values(a).filter((e=>e._isVisible)).length,n=(0,u.sprintf)((0,u._n)("%d result found.","%d results found.",e),e);t(n)}),[a,o]);const d=()=>{r(""),n()},f=`components-navigation__menu-title-search-${l}`,p=(0,u.sprintf)((0,u.__)("Search %s"),null==i?void 0:i.toLowerCase()).trim();return(0,s.createElement)("div",{className:"components-navigation__menu-title-search"},(0,s.createElement)(EO,{autoComplete:"off",className:"components-navigation__menu-search-input",id:f,onChange:e=>r(e),onKeyDown:function(e){"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),d())},placeholder:p,onClose:d,ref:c,type:"search",value:o}))}));function XO(e){let{hasSearch:t,onSearch:n,search:r,title:o,titleAction:i}=e;const[a,l]=(0,s.useState)(!1),{menu:c}=HO(),d=(0,s.useRef)();if(!o)return null;const f=`components-navigation__menu-title-${c}`,p=(0,u.sprintf)((0,u.__)("Search in %s"),o);return(0,s.createElement)(xO,{className:"components-navigation__menu-title"},!a&&(0,s.createElement)(CO,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,s.createElement)("span",{id:f},o),(t||i)&&(0,s.createElement)(_O,null,i,t&&(0,s.createElement)(id,{isSmall:!0,variant:"tertiary",label:p,onClick:()=>l(!0),ref:d},(0,s.createElement)(ay,{icon:hO})))),a&&(0,s.createElement)("div",{className:km({type:"slide-in",origin:"left"})},(0,s.createElement)(KO,{onCloseSearch:()=>{l(!1),setTimeout((()=>{d.current.focus()}),100)},onSearch:n,search:r,title:o})))}function ZO(e){let{search:t}=e;const{navigationTree:{items:n}}=mO(),r=Object.values(n).filter((e=>e._isVisible)).length;return!t||r?null:(0,s.createElement)(kO,null,(0,s.createElement)(SO,null,(0,u.__)("No results found.")," "))}function JO(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=dO,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:p,titleAction:m}=e,[h,g]=(0,s.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=mO(),r=e.menu||dO;(0,s.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=mO(),b={menu:i,search:h};if(v!==i)return(0,s.createElement)(VO.Provider,{value:b},n);const y=!!l,w=y?d:h,x=y?l:g,_=`components-navigation__menu-title-${i}`,E=c()("components-navigation__menu",r);return(0,s.createElement)(VO.Provider,{value:b},(0,s.createElement)(yO,{className:E},(u||a)&&(0,s.createElement)(AO,{backButtonLabel:t,parentMenu:u,onClick:a}),p&&(0,s.createElement)(XO,{hasSearch:o,onSearch:x,search:w,title:p,titleAction:m}),(0,s.createElement)(RS,null,(0,s.createElement)("ul",{"aria-labelledby":_},n,w&&!f&&(0,s.createElement)(ZO,{search:w})))))}const QO=(0,s.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});function eD(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(nD(t.delimiter||"/#?"),"]+?"),a=[],s=0,l=0,c="",u=function(e){if(l-1:void 0===E;o||(g+="(?:".concat(h,"(?=").concat(m,"))?")),C||(g+="(?=".concat(h,"|").concat(m,")"))}return new RegExp(g,rD(n))}(eD(e,n),t,n)}function iD(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return iD(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),rD(n))}(e,t,n):oD(e,t,n)}function aD(e,t){return tD(t,{decode:decodeURIComponent})(e)}function sD(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"add":return[...e,t.screen];case"remove":return e.filter((e=>e.id!==t.screen.id))}return e}var lD={name:"15bx5k",styles:"overflow-x:hidden"};const cD=ju((function(e,t){const{initialPath:n,children:r,className:o,...i}=Hu(e,"NavigatorProvider"),[l,c]=(0,s.useState)([{path:n}]),u=(0,s.useRef)([]),[d,f]=(0,s.useReducer)(sD,[]),p=(0,s.useRef)([]);(0,s.useEffect)((()=>{p.current=d}),[d]),(0,s.useEffect)((()=>{u.current=l}),[l]);const m=(0,s.useRef)(),h=(0,s.useMemo)((()=>{let e;if(0===l.length||void 0===(e=l[l.length-1].path))return void(m.current=void 0);const t=(e=>{const t=function(e,t){for(const n of t){const t=aD(e,n.path);if(t)return{params:t.params,id:n.id}}}(e,d);return m.current&&t&&uf()(t.params,m.current.params)&&t.id===m.current.id?m.current:t})(e);return m.current=t,t}),[d,l]),g=(0,s.useCallback)((e=>f({type:"add",screen:e})),[]),v=(0,s.useCallback)((e=>f({type:"remove",screen:e})),[]),b=(0,s.useCallback)((()=>{c((e=>e.length<=1?e:[...e.slice(0,-2),{...e[e.length-2],isBack:!0,hasRestoredFocus:!1}]))}),[]),y=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{focusTargetSelector:n,isBack:r=!1,...o}=t,i=r&&u.current.length>1&&u.current[u.current.length-2].path===e;i?b():c((t=>{const i={...o,path:e,isBack:r,hasRestoredFocus:!1};return t.length<1?[i]:[...t.slice(t.length>49?1:0,-1),{...t[t.length-1],focusTargetSelector:n},i]}))}),[b]),w=(0,s.useCallback)((()=>{const e=u.current[u.current.length-1].path;if(void 0===e)return;const t=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==aD(e,t.path)))&&(r=e)}return r}(e,p.current);void 0!==t&&y(t,{isBack:!0})}),[y]),x=(0,s.useMemo)((()=>({location:{...l[l.length-1],isInitial:1===l.length},params:h?h.params:{},match:h?h.id:void 0,goTo:y,goBack:b,goToParent:w,addScreen:g,removeScreen:v})),[l,h,y,b,w,g,v]),_=Vu(),E=(0,s.useMemo)((()=>_(lD,o)),[o,_]);return(0,s.createElement)(td,a({ref:t,className:E},i),(0,s.createElement)(QO.Provider,{value:x},r))}),"NavigatorProvider");var uD=cD,dD=window.wp.escapeHtml;var fD={name:"14x3t6z",styles:"overflow-x:auto;max-height:100%"};const pD=ju((function(e,t){const n=(0,s.useId)(),{children:r,className:o,path:i,...l}=Hu(e,"NavigatorScreen"),c=(0,d.useReducedMotion)(),{location:f,match:p,addScreen:m,removeScreen:h}=(0,s.useContext)(QO),g=p===n,v=(0,s.useRef)(null);(0,s.useEffect)((()=>{const e={id:n,path:(0,dD.escapeAttribute)(i)};return m(e),()=>h(e)}),[n,i,m,h]);const b=Vu(),y=(0,s.useMemo)((()=>b(fD,o)),[o,b]),w=(0,s.useRef)(f);(0,s.useEffect)((()=>{w.current=f}),[f]);const x=f.isInitial&&!f.isBack;(0,s.useEffect)((()=>{if(x||!g||!v.current||w.current.hasRestoredFocus)return;const e=v.current.ownerDocument.activeElement;if(v.current.contains(e))return;let t=null;if(f.isBack&&null!=f&&f.focusTargetSelector&&(t=v.current.querySelector(f.focusTargetSelector)),!t){const e=ES.focus.tabbable.find(v.current)[0];t=null!=e?e:v.current}w.current.hasRestoredFocus=!0,t.focus()}),[x,g,f.isBack,f.focusTargetSelector]);const _=(0,d.useMergeRefs)([t,v]);if(!g)return null;if(c)return(0,s.createElement)(td,a({ref:_,className:y},l),r);const E={opacity:1,transition:{delay:0,duration:.14,ease:"easeInOut"},x:0},C={opacity:0,x:(0,u.isRTL)()&&f.isBack||!(0,u.isRTL)()&&!f.isBack?50:-50},k={animate:E,exit:{delay:0,opacity:0,x:!(0,u.isRTL)()&&f.isBack||(0,u.isRTL)()&&!f.isBack?50:-50,transition:{duration:.14,ease:"easeInOut"}},initial:C};return(0,s.createElement)(Gl.div,a({ref:_,className:y},l,k),r)}),"NavigatorScreen");var mD=pD;var hD=function(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,s.useContext)(QO);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}};var gD=ju((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=id,attributeName:o="id",...i}=Hu(e,"NavigatorButton"),a=(0,dD.escapeAttribute)(t),{goTo:l}=hD();return{as:r,onClick:(0,s.useCallback)((e=>{var t,r;e.preventDefault(),l(a,{focusTargetSelector:(t=o,r=a,`[${t}="${r}"]`)}),null==n||n(e)}),[l,n,o,a]),...i,[o]:a}}(e);return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorButton");function vD(e){const{onClick:t,as:n=id,goToParent:r=!1,...o}=Hu(e,"NavigatorBackButton"),{goBack:i,goToParent:a}=hD();return{as:n,onClick:(0,s.useCallback)((e=>{e.preventDefault(),r?a():i(),null==t||t(e)}),[r,a,i,t]),...o}}var bD=ju((function(e,t){const n=vD(e);return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorBackButton");var yD=ju((function(e,t){const n=vD({...e,goToParent:!0});return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorToParentButton");const wD=()=>{};function xD(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}var _D=function(e){let{className:t,status:n="info",children:r,spokenMessage:o=r,onRemove:i=wD,isDismissible:a=!0,actions:l=[],politeness:d=xD(n),__unstableHTML:f,onDismiss:p=wD}=e;!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,lb.speak)(n,t)}),[n,t])}(o,d);const m=c()(t,"components-notice","is-"+n,{"is-dismissible":a});return f&&"string"==typeof r&&(r=(0,s.createElement)(s.RawHTML,null,r)),(0,s.createElement)("div",{className:m},(0,s.createElement)("div",{className:"components-notice__content"},r,(0,s.createElement)("div",{className:"components-notice__actions"},l.map(((e,t)=>{let{className:n,label:r,isPrimary:o,variant:i,noDefaultClasses:a=!1,onClick:l,url:u}=e,d=i;return"primary"===i||a||(d=u?"link":"secondary"),void 0===d&&o&&(d="primary"),(0,s.createElement)(id,{key:t,href:u,variant:d,onClick:u?void 0:l,className:c()("components-notice__action",n)},r)})))),a&&(0,s.createElement)(id,{className:"components-notice__dismiss",icon:Yl,label:(0,u.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),p(),i()},showTooltip:!1}))};const ED=()=>{};var CD=function(e){let{notices:t,onRemove:n=ED,className:r,children:o}=e;const i=e=>()=>n(e);return r=c()("components-notice-list",r),(0,s.createElement)("div",{className:r},o,[...t].reverse().map((e=>{const{content:t,...n}=e;return(0,s.createElement)(_D,a({},n,{key:e.id,onRemove:i(e.id)}),e.content)})))};var kD=function(e){let{label:t,children:n}=e;return(0,s.createElement)("div",{className:"components-panel__header"},t&&(0,s.createElement)("h2",null,t),n)};var SD=(0,s.forwardRef)((function(e,t){let{header:n,className:r,children:o}=e;const i=c()(r,"components-panel");return(0,s.createElement)("div",{className:i,ref:t},n&&(0,s.createElement)(kD,{label:n}),o)}));var TD=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));const ND=()=>{};const RD=(0,s.forwardRef)(((e,t)=>{let{isOpened:n,icon:r,title:o,...i}=e;return o?(0,s.createElement)("h2",{className:"components-panel__body-title"},(0,s.createElement)(id,a({className:"components-panel__body-toggle","aria-expanded":n,ref:t},i),(0,s.createElement)("span",{"aria-hidden":"true"},(0,s.createElement)(Zl,{className:"components-panel__arrow",icon:n?TD:sy})),o,r&&(0,s.createElement)(Zl,{icon:r,className:"components-panel__icon",size:20}))):null})),ID=(0,s.forwardRef)((function(e,t){let{buttonProps:n={},children:r,className:o,icon:i,initialOpen:l,onToggle:u=ND,opened:f,title:p,scrollAfterOpen:m=!0}=e;const[h,g]=py(f,{initial:void 0===l||l}),v=(0,s.useRef)(),b=(0,d.useReducedMotion)()?"auto":"smooth",y=(0,s.useRef)();y.current=m,tc((()=>{var e;h&&y.current&&null!==(e=v.current)&&void 0!==e&&e.scrollIntoView&&v.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:b})}),[h,b]);const w=c()("components-panel__body",o,{"is-opened":h});return(0,s.createElement)("div",{className:w,ref:(0,d.useMergeRefs)([v,t])},(0,s.createElement)(RD,a({icon:i,isOpened:h,onClick:e=>{e.preventDefault();const t=!h;g(t),u(t)},title:p},n)),"function"==typeof r?r({opened:h}):h&&r)}));ID.displayName="PanelBody";var MD=ID;var PD=(0,s.forwardRef)(((e,t)=>{let{className:n,children:r}=e;return(0,s.createElement)("div",{className:c()("components-panel__row",n),ref:t},r)}));const OD=(0,s.createElement)(i.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none"},(0,s.createElement)(i.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"}));var DD=function(e){const{icon:t,children:n,label:r,instructions:o,className:i,notices:l,preview:u,isColumnLayout:f,withIllustration:p,...m}=e,[h,{width:g}]=(0,d.useResizeObserver)();let v;"number"==typeof g&&(v={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const b=c()("components-placeholder",i,v,p?"has-illustration":null),y=c()("components-placeholder__fieldset",{"is-column-layout":f});return(0,s.createElement)("div",a({},m,{className:b}),p?OD:null,h,l,u&&(0,s.createElement)("div",{className:"components-placeholder__preview"},u),(0,s.createElement)("div",{className:"components-placeholder__label"},(0,s.createElement)(Zl,{icon:t}),r),(0,s.createElement)("fieldset",{className:y},!!o&&(0,s.createElement)("legend",{className:"components-placeholder__instructions"},o),n))};function AD(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)}))),n=(0,ec.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}var LD=window.wp.htmlEntities;function zD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,LD.decodeEntities)(e.name)},...zD(e.children||[],t+1)]))}var BD=function(e){let{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i=[],...l}=e;const c=(0,s.useMemo)((()=>[n&&{value:"",label:n},...zD(i)].filter((e=>!!e))),[n,i]);return(0,s.createElement)(uy,a({label:t,options:c,onChange:r,value:o},l))};function FD(e){let{label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}=e;if(!r)return null;const a=AD(r);return(0,s.createElement)(BD,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:void 0!==o?String(o):void 0})}function VD(e){let{label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...l}=e;const c=(0,s.useMemo)((()=>AD(r)),[r]);return(0,s.createElement)(BD,a({label:t,noOptionLabel:n,onChange:i,tree:c,selectedId:void 0!==o?String(o):void 0},l))}const HD=1,jD=100;function $D(e){return"categoriesList"in e}function WD(e){return"categorySuggestions"in e}var UD=function(e){let{authorList:t,selectedAuthorId:n,numberOfItems:r,order:o,orderBy:i,maxItems:a=jD,minItems:l=HD,onAuthorChange:c,onNumberOfItemsChange:d,onOrderChange:f,onOrderByChange:p,...m}=e;return(0,s.createElement)(s.Fragment,null,[f&&p&&(0,s.createElement)(dy,{__nextHasNoMarginBottom:!0,key:"query-controls-order-select",label:(0,u.__)("Order by"),value:`${i}/${o}`,options:[{label:(0,u.__)("Newest to oldest"),value:"date/desc"},{label:(0,u.__)("Oldest to newest"),value:"date/asc"},{label:(0,u.__)("A → Z"),value:"title/asc"},{label:(0,u.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==o&&f(n),t!==i&&p(t)}}),$D(m)&&m.categoriesList&&m.onCategoryChange&&(0,s.createElement)(VD,{key:"query-controls-category-select",categoriesList:m.categoriesList,label:(0,u.__)("Category"),noOptionLabel:(0,u.__)("All"),selectedCategoryId:m.selectedCategoryId,onChange:m.onCategoryChange}),WD(m)&&m.categorySuggestions&&m.onCategoryChange&&(0,s.createElement)(XP,{key:"query-controls-categories-select",label:(0,u.__)("Categories"),value:m.selectedCategories&&m.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(m.categorySuggestions),onChange:m.onCategoryChange,maxSuggestions:20}),c&&(0,s.createElement)(FD,{key:"query-controls-author-select",authorList:t,label:(0,u.__)("Author"),noOptionLabel:(0,u.__)("All"),selectedAuthorId:n,onChange:c}),d&&(0,s.createElement)(jy,{__nextHasNoMarginBottom:!0,key:"query-controls-range-control",label:(0,u.__)("Number of items"),value:r,onChange:d,min:l,max:a,required:!0})])};var GD=(0,s.createContext)({state:null,setState:()=>{}});var YD=(0,s.forwardRef)((function(e,t){let{children:n,value:r,...o}=e;const i=(0,s.useContext)(GD),l=i.state===r;return(0,s.createElement)(EP,a({ref:t,as:id,variant:l?"primary":"secondary",value:r},i,o),n||r)}));var qD=(0,s.forwardRef)((function(e,t){let{label:n,checked:r,defaultChecked:o,disabled:i,onChange:l,...c}=e;const u=lP({state:o,baseId:c.id}),d={...u,disabled:i,state:null!=r?r:u.state,setState:null!=l?l:u.setState};return(0,s.createElement)(GD.Provider,{value:d},(0,s.createElement)(dP,a({ref:t,as:NC,"aria-label":n},u,c)))}));var KD=function e(t){const{label:n,className:r,selected:o,help:i,onChange:l,hideLabelFromVision:u,options:f=[],...p}=t,m=`inspector-radio-control-${(0,d.useInstanceId)(e)}`,h=e=>l(e.target.value);return null!=f&&f.length?(0,s.createElement)(Tv,{__nextHasNoMarginBottom:!0,label:n,id:m,hideLabelFromVision:u,help:i,className:c()(r,"components-radio-control")},(0,s.createElement)(H_,{spacing:1},f.map(((e,t)=>(0,s.createElement)("div",{key:`${m}-${t}`,className:"components-radio-control__option"},(0,s.createElement)("input",a({id:`${m}-${t}`,className:"components-radio-control__input",type:"radio",name:m,value:e.value,onChange:h,checked:e.value===o,"aria-describedby":i?`${m}__help`:void 0},p)),(0,s.createElement)("label",{htmlFor:`${m}-${t}`},e.label)))))):null},XD=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZD=function(){return ZD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{},vA={bottom:"bottom",corner:"corner"};function bA(e){let{axis:t,fadeTimeout:n=180,onResize:r=gA,position:o=vA.bottom,showPx:i=!1}=e;const[a,l]=(0,d.useResizeObserver)(),c=!!t,[u,f]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!1),{width:h,height:g}=l,v=(0,s.useRef)(g),b=(0,s.useRef)(h),y=(0,s.useRef)(),w=(0,s.useCallback)((()=>{y.current&&window.clearTimeout(y.current),y.current=window.setTimeout((()=>{c||(f(!1),m(!1))}),n)}),[n,c]);(0,s.useEffect)((()=>{if(!(null!==h||null!==g))return;const e=h!==b.current,t=g!==v.current;if(e||t){if(h&&!b.current&&g&&!v.current)return b.current=h,void(v.current=g);e&&(f(!0),b.current=h),t&&(m(!0),v.current=g),r({width:h,height:g}),w()}}),[h,g,r,w]);const x=function(e){let{axis:t,height:n,moveX:r=!1,moveY:o=!1,position:i=vA.bottom,showPx:a=!1,width:s}=e;if(!r&&!o)return;if(i===vA.corner)return`${s} x ${n}`;const l=a?" px":"";if(t){if("x"===t&&r)return`${s}${l}`;if("y"===t&&o)return`${n}${l}`}if(r&&o)return`${s} x ${n}`;if(r)return`${s}${l}`;if(o)return`${n}${l}`;return}({axis:t,height:g,moveX:u,moveY:p,position:o,showPx:i,width:h});return{label:x,resizeListener:a}}const yA=Qu("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),wA=Qu("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),xA=Qu("div",{target:"ekdag501"})("background:",kp.gray[900],";border-radius:2px;box-sizing:border-box;font-size:12px;color:",kp.ui.textDark,";padding:4px 8px;position:relative;"),_A=Qu(Rh,{target:"ekdag500"})("&&&{color:",kp.ui.textDark,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const EA=(0,s.forwardRef)((function(e,t){let{label:n,position:r=vA.corner,zIndex:o=1e3,...i}=e;const l=!!n,c=r===vA.bottom,d=r===vA.corner;if(!l)return null;let f={opacity:l?1:void 0,zIndex:o},p={};return c&&(f={...f,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},p={transform:"translate(0, 100%)"}),d&&(f={...f,position:"absolute",top:4,right:(0,u.isRTL)()?void 0:4,left:(0,u.isRTL)()?4:void 0}),(0,s.createElement)(wA,a({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:f},i),(0,s.createElement)(xA,{className:"components-resizable-tooltip__tooltip",style:p},(0,s.createElement)(_A,{as:"span"},n)))}));var CA=EA;const kA=()=>{};const SA=(0,s.forwardRef)((function(e,t){let{axis:n,className:r,fadeTimeout:o=180,isVisible:i=!0,labelRef:l,onResize:u=kA,position:d=vA.bottom,showPx:f=!0,zIndex:p=1e3,...m}=e;const{label:h,resizeListener:g}=bA({axis:n,fadeTimeout:o,onResize:u,showPx:f,position:d});if(!i)return null;const v=c()("components-resize-tooltip",r);return(0,s.createElement)(yA,a({"aria-hidden":"true",className:v,ref:t},m),g,(0,s.createElement)(CA,{"aria-hidden":m["aria-hidden"],label:h,position:d,ref:l,zIndex:p}))}));var TA=SA;const NA="components-resizable-box__handle",RA="components-resizable-box__side-handle",IA="components-resizable-box__corner-handle",MA={top:c()(NA,RA,"components-resizable-box__handle-top"),right:c()(NA,RA,"components-resizable-box__handle-right"),bottom:c()(NA,RA,"components-resizable-box__handle-bottom"),left:c()(NA,RA,"components-resizable-box__handle-left"),topLeft:c()(NA,IA,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(NA,IA,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(NA,IA,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(NA,IA,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},PA={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},OA={top:PA,right:PA,bottom:PA,left:PA,topLeft:PA,topRight:PA,bottomRight:PA,bottomLeft:PA};const DA=(0,s.forwardRef)((function(e,t){let{className:n,children:r,showHandle:o=!0,__experimentalShowTooltip:i=!1,__experimentalTooltipProps:l={},...u}=e;return(0,s.createElement)(hA,a({className:c()("components-resizable-box__container",o&&"has-show-handle",n),handleClasses:MA,handleStyles:OA,ref:t},u),r,i&&(0,s.createElement)(TA,l))}));var AA=DA;var LA=function(e){let{naturalWidth:t,naturalHeight:n,children:r,isInline:o=!1}=e;const[i,{width:a}]=(0,d.useResizeObserver)();if(1!==s.Children.count(r))return null;const l={paddingBottom:t<(null!=a?a:0)?n:n/t*100+"%"},u=o?"span":"div";return(0,s.createElement)(u,{className:"components-responsive-wrapper"},i,(0,s.createElement)(u,{style:l}),(0,s.cloneElement)(r,{className:c()("components-responsive-wrapper__content",r.props.className)}))};const zA=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vmin|vmax|vh|vw)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)},BA="\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n";var FA=function(e){let{html:t="",title:n="",type:r,styles:o=[],scripts:i=[],onFocus:a}=e;const l=(0,s.useRef)(),[c,u]=(0,s.useState)(0),[f,p]=(0,s.useState)(0);function m(){try{var e,t;return!(null===(e=l.current)||void 0===e||null===(t=e.contentDocument)||void 0===t||!t.body)}catch(e){return!1}}function h(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!m())return;const{contentDocument:a,ownerDocument:c}=l.current;if(!e&&null!==(null==a?void 0:a.body.getAttribute("data-resizable-iframe-connected")))return;const u=(0,s.createElement)("html",{lang:c.documentElement.lang,className:r},(0,s.createElement)("head",null,(0,s.createElement)("title",null,n),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:BA}}),o.map(((e,t)=>(0,s.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,s.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:r},(0,s.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,s.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${zA.toString()})();`}}),i.map((e=>(0,s.createElement)("script",{key:e,src:e})))));a.open(),a.write(""+(0,s.renderToString)(u)),a.close()}return(0,s.useEffect)((()=>{var e;function t(){h(!1)}function n(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(u(n.width),p(n.height))}h();const r=l.current,o=null==r||null===(e=r.ownerDocument)||void 0===e?void 0:e.defaultView;return null==r||r.addEventListener("load",t,!1),null==o||o.addEventListener("message",n),()=>{null==r||r.removeEventListener("load",t,!1),null==o||o.addEventListener("message",n)}}),[]),(0,s.useEffect)((()=>{h()}),[n,o,i]),(0,s.useEffect)((()=>{h(!0)}),[t,r]),(0,s.createElement)("iframe",{ref:(0,d.useMergeRefs)([l,(0,d.useFocusableIframe)()]),title:n,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(c),height:Math.ceil(f)})};const VA=(0,s.forwardRef)((function(e,t){let{className:n,children:r,spokenMessage:o=r,politeness:i="polite",actions:a=[],onRemove:l,icon:d=null,explicitDismiss:f=!1,onDismiss:p,listRef:m}=e;function h(e){var t;e&&e.preventDefault&&e.preventDefault(),null==m||null===(t=m.current)||void 0===t||t.focus(),null==p||p(),null==l||l()}!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,lb.speak)(n,t)}),[n,t])}(o,i),(0,s.useEffect)((()=>{const e=setTimeout((()=>{f||(null==p||p(),null==l||l())}),1e4);return()=>clearTimeout(e)}),[p,l,f]);const g=c()(n,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});a&&a.length>1&&("undefined"!=typeof process&&process.env,a=[a[0]]);const v=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!d});return(0,s.createElement)("div",{ref:t,className:g,onClick:f?void 0:h,tabIndex:0,role:f?"":"button",onKeyPress:f?void 0:h,"aria-label":f?"":(0,u.__)("Dismiss this notice")},(0,s.createElement)("div",{className:v},d&&(0,s.createElement)("div",{className:"components-snackbar__icon"},d),r,a.map(((e,t)=>{let{label:n,onClick:r,url:o}=e;return(0,s.createElement)(id,{key:t,href:o,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),null==l||l(),t&&t(e)}(e,r),className:"components-snackbar__action"},n)})),f&&(0,s.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:0,className:"components-snackbar__dismiss-button",onClick:h,onKeyPress:h},"✕")))}));var HA=VA;const jA={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{stiffness:1e3,velocity:-100}}},exit:{opacity:0,transition:{duration:.5}}};var $A=function(e){let{notices:t,className:n,children:r,onRemove:o}=e;const i=(0,s.useRef)(null),l=(0,d.useReducedMotion)();n=c()("components-snackbar-list",n);const u=e=>()=>null==o?void 0:o(e.id);return(0,s.createElement)("div",{className:n,tabIndex:-1,ref:i},r,(0,s.createElement)(Om,null,t.map((e=>{const{content:t,...n}=e;return(0,s.createElement)(Gl.div,{layout:!l,initial:"init",animate:"open",exit:"exit",key:e.id,variants:l?void 0:jA},(0,s.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,s.createElement)(HA,a({},n,{onRemove:u(e),listRef:i}),e.content)))}))))};const WA=(function(){var e=$f.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})` + */var r=n(9196);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(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(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},635:function(e,t,n){"use strict";e.exports=n(7755)},9196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{AnglePickerControl:function(){return ab},Animate:function(){return Nm},Autocomplete:function(){return bb},BaseControl:function(){return Rv},BlockQuotation:function(){return i.BlockQuotation},Button:function(){return id},ButtonGroup:function(){return IC},Card:function(){return uk},CardBody:function(){return bk},CardDivider:function(){return kk},CardFooter:function(){return Sk},CardHeader:function(){return Tk},CardMedia:function(){return Nk},CheckboxControl:function(){return Rk},Circle:function(){return i.Circle},ClipboardButton:function(){return Ik},ColorIndicator:function(){return Jb},ColorPalette:function(){return eE},ColorPicker:function(){return V_},ComboboxControl:function(){return uT},CustomGradientPicker:function(){return yS},CustomSelectControl:function(){return CN},Dashicon:function(){return Xl},DatePicker:function(){return TI},DateTimePicker:function(){return JI},Disabled:function(){return aM},Draggable:function(){return lM},DropZone:function(){return uM},DropZoneProvider:function(){return dM},Dropdown:function(){return ry},DropdownMenu:function(){return DS},DuotonePicker:function(){return yM},DuotoneSwatch:function(){return mM},ExternalLink:function(){return _M},Fill:function(){return hf},Flex:function(){return Jm},FlexBlock:function(){return $m},FlexItem:function(){return Wm},FocalPointPicker:function(){return YM},FocusReturnProvider:function(){return Cz},FocusableIframe:function(){return qM},FontSizePicker:function(){return $P},FormFileUpload:function(){return WP},FormToggle:function(){return GP},FormTokenField:function(){return JP},G:function(){return i.G},GradientPicker:function(){return ES},Guide:function(){return tO},GuidePage:function(){return nO},HorizontalRule:function(){return i.HorizontalRule},Icon:function(){return Zl},IconButton:function(){return rO},IsolatedEventContainer:function(){return lz},KeyboardShortcuts:function(){return sO},Line:function(){return i.Line},MenuGroup:function(){return lO},MenuItem:function(){return cO},MenuItemsChoice:function(){return dO},Modal:function(){return vT},NavigableMenu:function(){return MS},Notice:function(){return CD},NoticeList:function(){return SD},Panel:function(){return ND},PanelBody:function(){return OD},PanelHeader:function(){return TD},PanelRow:function(){return DD},Path:function(){return i.Path},Placeholder:function(){return LD},Polygon:function(){return i.Polygon},Popover:function(){return Pf},QueryControls:function(){return YD},RadioControl:function(){return ZD},RangeControl:function(){return Wy},Rect:function(){return i.Rect},ResizableBox:function(){return zA},ResponsiveWrapper:function(){return BA},SVG:function(){return i.SVG},SandBox:function(){return HA},ScrollLock:function(){return cd},SearchControl:function(){return yO},SelectControl:function(){return py},Slot:function(){return gf},SlotFillProvider:function(){return vf},Snackbar:function(){return $A},SnackbarList:function(){return UA},Spinner:function(){return JA},TabPanel:function(){return tL},TabbableContainer:function(){return fO},TextControl:function(){return rL},TextHighlight:function(){return uL},TextareaControl:function(){return cL},TimePicker:function(){return YI},Tip:function(){return fL},ToggleControl:function(){return pL},Toolbar:function(){return RL},ToolbarButton:function(){return _L},ToolbarDropdownMenu:function(){return IL},ToolbarGroup:function(){return kL},ToolbarItem:function(){return wL},Tooltip:function(){return Ff},TreeSelect:function(){return VD},VisuallyHidden:function(){return nd},__experimentalAlignmentMatrixControl:function(){return km},__experimentalApplyValueToSides:function(){return cC},__experimentalBorderBoxControl:function(){return BE},__experimentalBorderControl:function(){return wE},__experimentalBoxControl:function(){return RC},__experimentalConfirmDialog:function(){return yT},__experimentalDimensionControl:function(){return eM},__experimentalDivider:function(){return Ck},__experimentalDropdownContentWrapper:function(){return q_},__experimentalElevation:function(){return DC},__experimentalGrid:function(){return EE},__experimentalHStack:function(){return Yv},__experimentalHasSplitBorders:function(){return ME},__experimentalHeading:function(){return U_},__experimentalInputControl:function(){return Pv},__experimentalInputControlPrefixWrapper:function(){return iO},__experimentalInputControlSuffixWrapper:function(){return oy},__experimentalIsDefinedBorder:function(){return IE},__experimentalIsEmptyBorder:function(){return RE},__experimentalItem:function(){return oO},__experimentalItemGroup:function(){return Yk},__experimentalNavigation:function(){return DO},__experimentalNavigationBackButton:function(){return zO},__experimentalNavigationGroup:function(){return VO},__experimentalNavigationItem:function(){return KO},__experimentalNavigationMenu:function(){return eD},__experimentalNavigatorBackButton:function(){return wD},__experimentalNavigatorButton:function(){return bD},__experimentalNavigatorProvider:function(){return fD},__experimentalNavigatorScreen:function(){return gD},__experimentalNavigatorToParentButton:function(){return xD},__experimentalNumberControl:function(){return Qv},__experimentalPaletteEdit:function(){return JS},__experimentalParseQuantityAndUnitFromRawValue:function(){return lE},__experimentalRadio:function(){return KD},__experimentalRadioGroup:function(){return XD},__experimentalScrollable:function(){return vk},__experimentalSpacer:function(){return Xv},__experimentalStyleProvider:function(){return sf},__experimentalSurface:function(){return QA},__experimentalText:function(){return Mh},__experimentalToggleGroupControl:function(){return xP},__experimentalToggleGroupControlOption:function(){return BP},__experimentalToggleGroupControlOptionIcon:function(){return hL},__experimentalToolbarContext:function(){return yL},__experimentalToolsPanel:function(){return KL},__experimentalToolsPanelContext:function(){return HL},__experimentalToolsPanelItem:function(){return XL},__experimentalTreeGrid:function(){return nz},__experimentalTreeGridCell:function(){return az},__experimentalTreeGridItem:function(){return iz},__experimentalTreeGridRow:function(){return rz},__experimentalTruncate:function(){return W_},__experimentalUnitControl:function(){return gE},__experimentalUseCustomUnits:function(){return uE},__experimentalUseNavigator:function(){return vD},__experimentalUseSlot:function(){return Hd},__experimentalUseSlotFills:function(){return cz},__experimentalVStack:function(){return $_},__experimentalView:function(){return td},__experimentalZStack:function(){return hz},__unstableAnimatePresence:function(){return Am},__unstableComposite:function(){return mm},__unstableCompositeGroup:function(){return vm},__unstableCompositeItem:function(){return Se},__unstableDisclosureContent:function(){return Ix},__unstableGetAnimateClassName:function(){return Tm},__unstableMotion:function(){return Gl},__unstableUseAutocompleteProps:function(){return vb},__unstableUseCompositeState:function(){return im},__unstableUseNavigateRegions:function(){return vz},createSlotFill:function(){return bf},navigateRegions:function(){return bz},privateApis:function(){return Rz},useBaseControlProps:function(){return yb},withConstrainedTabbing:function(){return yz},withFallbackStyles:function(){return wz},withFilters:function(){return _z},withFocusOutside:function(){return sT},withFocusReturn:function(){return Ez},withNotices:function(){return kz},withSpokenMessages:function(){return XO}});var e={};n.r(e),n.d(e,{Text:function(){return gh},block:function(){return vh},destructive:function(){return yh},highlighterText:function(){return xh},muted:function(){return wh},positive:function(){return bh},upperCase:function(){return _h}});var t={};n.r(t),n.d(t,{TooltipContent:function(){return Bx},TooltipPopoverView:function(){return Fx},TooltipShortcut:function(){return Hx},noOutline:function(){return Vx}});var o={};n.r(o),n.d(o,{ButtonContentView:function(){return MP},LabelView:function(){return SP},buttonView:function(){return NP},labelBlock:function(){return TP}});var i=window.wp.primitives;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var b=n(9196),y=n.n(b);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t=0||(o[n]=e[n]);return o}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var S=(0,b.createContext)({});var T,N=function(e,t,n){void 0===n&&(n=t.children);var r=(0,b.useContext)(S);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(E(t,["children"]))}return(0,b.createElement)(e,t,n)};function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function D(e,t){if(void 0===t&&(t=[]),!P(e.state))return O(e,t);var n=O(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(r,["state"]);return[M(M({},i),a),o]}function A(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i0||t.offsetHeight>0||e.getClientRects().length>0}(e)}var re=F({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=h(e,["unstable_system"]),o=t.unstable_system,i=h(t,["unstable_system"]);return!(n!==o&&!A(n,o))&&A(r,i)}}),oe=(z({as:"div",useHook:re}),ee("Mac")&&!ee("Chrome")&&(ee("Safari")||ee("Firefox")));function ie(e){!X(e)&&ne(e)&&e.focus()}function ae(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function se(e,t){return(0,b.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var le=F({name:"Tabbable",compose:re,keys:["disabled","focusable"],useOptions:function(e,t){return m({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,s=t.onKeyPressCapture,l=t.style,c=h(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),u=(0,b.useRef)(null),d=G(o),f=G(i),p=G(a),g=G(s),v=!!e.disabled&&!e.focusable,y=(0,b.useState)(!0),w=y[0],x=y[1],_=(0,b.useState)(!0),E=_[0],C=_[1],k=e.disabled?m({pointerEvents:"none"},l):l;U((function(){var e=u.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||x(!1),function(e){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)}(e)||C(!1))}),[]);var S=se(d,e.disabled),T=se(f,e.disabled),N=se(g,e.disabled),R=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e);var n=e.currentTarget;if(!e.defaultPrevented&&oe&&!Z(e)&&Q(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),ie(n)})),o=function(){cancelAnimationFrame(r),ie(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return m({ref:H(u,n),style:k,tabIndex:ae(v,w,E,r),disabled:!(!v||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:S,onMouseDownCapture:T,onMouseDown:R,onKeyPressCapture:N},c)}});z({as:"div",useHook:le});var ce=F({name:"Clickable",compose:le,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return m({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},h(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=h(t,["onKeyDown","onKeyUp"]),i=(0,b.useState)(!1),a=i[0],s=i[1],l=G(n),c=G(r),u=(0,b.useCallback)((function(t){var n;if(null===(n=l.current)||void 0===n||n.call(l,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Y(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Q(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&s(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,b.useCallback)((function(t){var n;if(null===(n=c.current)||void 0===n||n.call(c,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(s(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return m({"data-active":a||void 0,onKeyDown:u,onKeyUp:d},o)}});z({as:"button",memo:!0,useHook:ce});function ue(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function de(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=ue(e.items||[]))||void 0===n?void 0:n.id}var fe=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],pe=fe,me=pe;function he(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function ge(e,t){e.userFocus=t}function ve(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function be(e){var t=q(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function ye(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var we=(0,b.createContext)(ye);var xe=F({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,b.useContext)(we),r=(0,b.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,b.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return m(m({},e),{},{id:i})},useProps:function(e,t){return m({id:e.id},t)}});z({as:"div",useHook:xe});function _e(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=j(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function Ee(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(_e(e,t,n))}(e,"input",{bubbles:!0}))}}function Ce(e){return e.querySelector("[data-composite-item-widget]")}var ke=F({name:"CompositeItem",compose:[ce,xe],keys:me,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return ce.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=h(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,s=h(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return ce.unstable_propsAreEqual(o,s)},useOptions:function(e){return m(m({},e),{},{id:e.id,currentId:de(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,s=t.onFocus,l=t.onBlurCapture,c=t.onKeyDown,u=t.onClick,d=h(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),f=(0,b.useRef)(null),p=e.id,g=e.disabled&&!e.focusable,y=e.currentId===p,w=G(y),x=(0,b.useRef)(!1),_=function(e){return(0,b.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),E=G(a),C=G(s),k=G(l),S=G(c),T=G(u),N=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&y||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,b.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:f,disabled:!!g}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,g,e.registerItem,e.unregisterItem]),(0,b.useEffect)((function(){var t=f.current;t&&e.unstable_moves&&w.current&&he(t)}),[e.unstable_moves]);var R=(0,b.useCallback)((function(e){var t;null===(t=E.current)||void 0===t||t.call(E,e),ge(e.currentTarget,!0)}),[]),I=(0,b.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(ge(t.currentTarget,!1),null===(n=C.current)||void 0===n||n.call(C,t),!t.defaultPrevented&&!Z(t)&&p&&!function(e,t){if(Y(e))return!1;for(var n,r=v(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),o&&e.unstable_virtual&&e.baseId&&Y(t))){var i=j(t.target).getElementById(e.baseId);i&&(x.current=!0,function(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,i=void 0===o?be:o;i(e)||(e.focus({preventScroll:r}),i(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(i))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),M=(0,b.useCallback)((function(t){var n;null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||e.unstable_virtual&&x.current&&(x.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),P=(0,b.useCallback)((function(t){var n;if(Y(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==_||!_.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=S.current)||void 0===n||n.call(S,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var s=Ce(t.currentTarget);s&&ve(s)&&(s.focus(),Ee(s,""))}else if("Delete"===t.key||"Backspace"===t.key){var l=Ce(t.currentTarget);l&&ve(l)&&(t.preventDefault(),Ee(l,""))}}}),[e.orientation,_,e.up,e.next,e.down,e.previous,e.first,e.last]),O=(0,b.useCallback)((function(e){var t;if(null===(t=T.current)||void 0===t||t.call(T,e),!e.defaultPrevented){var n=Ce(e.currentTarget);n&&!X(n)&&n.focus()}}),[]);return m({ref:H(f,r),id:p,tabIndex:N?i:-1,"aria-selected":!(!e.unstable_virtual||!y)||void 0,onMouseDown:R,onFocus:I,onBlurCapture:M,onKeyDown:P,onClick:O},d)}}),Se=z({as:"button",memo:!0,useHook:ke});function Te(e){return e.split("-")[1]}function Ne(e){return"y"===e?"height":"width"}function Re(e){return e.split("-")[0]}function Ie(e){return["top","bottom"].includes(Re(e))?"x":"y"}function Me(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=Ie(t),l=Ne(s),c=r[l]/2-o[l]/2,u="x"===s;let d;switch(Re(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(Te(t)){case"start":d[s]-=c*(n&&u?-1:1);break;case"end":d[s]+=c*(n&&u?-1:1)}return d}const Pe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Me(c,r,l),f=r,p={},m=0;for(let n=0;n({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(null==n)return{};const c=Oe(r),u={x:o,y:i},d=Ie(a),f=Ne(d),p=await l.getDimensions(n),m="y"===d?"top":"left",h="y"===d?"bottom":"right",g=s.reference[f]+s.reference[d]-u[d]-s.floating[f],v=u[d]-s.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let y=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===y&&(y=s.floating[f]);const w=g/2-v/2,x=c[m],_=y-p[f]-c[h],E=y/2-p[f]/2+w,C=Be(x,E,_),k=null!=Te(a)&&E!=C&&s.reference[f]/2-(Ee.concat(t,t+"-start",t+"-end")),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function je(e){return e.replace(/left|right|bottom|top/g,(e=>He[e]))}function $e(e,t,n){void 0===n&&(n=!1);const r=Te(e),o=Ie(e),i=Ne(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=je(a)),{main:a,cross:je(a)}}const We={start:"end",end:"start"};function Ue(e){return e.replace(/start|end/g,(e=>We[e]))}const Ge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...h}=e,g=Re(r),v=Re(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(l.floating)),y=d||(v||!m?[je(a)]:function(e){const t=je(e);return[Ue(e),t,Ue(t)]}(a));d||"none"===p||y.push(...function(e,t,n,r){const o=Te(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Re(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ue)))),i}(a,m,p,b));const w=[a,...y],x=await Ae(t,h),_=[];let E=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&_.push(x[g]),u){const{main:e,cross:t}=$e(r,i,b);_.push(x[e],x[t])}if(E=[...E,{placement:r,overflows:_}],!_.every((e=>e<=0))){var C,k;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(k=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(f){case"bestFit":{var S;const e=null==(S=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const Ye=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Re(n),s=Te(n),l="x"===Ie(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function qe(e){return"x"===e?"y":"x"}const Ke=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,c={x:n,y:r},u=await Ae(t,l),d=Ie(Re(o)),f=qe(d);let p=c[d],m=c[f];if(i){const e="y"===d?"bottom":"right";p=Be(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";m=Be(m+u["y"===f?"top":"left"],m,m-u[e])}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...s}=e,l=await Ae(t,s),c=Re(n),u=Te(n),d="x"===Ie(n),{width:f,height:p}=r.floating;let m,h;"top"===c||"bottom"===c?(m=c,h=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,m="end"===u?"top":"bottom");const g=p-l[m],v=f-l[h];let b=g,y=v;if(d?y=Le(f-l.right-l.left,v):b=Le(p-l.bottom-l.top,g),!t.middlewareData.shift&&!u){const e=ze(l.left,0),t=ze(l.right,0),n=ze(l.top,0),r=ze(l.bottom,0);d?y=f-2*(0!==e||0!==t?e+t:ze(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:ze(l.top,l.bottom))}await a({...t,availableWidth:y,availableHeight:b});const w=await o.getDimensions(i.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ze(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Je(e){return Ze(e).getComputedStyle(e)}const Qe=Math.min,et=Math.max,tt=Math.round;function nt(e){const t=Je(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,a=tt(n)!==o||tt(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function rt(e){return lt(e)?(e.nodeName||"").toLowerCase():""}let ot;function it(){if(ot)return ot;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(ot=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),ot):navigator.userAgent}function at(e){return e instanceof Ze(e).HTMLElement}function st(e){return e instanceof Ze(e).Element}function lt(e){return e instanceof Ze(e).Node}function ct(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ze(e).ShadowRoot||e instanceof ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function dt(e){return["table","td","th"].includes(rt(e))}function ft(e){const t=/firefox/i.test(it()),n=Je(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function pt(){return/^((?!chrome|android).)*safari/i.test(it())}function mt(e){return["html","body","#document"].includes(rt(e))}function ht(e){return st(e)?e:e.contextElement}const gt={x:1,y:1};function vt(e){const t=ht(e);if(!at(t))return gt;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=nt(t);let a=(i?tt(n.width):n.width)/r,s=(i?tt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function bt(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=ht(e);let l=gt;t&&(r?st(r)&&(l=vt(r)):l=vt(e));const c=s?Ze(s):window,u=pt()&&n;let d=(a.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/l.x,f=(a.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/l.y,p=a.width/l.x,m=a.height/l.y;if(s){const e=Ze(s),t=r&&st(r)?Ze(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=vt(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=Ze(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function yt(e){return((lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function wt(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xt(e){return bt(yt(e)).left+wt(e).scrollLeft}function _t(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||ct(e)&&e.host||yt(e);return ct(t)?t.host:t}function Et(e){const t=_t(e);return mt(t)?t.ownerDocument.body:at(t)&&ut(t)?t:Et(t)}function Ct(e,t){var n;void 0===t&&(t=[]);const r=Et(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ze(r);return o?t.concat(i,i.visualViewport||[],ut(r)?r:[]):t.concat(r,Ct(r))}function kt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ze(e),r=yt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=pt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=yt(e),n=wt(e),r=e.ownerDocument.body,o=et(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=et(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+xt(e);const s=-n.scrollTop;return"rtl"===Je(r).direction&&(a+=et(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(yt(e));else if(st(t))r=function(e,t){const n=bt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=at(e)?vt(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n={...t};if(pt()){var o,i;const t=Ze(e);n.x-=(null==(o=t.visualViewport)?void 0:o.offsetLeft)||0,n.y-=(null==(i=t.visualViewport)?void 0:i.offsetTop)||0}r=n}return De(r)}function St(e,t){return at(e)&&"fixed"!==Je(e).position?t?t(e):e.offsetParent:null}function Tt(e,t){const n=Ze(e);let r=St(e,t);for(;r&&dt(r)&&"static"===Je(r).position;)r=St(r,t);return r&&("html"===rt(r)||"body"===rt(r)&&"static"===Je(r).position&&!ft(r))?n:r||function(e){let t=_t(e);for(;at(t)&&!mt(t);){if(ft(t))return t;t=_t(t)}return null}(e)||n}function Nt(e,t,n){const r=at(t),o=yt(t),i=bt(e,!0,"fixed"===n,t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==rt(t)||ut(o))&&(a=wt(t)),at(t)){const e=bt(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=xt(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}const Rt={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Ct(e).filter((e=>st(e)&&"body"!==rt(e))),o=null;const i="fixed"===Je(e).position;let a=i?_t(e):e;for(;st(a)&&!mt(a);){const e=Je(a),t=ft(a);"fixed"===e.position?o=null:(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==a)),a=_t(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=kt(t,n,o);return e.top=et(r.top,e.top),e.right=Qe(r.right,e.right),e.bottom=Qe(r.bottom,e.bottom),e.left=et(r.left,e.left),e}),kt(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=at(n),i=yt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==rt(n)||ut(i))&&(a=wt(n)),at(n))){const e=bt(n);s=vt(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:st,getDimensions:function(e){return at(e)?nt(e):e.getBoundingClientRect()},getOffsetParent:Tt,getDocumentElement:yt,getScale:vt,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Tt,i=this.getDimensions;return{reference:Nt(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Je(e).direction};var It=window.ReactDOM;const Mt=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?Fe({element:t.current,padding:n}).fn(e):{}:t?Fe({element:t,padding:n}).fn(e):{};var r}}};var Pt="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function Ot(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 n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Ot(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ot(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Dt(e){const t=b.useRef(e);return Pt((()=>{t.current=e})),t}function At(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=b.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=b.useState(r);Ot(c,r)||u(r);const d=b.useRef(null),f=b.useRef(null),p=b.useRef(s),m=Dt(i),h=Dt(o),[g,v]=b.useState(null),[y,w]=b.useState(null),x=b.useCallback((e=>{d.current!==e&&(d.current=e,v(e))}),[]),_=b.useCallback((e=>{f.current!==e&&(f.current=e,w(e))}),[]),E=b.useCallback((()=>{if(!d.current||!f.current)return;const e={placement:t,strategy:n,middleware:c};h.current&&(e.platform=h.current),((e,t,n)=>{const r=new Map,o={platform:Rt,...n},i={...o.platform,_c:r};return Pe(e,t,{...o,platform:i})})(d.current,f.current,e).then((e=>{const t={...e,isPositioned:!0};C.current&&!Ot(p.current,t)&&(p.current=t,It.flushSync((()=>{l(t)})))}))}),[c,t,n,h]);Pt((()=>{!1===a&&p.current.isPositioned&&(p.current.isPositioned=!1,l((e=>({...e,isPositioned:!1}))))}),[a]);const C=b.useRef(!1);Pt((()=>(C.current=!0,()=>{C.current=!1})),[]),Pt((()=>{if(g&&y){if(m.current)return m.current(g,y,E);E()}}),[g,y,E,m]);const k=b.useMemo((()=>({reference:d,floating:f,setReference:x,setFloating:_})),[x,_]),S=b.useMemo((()=>({reference:g,floating:y})),[g,y]);return b.useMemo((()=>({...s,update:E,refs:k,elements:S,reference:x,floating:_})),[s,E,k,S,x,_])}const Lt="undefined"!=typeof document,zt={current:null},Bt={current:!1};function Ft(){if(Bt.current=!0,Lt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zt.current=e.matches;e.addListener(t),t()}else zt.current=!1}const Vt=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ht=(0,b.createContext)({});const jt=(0,b.createContext)(null),$t=Lt?b.useLayoutEffect:b.useEffect,Wt=(0,b.createContext)({strict:!1});function Ut(e,t,n,r){const o=(0,b.useContext)(Ht).visualElement,i=(0,b.useContext)(Wt),a=(0,b.useContext)(jt),s=(0,b.useContext)(Vt).reducedMotion,l=(0,b.useRef)();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));const c=l.current;return $t((()=>{c&&c.render()})),$t((()=>{c&&c.animationState&&c.animationState.animateChanges()})),$t((()=>()=>c&&c.notify("Unmount")),[]),c}function Gt(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Yt(e){return"string"==typeof e||Array.isArray(e)}function qt(e){return"object"==typeof e&&"function"==typeof e.start}const Kt=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Xt(e){return qt(e.animate)||Kt.some((t=>Yt(e[t])))}function Zt(e){return Boolean(Xt(e)||e.variants)}function Jt(e){const{initial:t,animate:n}=function(e,t){if(Xt(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Yt(t)?t:void 0,animate:Yt(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,b.useContext)(Ht));return(0,b.useMemo)((()=>({initial:t,animate:n})),[Qt(t),Qt(n)])}function Qt(e){return Array.isArray(e)?e.join(" "):e}const en=e=>({isEnabled:t=>e.some((e=>!!t[e]))}),tn={measureLayout:en(["layout","layoutId","drag"]),animation:en(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:en(["exit"]),drag:en(["drag","dragControls"]),focus:en(["whileFocus"]),hover:en(["whileHover","onHoverStart","onHoverEnd"]),tap:en(["whileTap","onTap","onTapStart","onTapCancel"]),pan:en(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:en(["whileInView","onViewportEnter","onViewportLeave"])};function nn(e){const t=(0,b.useRef)(null);return null===t.current&&(t.current=e()),t.current}const rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let on=1;const an=(0,b.createContext)({});class sn extends b.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}const ln=(0,b.createContext)({}),cn=Symbol.for("motionComponentSymbol");function un({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:o,Component:i}){e&&function(e){for(const t in e)"projectionNodeConstructor"===t?tn.projectionNodeConstructor=e[t]:tn[t].Component=e[t]}(e);const a=(0,b.forwardRef)((function(a,s){const l={...(0,b.useContext)(Vt),...a,layoutId:dn(a)},{isStatic:c}=l;let u=null;const d=Jt(a),f=c?void 0:nn((()=>{if(rn.hasEverUpdated)return on++})),p=o(a,c);if(!c&&Lt){d.visualElement=Ut(i,p,l,t);const r=(0,b.useContext)(Wt).strict,o=(0,b.useContext)(ln);d.visualElement&&(u=d.visualElement.loadFeatures(l,r,e,f,n||tn.projectionNodeConstructor,o))}return b.createElement(sn,{visualElement:d.visualElement,props:l},u,b.createElement(Ht.Provider,{value:d},r(i,a,f,function(e,t,n){return(0,b.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Gt(n)&&(n.current=r))}),[t])}(p,d.visualElement,s),p,c,d.visualElement)))}));return a[cn]=i,a}function dn({layoutId:e}){const t=(0,b.useContext)(an).id;return t&&void 0!==e?t+"-"+e:e}function fn(e){function t(t,n={}){return un(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const pn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mn(e){return"string"==typeof e&&!e.includes("-")&&!!(pn.indexOf(e)>-1||/[A-Z]/.test(e))}const hn={};const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vn=new Set(gn);function bn(e,{layout:t,layoutId:n}){return vn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!hn[e]||"opacity"===e)}const yn=e=>!!(null==e?void 0:e.getVelocity),wn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xn=(e,t)=>gn.indexOf(e)-gn.indexOf(t);function _n(e){return e.startsWith("--")}const En=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Cn=(e,t,n)=>Math.min(Math.max(n,e),t),kn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Sn={...kn,transform:e=>Cn(0,1,e)},Tn={...kn,default:1},Nn=e=>Math.round(1e5*e)/1e5,Rn=/(-)?([\d]*\.?[\d])+/g,In=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mn=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Pn(e){return"string"==typeof e}const On=e=>({test:t=>Pn(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Dn=On("deg"),An=On("%"),Ln=On("px"),zn=On("vh"),Bn=On("vw"),Fn={...An,parse:e=>An.parse(e)/100,transform:e=>An.transform(100*e)},Vn={...kn,transform:Math.round},Hn={borderWidth:Ln,borderTopWidth:Ln,borderRightWidth:Ln,borderBottomWidth:Ln,borderLeftWidth:Ln,borderRadius:Ln,radius:Ln,borderTopLeftRadius:Ln,borderTopRightRadius:Ln,borderBottomRightRadius:Ln,borderBottomLeftRadius:Ln,width:Ln,maxWidth:Ln,height:Ln,maxHeight:Ln,size:Ln,top:Ln,right:Ln,bottom:Ln,left:Ln,padding:Ln,paddingTop:Ln,paddingRight:Ln,paddingBottom:Ln,paddingLeft:Ln,margin:Ln,marginTop:Ln,marginRight:Ln,marginBottom:Ln,marginLeft:Ln,rotate:Dn,rotateX:Dn,rotateY:Dn,rotateZ:Dn,scale:Tn,scaleX:Tn,scaleY:Tn,scaleZ:Tn,skew:Dn,skewX:Dn,skewY:Dn,distance:Ln,translateX:Ln,translateY:Ln,translateZ:Ln,x:Ln,y:Ln,z:Ln,perspective:Ln,transformPerspective:Ln,opacity:Sn,originX:Fn,originY:Fn,originZ:Ln,zIndex:Vn,fillOpacity:Sn,strokeOpacity:Sn,numOctaves:Vn};function jn(e,t,n,r){const{style:o,vars:i,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let c=!1,u=!1,d=!0;for(const e in t){const n=t[e];if(_n(e)){i[e]=n;continue}const r=Hn[e],f=En(n,r);if(vn.has(e)){if(c=!0,a[e]=f,s.push(e),!d)continue;n!==(r.default||0)&&(d=!1)}else e.startsWith("origin")?(u=!0,l[e]=f):o[e]=f}if(t.transform||(c||r?o.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},o,i){let a="";t.sort(xn);for(const n of t)a+=`${wn[n]||n}(${e[n]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,o?"":a):r&&o&&(a="none"),a}(e,n,d,r):o.transform&&(o.transform="none")),u){const{originX:e="50%",originY:t="50%",originZ:n=0}=l;o.transformOrigin=`${e} ${t} ${n}`}}const $n=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Wn(e,t,n){for(const r in t)yn(t[r])||bn(r,n)||(e[r]=t[r])}function Un(e,t,n){const r={};return Wn(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,b.useMemo)((()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return jn(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function Gn(e,t,n){const r={},o=Un(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}const Yn=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function qn(e){return Yn.has(e)}let Kn=e=>!qn(e);try{(Xn=require("@emotion/is-prop-valid").default)&&(Kn=e=>e.startsWith("on")?!qn(e):Xn(e))}catch(e){}var Xn;function Zn(e,t,n){return"string"==typeof e?e:Ln.transform(t+n*e)}const Jn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qn={offset:"strokeDashoffset",array:"strokeDasharray"};function er(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},c,u,d){if(jn(e,l,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Zn(t,e.x,e.width)} ${Zn(n,e.y,e.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Jn:Qn;e[i.offset]=Ln.transform(-r);const a=Ln.transform(t),s=Ln.transform(n);e[i.array]=`${a} ${s}`}(f,i,a,s,!1)}const tr=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}),nr=e=>"string"==typeof e&&"svg"===e.toLowerCase();function rr(e,t,n,r){const o=(0,b.useMemo)((()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return er(n,t,{enableHardwareAcceleration:!1},nr(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Wn(t,e.style,e),o.style={...t,...o.style}}return o}function or(e=!1){return(t,n,r,o,{latestValues:i},a)=>{const s=(mn(t)?rr:Gn)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)(Kn(o)||!0===n&&qn(o)||!t&&!qn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c={...l,...s,ref:o};return r&&(c["data-projection-id"]=r),(0,b.createElement)(t,c)}}const ir=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ar(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const sr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lr(e,t,n,r){ar(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(sr.has(n)?n:ir(n),t.attrs[n])}function cr(e){const{style:t}=e,n={};for(const r in t)(yn(t[r])||bn(r,e))&&(n[r]=t[r]);return n}function ur(e){const t=cr(e);for(const n in e)if(yn(e[n])){t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function dr(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const fr=e=>Array.isArray(e),pr=e=>fr(e)?e[e.length-1]||0:e;function mr(e){const t=yn(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const hr=e=>(t,n)=>{const r=(0,b.useContext)(Ht),o=(0,b.useContext)(jt),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:gr(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():nn(i)};function gr(e,t,n,r){const o={},i=r(e);for(const e in i)o[e]=mr(i[e]);let{initial:a,animate:s}=e;const l=Xt(e),c=Zt(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!qt(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=dr(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const vr={useVisualState:hr({scrapeMotionValuesFromProps:ur,createRenderState:tr,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}er(n,r,{enableHardwareAcceleration:!1},nr(t.tagName),e.transformTemplate),lr(t,n)}})},br={useVisualState:hr({scrapeMotionValuesFromProps:cr,createRenderState:$n})};var yr;function wr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function xr(e,t,n,r){(0,b.useEffect)((()=>{const o=e.current;if(n&&o)return wr(o,t,n,r)}),[e,t,n,r])}function _r(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Er(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"}(yr||(yr={}));const Cr={pageX:0,pageY:0};function kr(e,t="page"){const n=e.touches[0]||e.changedTouches[0]||Cr;return{x:n[t+"X"],y:n[t+"Y"]}}function Sr(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function Tr(e,t="page"){return{point:Er(e)?kr(e,t):Sr(e,t)}}const Nr=(e,t=!1)=>{const n=t=>e(t,Tr(t));return t?(r=n,e=>{const t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}):n;var r},Rr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ir={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Mr(e){return Lt&&null===window.onpointerdown?e:Lt&&null===window.ontouchstart?Ir[e]:Lt&&null===window.onmousedown?Rr[e]:e}function Pr(e,t,n,r){return wr(e,Mr(t),Nr(n,"pointerdown"===t),r)}function Or(e,t,n,r){return xr(e,Mr(t),n&&Nr(n,"pointerdown"===t),r)}function Dr(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Ar=Dr("dragHorizontal"),Lr=Dr("dragVertical");function zr(e){let t=!1;if("y"===e)t=Lr();else if("x"===e)t=Ar();else{const e=Ar(),n=Lr();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Br(){const e=zr(!0);return!e||(e(),!1)}function Fr(e,t,n){return(r,o)=>{_r(r)&&!Br()&&(e.animationState&&e.animationState.setActive(yr.Hover,t),n&&n(r,o))}}const Vr=(e,t)=>!!t&&(e===t||Vr(e,t.parentElement));function Hr(e){return(0,b.useEffect)((()=>()=>e()),[])}const jr=(e,t)=>n=>t(e(n)),$r=(...e)=>e.reduce(jr);const Wr=("undefined"==typeof process||process.env,"production"),Ur=new Set;function Gr(e,t,n){e||Ur.has(t)||(console.warn(t),n&&console.warn(n),Ur.add(t))}const Yr=new WeakMap,qr=new WeakMap,Kr=e=>{const t=Yr.get(e.target);t&&t(e)},Xr=e=>{e.forEach(Kr)};function Zr(e,t,n){const r=function({root:e,...t}){const n=e||document;qr.has(n)||qr.set(n,{});const r=qr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Xr,{root:e,...t})),r[o]}(t);return Yr.set(e,n),r.observe(e),()=>{Yr.delete(e),r.unobserve(e)}}const Jr={some:0,all:1};function Qr(e,t,n,{root:r,margin:o,amount:i="some",once:a}){(0,b.useEffect)((()=>{if(!e||!n.current)return;const s={root:null==r?void 0:r.current,rootMargin:o,threshold:"number"==typeof i?i:Jr[i]};return Zr(n.current,s,(e=>{const{isIntersecting:r}=e;if(t.isInView===r)return;if(t.isInView=r,a&&!r&&t.hasEnteredView)return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(yr.InView,r);const o=n.getProps(),i=r?o.onViewportEnter:o.onViewportLeave;i&&i(e)}))}),[e,r,o,i])}function eo(e,t,n,{fallback:r=!0}){(0,b.useEffect)((()=>{e&&r&&("production"!==Wr&&Gr(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame((()=>{t.hasEnteredView=!0;const{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(yr.InView,!0)})))}),[e])}const to=e=>t=>(e(t),null),no={inView:to((function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:o={}}){const i=(0,b.useRef)({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);o.once&&i.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?eo:Qr)(a,i.current,e,o)})),tap:to((function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:o}){const i=e||t||n||r,a=(0,b.useRef)(!1),s=(0,b.useRef)(null),l={passive:!(t||e||n||p)};function c(){s.current&&s.current(),s.current=null}function u(){return c(),a.current=!1,o.animationState&&o.animationState.setActive(yr.Tap,!1),!Br()}function d(t,r){u()&&(Vr(o.current,t.target)?e&&e(t,r):n&&n(t,r))}function f(e,t){u()&&n&&n(e,t)}function p(e,n){c(),a.current||(a.current=!0,s.current=$r(Pr(window,"pointerup",d,l),Pr(window,"pointercancel",f,l)),o.animationState&&o.animationState.setActive(yr.Tap,!0),t&&t(e,n))}Or(o,"pointerdown",i?p:void 0,l),Hr(c)})),focus:to((function({whileFocus:e,visualElement:t}){const{animationState:n}=t;xr(t,"focus",e?()=>{n&&n.setActive(yr.Focus,!0)}:void 0),xr(t,"blur",e?()=>{n&&n.setActive(yr.Focus,!1)}:void 0)})),hover:to((function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){Or(r,"pointerenter",e||n?Fr(r,!0,e):void 0,{passive:!e}),Or(r,"pointerleave",t||n?Fr(r,!1,t):void 0,{passive:!t})}))};function ro(){const e=(0,b.useContext)(jt);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,b.useId)();(0,b.useEffect)((()=>r(o)),[]);return!t&&n?[!1,()=>n&&n(o)]:[!0]}function oo(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r/^\-?\d*\.?\d+$/.test(e),ao=e=>/^0[^.\s]+$/.test(e),so={delta:0,timestamp:0},lo=1/60*1e3,co="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),uo="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(co())),lo);let fo=!0,po=!1,mo=!1;const ho=["read","update","preRender","render","postRender"],go=ho.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;npo=!0)),e)),{}),vo=ho.reduce(((e,t)=>{const n=go[t];return e[t]=(e,t=!1,r=!1)=>(po||_o(),n.schedule(e,t,r)),e}),{}),bo=ho.reduce(((e,t)=>(e[t]=go[t].cancel,e)),{}),yo=ho.reduce(((e,t)=>(e[t]=()=>go[t].process(so),e)),{}),wo=e=>go[e].process(so),xo=e=>{po=!1,so.delta=fo?lo:Math.max(Math.min(e-so.timestamp,40),1),so.timestamp=e,mo=!0,ho.forEach(wo),mo=!1,po&&(fo=!1,uo(xo))},_o=()=>{po=!0,fo=!0,mo||uo(xo)};function Eo(e,t){-1===e.indexOf(t)&&e.push(t)}function Co(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ko{constructor(){this.subscriptions=[]}add(e){return Eo(this.subscriptions,e),()=>Co(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=so;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,vo.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>vo.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){return this.events[e]||(this.events[e]=new ko),this.events[e].add(t)}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e){this.passiveEffect=e}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?So(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.stopAnimation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}function No(e,t){return new To(e,t)}const Ro=(e,t)=>n=>Boolean(Pn(n)&&Mn.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Io=(e,t,n)=>r=>{if(!Pn(r))return r;const[o,i,a,s]=r.match(Rn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Mo={...kn,transform:e=>Math.round((e=>Cn(0,255,e))(e))},Po={test:Ro("rgb","red"),parse:Io("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mo.transform(e)+", "+Mo.transform(t)+", "+Mo.transform(n)+", "+Nn(Sn.transform(r))+")"};const Oo={test:Ro("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Po.transform},Do={test:Ro("hsl","hue"),parse:Io("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+An.transform(Nn(t))+", "+An.transform(Nn(n))+", "+Nn(Sn.transform(r))+")"},Ao={test:e=>Po.test(e)||Oo.test(e)||Do.test(e),parse:e=>Po.test(e)?Po.parse(e):Do.test(e)?Do.parse(e):Oo.parse(e),transform:e=>Pn(e)?e:e.hasOwnProperty("red")?Po.transform(e):Do.transform(e)},Lo="${c}",zo="${n}";function Bo(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const o=e.match(In);o&&(n=o.length,e=e.replace(In,Lo),t.push(...o.map(Ao.parse)));const i=e.match(Rn);return i&&(r=i.length,e=e.replace(Rn,zo),t.push(...i.map(kn.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function Fo(e){return Bo(e).values}function Vo(e){const{values:t,numColors:n,tokenised:r}=Bo(e),o=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e;const jo={test:function(e){var t,n;return isNaN(e)&&Pn(e)&&((null===(t=e.match(Rn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(In))||void 0===n?void 0:n.length)||0)>0},parse:Fo,createTransformer:Vo,getAnimatableNone:function(e){const t=Fo(e);return Vo(e)(t.map(Ho))}},$o=new Set(["brightness","contrast","saturate","opacity"]);function Wo(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Rn)||[];if(!r)return e;const o=n.replace(r,"");let i=$o.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Uo=/([a-z-]*)\(.*?\)/g,Go={...jo,getAnimatableNone:e=>{const t=e.match(Uo);return t?t.map(Wo).join(" "):e}},Yo={...Hn,color:Ao,backgroundColor:Ao,outlineColor:Ao,fill:Ao,stroke:Ao,borderColor:Ao,borderTopColor:Ao,borderRightColor:Ao,borderBottomColor:Ao,borderLeftColor:Ao,filter:Go,WebkitFilter:Go},qo=e=>Yo[e];function Ko(e,t){var n;let r=qo(e);return r!==Go&&(r=jo),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}const Xo=e=>t=>t.test(e),Zo=[kn,Ln,An,Dn,Bn,zn,{test:e=>"auto"===e,parse:e=>e}],Jo=e=>Zo.find(Xo(e)),Qo=[...Zo,Ao,jo],ei=e=>Qo.find(Xo(e));function ti(e,t,n){const r=e.getProps();return dr(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}function ni(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function ri(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const t in i){ni(e,t,pr(i[t]))}}function oi(e,t){if(!t)return;return(t[e]||t.default||t).from}function ii(e){return Boolean(yn(e)&&e.add)}function ai(e,t){const{MotionAppearAnimations:n}=window,r=((e,t)=>`${e}: ${t}`)(e,vn.has(t)?"transform":t),o=n&&n.get(r);return o?(vo.render((()=>{try{o.cancel(),n.delete(r)}catch(e){}})),o.currentTime||0):0}const si="data-"+ir("framerAppearId");const li=e=>1e3*e,ci=!1,ui=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,di=e=>t=>1-e(1-t),fi=e=>e*e,pi=di(fi),mi=ui(fi),hi=(e,t,n)=>-n*e+n*t+e;function gi(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}const vi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},bi=[Oo,Po,Do];function yi(e){const t=(e=>bi.find((t=>t.test(e))))(e);Boolean(t);let n=t.parse(e);return t===Do&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=gi(s,r,e+1/3),i=gi(s,r,e),a=gi(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const wi=(e,t)=>{const n=yi(e),r=yi(t),o={...n};return e=>(o.red=vi(n.red,r.red,e),o.green=vi(n.green,r.green,e),o.blue=vi(n.blue,r.blue,e),o.alpha=hi(n.alpha,r.alpha,e),Po.transform(o))};function xi(e,t){return"number"==typeof e?n=>hi(e,t,n):Ao.test(e)?wi(e,t):Ci(e,t)}const _i=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>xi(e,t[n])));return e=>{for(let t=0;t{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=xi(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Ci=(e,t)=>{const n=jo.createTransformer(t),r=Bo(e),o=Bo(t);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?$r(_i(r.values,o.values),n):n=>`${n>0?t:e}`},ki=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Si=(e,t)=>n=>hi(e,t,n);function Ti(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?Si:"string"==typeof e?Ao.test(e)?wi:Ci:Array.isArray(e)?_i:"object"==typeof e?Ei:Si}(e[0]),i=e.length-1;for(let n=0;ne[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ti(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;nl(Cn(e[0],e[i-1],t)):l}const Ri=e=>e,Ii=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Mi(e,t,n,r){if(e===t&&n===r)return Ri;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ii(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Ii(o(e),t,r)}const Pi=e=>1-Math.sin(Math.acos(e)),Oi=di(Pi),Di=ui(Oi),Ai=Mi(.33,1.53,.69,.99),Li=di(Ai),zi=ui(Li),Bi={linear:Ri,easeIn:fi,easeInOut:mi,easeOut:pi,circIn:Pi,circInOut:Di,circOut:Oi,backIn:Li,backInOut:zi,backOut:Ai,anticipate:e=>(e*=2)<1?.5*Li(e):.5*(2-Math.pow(2,-10*(e-1)))},Fi=e=>{if(Array.isArray(e)){e.length;const[t,n,r,o]=e;return Mi(t,n,r,o)}return"string"==typeof e?Bi[e]:e};function Vi({keyframes:e,ease:t=mi,times:n,duration:r=300}){e=[...e];const o=Vi[0],i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(t)?t.map(Fi):Fi(t),a={done:!1,value:o},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===Vi.length?n:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(e),r);function l(){return Ni(s,e,{ease:Array.isArray(i)?i:(t=e,n=i,t.map((()=>n||mi)).splice(0,t.length-1))});var t,n}let c=l();return{next:e=>(a.value=c(e),a.done=e>=r,a),flipTarget:()=>{e.reverse(),c=l()}}}const Hi=.001;function ji({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=Cn(.05,1,a),e=Cn(.01,10,e/1e3),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=$i(t,a),l=Math.exp(-o);return Hi-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=$i(Math.pow(t,2),a);return(-o(t)+Hi>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}function $i(e,t){return e*Math.sqrt(1-t*t)}const Wi=["duration","bounce"],Ui=["stiffness","damping","mass"];function Gi(e,t){return t.some((t=>void 0!==e[t]))}function Yi({keyframes:e,restSpeed:t=2,restDelta:n=.01,...r}){let o=e[0],i=e[e.length-1];const a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Gi(e,Ui)&&Gi(e,Wi)){const n=ji(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r);let p=qi,m=u?-u/1e3:0;const h=l/(2*Math.sqrt(s*c));function g(){const e=i-o,t=Math.sqrt(s/c)/1e3;if(void 0===n&&(n=Math.min(Math.abs(i-o)/100,.4)),h<1){const n=$i(t,h);p=r=>{const o=Math.exp(-h*t*r);return i-o*((m+h*t*e)/n*Math.sin(n*r)+e*Math.cos(n*r))}}else if(1===h)p=n=>i-Math.exp(-t*n)*(e+(m+t*e)*n);else{const n=t*Math.sqrt(h*h-1);p=r=>{const o=Math.exp(-h*t*r),a=Math.min(n*r,300);return i-o*((m+h*t*e)*Math.sinh(a)+n*e*Math.cosh(a))/n}}}return g(),{next:e=>{const r=p(e);if(f)a.done=e>=d;else{let o=m;if(0!==e)if(h<1){const t=Math.max(0,e-5);o=So(r-p(t),e-t)}else o=0;const s=Math.abs(o)<=t,l=Math.abs(i-r)<=n;a.done=s&&l}return a.value=a.done?i:r,a},flipTarget:()=>{m=-m,[o,i]=[i,o],g()}}}Yi.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const qi=e=>0;const Ki={decay:function({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a=e[0],s={done:!1,value:a};let l=n*t;const c=a+l,u=void 0===i?c:i(c);return u!==c&&(l=u-a),{next:e=>{const t=-l*Math.exp(-e/r);return s.done=!(t>o||t<-o),s.value=s.done?u:u+t,s},flipTarget:()=>{}}},keyframes:Vi,tween:Vi,spring:Yi};function Xi(e,t,n=0){return e-t-n}const Zi=e=>{const t=({delta:t})=>e(t);return{start:()=>vo.update(t,!0),stop:()=>bo.update(t)}};function Ji({duration:e,driver:t=Zi,elapsed:n=0,repeat:r=0,repeatType:o="loop",repeatDelay:i=0,keyframes:a,autoplay:s=!0,onPlay:l,onStop:c,onComplete:u,onRepeat:d,onUpdate:f,type:p="keyframes",...m}){var h,g;let v,b,y,w=0,x=e,_=!1,E=!0;const C=Ki[a.length>2?"keyframes":p],k=a[0],S=a[a.length-1];(null===(g=(h=C).needsInterpolation)||void 0===g?void 0:g.call(h,k,S))&&(y=Ni([0,100],[k,S],{clamp:!1}),a=[0,100]);const T=C({...m,duration:e,keyframes:a});function N(){w++,"reverse"===o?(E=w%2==0,n=function(e,t=0,n=0,r=!0){return r?Xi(t+-e,t,n):t-(e-t)+n}(n,x,i,E)):(n=Xi(n,x,i),"mirror"===o&&T.flipTarget()),_=!1,d&&d()}function R(e){if(E||(e=-e),n+=e,!_){const e=T.next(Math.max(0,n));b=e.value,y&&(b=y(b)),_=E?e.done:n<=0}f&&f(b),_&&(0===w&&(x=void 0!==x?x:n),w=t+n:e<=-n}(n,x,i,E)&&N():(v.stop(),u&&u()))}return s&&(l&&l(),v=t(R),v.start()),{stop:()=>{c&&c(),v.stop()},sample:e=>T.next(Math.max(0,e))}}const Qi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ea={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qi([0,.65,.55,1]),circOut:Qi([.55,0,1,.45]),backIn:Qi([.31,.01,.66,-.59]),backOut:Qi([.33,1.53,.69,.99])};function ta(e){if(e)return Array.isArray(e)?Qi(e):ea[e]}function na(e,t,{onUpdate:n,onComplete:r,...o}){let{keyframes:i,duration:a=.3,elapsed:s=0,ease:l}=o;if("spring"===o.type||!(!(c=o.ease)||Array.isArray(c)||"string"==typeof c&&ea[c])){const e=Ji(o);let t={done:!1,value:i[0]};const n=[];let r=0;for(;!t.done;)t=e.sample(r),n.push(t.value),r+=10;i=n,a=r-10,l="linear"}var c;const u=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){return e.animate({[t]:n,offset:l},{delay:r,duration:o,easing:ta(s),fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,i,{...o,delay:-s,duration:a,ease:l});return u.onfinish=()=>{e.set(i[i.length-1]),r&&r()},()=>{const{currentTime:t}=u;if(t){const n=Ji(o);e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}vo.update((()=>u.cancel()))}}function ra(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(bo.read(r),e(i-t))};return vo.read(r,!0),()=>bo.read(r)}function oa({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),()=>{});return t?ra(o,-t):o()}const ia=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),aa=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),sa=()=>({type:"keyframes",ease:"linear",duration:.3}),la={type:"keyframes",duration:.8},ca={x:ia,y:ia,z:ia,rotate:ia,rotateX:ia,rotateY:ia,rotateZ:ia,scaleX:aa,scaleY:aa,scale:aa,opacity:sa,backgroundColor:sa,color:sa,default:aa},ua=(e,{keyframes:t})=>{if(t.length>2)return la;return(ca[e]||ca.default)(t[1])},da=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!jo.test(t)||t.startsWith("url(")));function fa(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function pa(e){return"number"==typeof e?0:Ko("",e)}function ma(e,t){return e[t]||e.default||e}const ha={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ga={},va={};for(const e in ha)va[e]=()=>(void 0===ga[e]&&(ga[e]=ha[e]()),ga[e]);const ba=new Set(["opacity"]),ya=(e,t,n,r={})=>o=>{const i=ma(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=li(a);const l=function(e,t,n,r){const o=da(t,n);let i=void 0!==r.from?r.from:e.get();return"none"===i&&o&&"string"==typeof n?i=Ko(t,n):fa(i)&&"string"==typeof n?i=pa(n):!Array.isArray(n)&&fa(n)&&"string"==typeof i&&(n=pa(i)),Array.isArray(n)?(null===n[0]&&(n[0]=i),n):[i,n]}(t,e,n,i),c=l[0],u=l[l.length-1],d=da(e,c),f=da(e,u);let p={keyframes:l,velocity:t.getVelocity(),...i,elapsed:s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(!d||!f||ci||!1===i.type)return oa(p);if("inertia"===i.type){const e=function({keyframes:e,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:d,onComplete:f,onStop:p}){const m=e[0];let h;function g(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r||Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p})}function y(e){b({type:"spring",stiffness:a,damping:s,restDelta:l,...e})}if(g(m))y({velocity:t,keyframes:[m,v(m)]});else{let e=o*t+m;void 0!==c&&(e=c(e));const r=v(e),a=r===n?-1:1;let s,u;const d=e=>{s=u,u=e,t=So(e-s,so.delta),(1===a&&e>r||-1===a&&enull==h?void 0:h.stop()}}(p);return()=>e.stop()}(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,...c}){return!!Object.keys(c).length})(i)||(p={...p,...ua(e,p)}),p.duration&&(p.duration=li(p.duration)),p.repeatDelay&&(p.repeatDelay=li(p.repeatDelay));const m=t.owner,h=m&&m.current;if(va.waapi()&&ba.has(e)&&!p.repeatDelay&&"mirror"!==p.repeatType&&0!==p.damping&&m&&h instanceof HTMLElement&&!m.getProps().onUpdate)return na(t,e,p);{const e=Ji(p);return()=>e.stop()}};function wa(e,t,n={}){var r;const o=ti(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>xa(e,o,n):()=>Promise.resolve(),s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(_a).forEach(((e,r)=>{a.push(wa(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(t)}return Promise.all([a(),s(n.delay)])}function xa(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const u=[],d=o&&(null===(i=e.animationState)||void 0===i?void 0:i.getState()[o]);for(const t in l){const r=e.getValue(t),o=l[t];if(!r||void 0===o||d&&Ea(d,t))continue;let i={delay:n,elapsed:0,...a};if(e.shouldReduceMotion&&vn.has(t)&&(i={...i,type:!1,delay:0}),!r.hasAnimated){const n=e.getProps()[si];n&&(i.elapsed=ai(n,t))}let s=r.start(ya(t,r,o,i));ii(c)&&(c.add(t),s=s.then((()=>c.remove(t)))),u.push(s)}return Promise.all(u).then((()=>{s&&ri(e,s)}))}function _a(e,t){return e.sortNodePosition(t)}function Ea({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}const Ca=[yr.Animate,yr.InView,yr.Focus,yr.Hover,yr.Tap,yr.Drag,yr.Exit],ka=[...Ca].reverse(),Sa=Ca.length;function Ta(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>wa(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=wa(e,t,n);else{const o="function"==typeof t?ti(e,t,n.custom):t;r=xa(e,o,n)}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function Na(e){let t=Ta(e);const n={[yr.Animate]:Ia(!0),[yr.InView]:Ia(),[yr.Hover]:Ia(),[yr.Tap]:Ia(),[yr.Drag]:Ia(),[yr.Focus]:Ia(),[yr.Exit]:Ia()};let r=!0;const o=(t,n)=>{const r=ti(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;tf&&g;const x=Array.isArray(h)?h:[h];let _=x.reduce(o,{});!1===v&&(_={});const{prevResolvedValues:E={}}=m,C={...E,..._},k=e=>{w=!0,u.delete(e),m.needsAnimating[e]=!0};for(const e in C){const t=_[e],n=E[e];d.hasOwnProperty(e)||(t!==n?fr(t)&&fr(n)?!oo(t,n)||y?k(e):m.protectedKeys[e]=!0:void 0!==t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):m.protectedKeys[e]=!0)}m.prevProp=h,m.prevResolvedValues=_,m.isActive&&(d={...d,..._}),r&&e.blockInitialAnimation&&(w=!1),w&&!b&&c.push(...x.map((e=>({animation:e,options:{type:p,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let p=Boolean(c.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Ra(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!oo(t,e)}function Ia(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const Ma={animation:to((({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Na(e)),qt(t)&&(0,b.useEffect)((()=>t.subscribe(e)),[t])})),exit:to((e=>{const{custom:t,visualElement:n}=e,[r,o]=ro(),i=(0,b.useContext)(jt);(0,b.useEffect)((()=>{n.isPresent=r;const e=n.animationState&&n.animationState.setActive(yr.Exit,!r,{custom:i&&i.custom||t});e&&!r&&e.then(o)}),[r])}))},Pa=(e,t)=>Math.abs(e-t);class Oa{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=La(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Pa(e.x,t.x),r=Pa(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=so;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Da(t,this.transformPagePoint),_r(e)&&0===e.buttons?this.handlePointerUp(e,t):vo.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r}=this.handlers,o=La(Da(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},Er(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;const r=Da(Tr(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=so;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,La(r,this.history)),this.removeListeners=$r(Pr(window,"pointermove",this.handlePointerMove),Pr(window,"pointerup",this.handlePointerUp),Pr(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bo.update(this.updatePoint)}}function Da(e,t){return t?{point:t(e.point)}:e}function Aa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function La({point:e},t){return{point:e,delta:Aa(e,Ba(t)),offset:Aa(e,za(t)),velocity:Fa(t,.1)}}function za(e){return e[0]}function Ba(e){return e[e.length-1]}function Fa(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ba(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>li(t)));)n--;if(!r)return{x:0,y:0};const i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Va(e){return e.max-e.min}function Ha(e,t=0,n=.01){return Math.abs(e-t)<=n}function ja(e,t,n,r=.5){e.origin=r,e.originPoint=hi(t.min,t.max,e.origin),e.scale=Va(n)/Va(t),(Ha(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=hi(n.min,n.max,e.origin)-e.originPoint,(Ha(e.translate)||isNaN(e.translate))&&(e.translate=0)}function $a(e,t,n,r){ja(e.x,t.x,n.x,null==r?void 0:r.originX),ja(e.y,t.y,n.y,null==r?void 0:r.originY)}function Wa(e,t,n){e.min=n.min+t.min,e.max=e.min+Va(t)}function Ua(e,t,n){e.min=t.min-n.min,e.max=e.min+Va(t)}function Ga(e,t,n){Ua(e.x,t.x,n.x),Ua(e.y,t.y,n.y)}function Ya(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function qa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min1.0000000000001||e<.999999999999?e:1}function us(e,t){e.min=e.min+t,e.max=e.max+t}function ds(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=hi(e.min,e.max,i);ss(e,t[n],t[r],a,t.scale)}const fs=["x","scaleX","originX"],ps=["y","scaleY","originY"];function ms(e,t){ds(e.x,t,fs),ds(e.y,t,ps)}function hs(e,t){return Qa(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gs=new WeakMap;class vs{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new Oa(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(Tr(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();(!r||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zr(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ja((e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(An.test(r)){const o=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.layoutBox[e];if(o){r=Va(o)*(parseFloat(r)/100)}}this.originPoint[e]=r})),null==i||i(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(yr.Drag,!0))},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),null==i||i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();null==o||o(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(yr.Drag,!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!bs(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?hi(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&Gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ya(e.x,n,o),y:Ya(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ka){return!1===e?e=0:!0===e&&(e=Ka),{x:Xa(e,"left","right"),y:Xa(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ja((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gt(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=hs(e,n),{scroll:o}=t;return o&&(us(r.x,o.offset.x),us(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:qa(e.x,t.x),y:qa(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Qa(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Ja((a=>{if(!bs(a,t,this.currentDirection))return;let l=(null==s?void 0:s[a])||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(ya(e,n,0,t))}stopAnimation(){Ja((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){var t;const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps()[n];return r||this.visualElement.getValue(e,(null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])||0)}snapToCursor(e){Ja((t=>{const{drag:n}=this.getProps();if(!bs(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-hi(n,i,.5))}}))}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Gt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ja((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();o[e]=function(e,t){let n=.5;const r=Va(e),o=Va(t);return o>r?n=ki(t.min,t.max-r,e.min):r>o&&(n=ki(e.min,e.max-o,t.min)),Cn(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ja((e=>{if(!bs(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:i}=this.constraints[e];n.set(hi(r,i,o[e]))}))}addListeners(){var e;if(!this.visualElement.current)return;gs.set(this.visualElement,this);const t=Pr(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),n=()=>{const{dragConstraints:e}=this.getProps();Gt(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",n);r&&!r.layout&&(null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout()),n();const i=wr(window,"resize",(()=>this.scalePositionWithinConstraints())),a=r.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ja((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),t(),o(),null==a||a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Ka,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function bs(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ys={pan:to((function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:o}){const i=e||t||n||r,a=(0,b.useRef)(null),{transformPagePoint:s}=(0,b.useContext)(Vt),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{a.current=null,n&&n(e,t)}};(0,b.useEffect)((()=>{null!==a.current&&a.current.updateHandlers(l)})),Or(o,"pointerdown",i&&function(e){a.current=new Oa(e,l,{transformPagePoint:s})}),Hr((()=>a.current&&a.current.end()))})),drag:to((function(e){const{dragControls:t,visualElement:n}=e,r=nn((()=>new vs(n)));(0,b.useEffect)((()=>t&&t.subscribe(r)),[r,t]),(0,b.useEffect)((()=>r.addListeners()),[r])}))};function ws(e){return"string"==typeof e&&e.startsWith("var(--")}const xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function _s(e,t,n=1){const[r,o]=function(e){const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():ws(o)?_s(o,t,n+1):o}const Es=new Set(["width","height","top","left","right","bottom","x","y"]),Cs=e=>Es.has(e),ks=(e,t)=>{e.set(t,!1),e.set(t)},Ss=e=>e===kn||e===Ln;var Ts;!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Ts||(Ts={}));const Ns=(e,t)=>parseFloat(e.split(", ")[t]),Rs=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Ns(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Ns(t[1],e):0}},Is=new Set(["x","y","z"]),Ms=gn.filter((e=>!Is.has(e)));const Ps={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Rs(4,13),y:Rs(5,14)},Os=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Cs);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Jo(c);const d=t[o];let f;if(fr(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Jo(c);for(let n=t;n{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],ks(l,d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=Ps[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);ks(r,s[n]),e[n]=Ps[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),Lt&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function Ds(e,t,n,r){return(e=>Object.keys(e).some(Cs))(t)?Os(e,t,n,r):{target:t,transitionEnd:r}}const As=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!ws(t))return;const n=_s(t,r);n&&e.set(n)}));for(const e in t){const o=t[e];if(!ws(o))continue;const i=_s(o,r);i&&(t[e]=i,n&&void 0===n[e]&&(n[e]=o))}return{target:t,transitionEnd:n}}(e,t,r);return Ds(e,t=o.target,n,r=o.transitionEnd)};const Ls=Object.keys(tn),zs=Ls.length,Bs=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];const Fs=["initial",...Ca],Vs=Fs.length;class Hs extends class{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>vo.render(this.render,!1,!0);const{latestValues:i,renderState:a}=r;this.latestValues=i,this.baseTarget={...i},this.initialValues=t.initial?{...i}:{},this.renderState=a,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.isControllingVariants=Xt(t),this.isVariantNode=Zt(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:s,...l}=this.scrapeMotionValuesFromProps(t);for(const e in l){const t=l[e];void 0!==i[e]&&yn(t)&&(t.set(i[e],!1),ii(s)&&s.add(e))}}scrapeMotionValuesFromProps(e){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Bt.current||Ft(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||zt.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;null===(e=this.projection)||void 0===e||e.unmount(),bo.update(this.notifyUpdate),bo.render(this.render),this.valueSubscriptions.forEach((e=>e())),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const e in this.events)this.events[e].clear();this.current=null}bindToMotionValue(e,t){const n=vn.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&vo.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r,o,i){const a=[];for(let t=0;tthis.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;tn.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=No(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=dr(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||yn(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new ko),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){var r;const o={};for(const i in e){const e=oi(i,t);o[i]=void 0!==e?e:null===(r=n.getValue(i))||void 0===r?void 0:r.get()}return o}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;smn(e)?new $s(t,{enableHardwareAcceleration:!1}):new js(t,{enableHardwareAcceleration:!0});function Us(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gs={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ln.test(e))return e;e=parseFloat(e)}return`${Us(e,t.target.x)}% ${Us(e,t.target.y)}%`}},Ys="_$css",qs={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(xs,(e=>(i.push(e),Ys))));const a=jo.parse(e);if(a.length>5)return r;const s=jo.createTransformer(e),l="number"!=typeof a[0]?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;a[0+l]/=c,a[1+l]/=u;const d=hi(c,u,.5);"number"==typeof a[2+l]&&(a[2+l]/=d),"number"==typeof a[3+l]&&(a[3+l]/=d);let f=s(a);if(o){let e=0;f=f.replace(Ys,(()=>{const t=i[e];return e++,t}))}return f}};class Ks extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Xs,Object.assign(hn,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),rn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||vo.postRender((()=>{var e;(null===(e=i.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;null==e||e()}render(){return null}}const Xs={borderRadius:{...Gs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gs,borderTopRightRadius:Gs,borderBottomLeftRadius:Gs,borderBottomRightRadius:Gs,boxShadow:qs},Zs={measureLayout:function(e){const[t,n]=ro(),r=(0,b.useContext)(an);return b.createElement(Ks,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(ln),isPresent:t,safeToRemove:n})}};const Js=["TopLeft","TopRight","BottomLeft","BottomRight"],Qs=Js.length,el=e=>"string"==typeof e?parseFloat(e):e,tl=e=>"number"==typeof e||Ln.test(e);function nl(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const rl=il(0,.5,Oi),ol=il(.5,.95,Ri);function il(e,t,n){return r=>rt?1:n(ki(e,t,r))}function al(e,t){e.min=t.min,e.max=t.max}function sl(e,t){al(e.x,t.x),al(e.y,t.y)}function ll(e,t,n,r,o){return e=is(e-=t,1/n,r),void 0!==o&&(e=is(e,1/o,r)),e}function cl(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){An.test(t)&&(t=parseFloat(t),t=hi(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=hi(i.min,i.max,r);e===i&&(s-=t),e.min=ll(e.min,t,n,s,o),e.max=ll(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ul=["x","scaleX","originX"],dl=["y","scaleY","originY"];function fl(e,t,n,r){cl(e.x,t,ul,null==n?void 0:n.x,null==r?void 0:r.x),cl(e.y,t,dl,null==n?void 0:n.y,null==r?void 0:r.y)}function pl(e){return 0===e.translate&&1===e.scale}function ml(e){return pl(e.x)&&pl(e.y)}function hl(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function gl(e){return Va(e.x)/Va(e.y)}class vl{constructor(){this.members=[]}add(e){Eo(this.members,e),e.scheduleRender()}remove(e){if(Co(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;!1===o&&r.hide()}}exitAnimationComplete(){this.members.forEach((e=>{var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bl(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const yl=(e,t)=>e.depth-t.depth;class wl{constructor(){this.children=[],this.isDirty=!1}add(e){Eo(this.children,e),this.isDirty=!0}remove(e){Co(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yl),this.isDirty=!1,this.children.forEach(e)}}const xl=["","X","Y","Z"];let _l=0;function El({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=_l++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Sl),this.nodes.forEach(Ml),this.nodes.forEach(Pl)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=ra(r,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(Il))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var o,i,s,l,c;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const u=null!==(i=null!==(o=this.options.transition)&&void 0!==o?o:a.getDefaultTransition())&&void 0!==i?i:Bl,{onLayoutAnimationStart:d,onLayoutAnimationComplete:f}=a.getProps(),p=!this.targetLayout||!hl(this.targetLayout,r)||n,m=!t&&n;if((null===(s=this.resumeFrom)||void 0===s?void 0:s.instance)||m||t&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,m);const t={...ma(u,"layout"),onPlay:d,onComplete:f};a.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||Il(this),this.isLead()&&(null===(c=(l=this.options).onExitComplete)||void 0===c||c.call(l));this.targetLayout=r}))}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,bo.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(Ol),this.animationId++)}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked())return void(null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e{var n;const r=t/1e3;Al(s.x,e.x,r),Al(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Ga(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Ll(e.x,t.x,n.x,r),Ll(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,l,r)),c&&(this.animationValues=a,function(e,t,n,r,o,i){o?(e.opacity=hi(0,void 0!==n.opacity?n.opacity:1,rl(r)),e.opacityExit=hi(void 0!==t.opacity?t.opacity:1,0,ol(r))):i&&(e.opacity=hi(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o{rn.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){const r=yn(e)?e:No(e);return r.start(ya("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,1e3,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Hl(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Va(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Va(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sl(t,n),ms(t,o),$a(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){var n,r,o;this.sharedNodes.has(e)||this.sharedNodes.set(e,new vl);this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,t)})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Nl),this.root.sharedNodes.clear()}}}function Cl(e){e.updateLayout()}function kl(e){var t,n,r;const o=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:r}=e.options,i=o.source!==e.layout.source;"size"===r?Ja((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=Va(n);n.min=t[e].min,n.max=n.min+r})):Hl(r,o.layoutBox,t)&&Ja((e=>{const n=i?o.measuredBox[e]:o.layoutBox[e],r=Va(t[e]);n.max=n.min+r}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};$a(a,t,o.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?$a(s,e.applyTransform(n,!0),o.measuredBox):$a(s,t,o.layoutBox);const l=!ml(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:e,layout:r}=n;if(e&&r){const n={x:{min:0,max:0},y:{min:0,max:0}};Ga(n,o.layoutBox,e.layoutBox);const i={x:{min:0,max:0},y:{min:0,max:0}};Ga(i,t,r.layoutBox),hl(n,i)||(c=!0)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:o,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function Sl(e){e.isProjectionDirty||(e.isProjectionDirty=Boolean(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=Boolean(e.parent&&e.parent.isTransformDirty))}function Tl(e){e.clearSnapshot()}function Nl(e){e.clearMeasurements()}function Rl(e){const{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Il(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Ml(e){e.resolveTargetDelta()}function Pl(e){e.calcProjection()}function Ol(e){e.resetRotation()}function Dl(e){e.removeLeadSnapshot()}function Al(e,t,n){e.translate=hi(t.translate,0,n),e.scale=hi(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ll(e,t,n,r){e.min=hi(t.min,n.min,r),e.max=hi(t.max,n.max,r)}function zl(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Bl={duration:.45,ease:[.4,0,.1,1]};function Fl(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(Boolean(e.path[t].instance)){n=e.path[t];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function Vl(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Hl(e,t,n){return"position"===e||"preserve-aspect"===e&&!Ha(gl(t),gl(n),.2)}const jl=El({attachResizeListener:(e,t)=>wr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$l={current:void 0},Wl=El({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$l.current){const e=new jl(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),$l.current=e}return $l.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ul={...Ma,...no,...ys,...Zs},Gl=fn(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r,o){return{...mn(e)?vr:br,preloadedFeatures:n,useRender:or(t),createVisualElement:r,projectionNodeConstructor:o,Component:e}}(e,t,Ul,Ws,Wl)));var Yl=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),ql=window.wp.deprecated,Kl=n.n(ql);var Xl=function(e){let{icon:t,className:n,size:r=20,style:o={},...i}=e;const l=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" "),c={...20!=r?{fontSize:`${r}px`,width:`${r}px`,height:`${r}px`}:{},...o};return(0,s.createElement)("span",a({className:l,style:c},i))};var Zl=function(e){let{icon:t=null,size:n=("string"==typeof t?20:24),...r}=e;if("string"==typeof t)return(0,s.createElement)(Xl,a({icon:t,size:n},r));if((0,s.isValidElement)(t)&&Xl===t.type)return(0,s.cloneElement)(t,{...r});if("function"==typeof t)return t.prototype instanceof s.Component?(0,s.createElement)(t,{size:n,...r}):t({size:n,...r});if(t&&("svg"===t.type||t.type===i.SVG)){const e={...t.props,width:n,height:n,...r};return(0,s.createElement)(i.SVG,e)}return(0,s.isValidElement)(t)?(0,s.cloneElement)(t,{size:n,...r}):t},Jl=(window.wp.warning,n(5619)),Ql=n.n(Jl),ec=window.lodash;var tc=function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)};const nc=(0,s.createContext)({}),rc=()=>(0,s.useContext)(nc);const oc=(0,s.memo)((e=>{let{children:t,value:n}=e;const r=function(e){let{value:t}=e;const n=rc(),r=(0,s.useRef)(t);return tc((()=>{Ql()(r.current,t)&&r.current!==t&&"undefined"!=typeof process&&process.env}),[t]),(0,s.useMemo)((()=>(0,ec.merge)(JSON.parse(JSON.stringify(n)),t)),[n,t])}({value:n});return(0,s.createElement)(nc.Provider,{value:r},t)})),ic="__contextSystemKey__";var ac=n(9756),sc=n.n(ac);const lc=sc()((function(e){return`components-${(0,ec.kebabCase)(e)}`}));var cc=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;t0?gc(Sc,--Cc):0,_c--,10===kc&&(_c=1,xc--),kc}function Ic(){return kc=Cc2||Dc(kc)>3?"":" "}function Fc(e,t){for(;--t&&Ic()&&!(kc<48||kc>102||kc>57&&kc<65||kc>70&&kc<97););return Oc(e,Pc()+(t<6&&32==Mc()&&32==Ic()))}function Vc(e){for(;Ic();)switch(kc){case e:return Cc;case 34:case 39:34!==e&&39!==e&&Vc(kc);break;case 40:41===e&&Vc(e);break;case 92:Ic()}return Cc}function Hc(e,t){for(;Ic()&&e+kc!==57&&(e+kc!==84||47!==Mc()););return"/*"+Oc(t,Cc-1)+"*"+dc(47===e?e:Ic())}function jc(e){for(;!Dc(Mc());)Ic();return Oc(e,Cc)}var $c="-ms-",Wc="-moz-",Uc="-webkit-",Gc="comm",Yc="rule",qc="decl",Kc="@keyframes";function Xc(e,t){for(var n="",r=yc(e),o=0;o0&&bc(E)-d&&wc(p>32?nu(E+";",r,n,d-1):nu(mc(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(wc(_=eu(E,t,n,c,u,o,s,y,w=[],x=[],d),i),123===b)if(0===u)Qc(E,t,_,_,w,i,d,s,x);else switch(99===f&&110===gc(E,3)?100:f){case 100:case 109:case 115:Qc(e,_,_,r&&wc(eu(e,_,_,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Qc(E,_,_,_,[""],x,0,s,x)}}c=u=p=0,h=v=1,y=E="",d=a;break;case 58:d=1+bc(E),p=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==Rc())continue;switch(E+=dc(b),b*h){case 38:v=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(bc(E)-1)*v,v=1;break;case 64:45===Mc()&&(E+=zc(Ic())),f=Mc(),u=d=bc(y=E+=jc(Pc())),b++;break;case 45:45===m&&2==bc(E)&&(h=0)}}return i}function eu(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=yc(f),m=0,h=0,g=0;m0?f[v]+" "+b:mc(b,/&\f/g,f[v])))&&(l[g++]=y);return Tc(e,t,n,0===o?Yc:s,l,c,u)}function tu(e,t,n){return Tc(e,t,n,Gc,dc(kc),vc(e,2,-2),0)}function nu(e,t,n,r){return Tc(e,t,n,qc,vc(e,0,r),vc(e,r+1,-1),r)}var ru=function(e,t,n){for(var r=0,o=0;r=o,o=Mc(),38===r&&12===o&&(t[n]=1),!Dc(o);)Ic();return Oc(e,Cc)},ou=function(e,t){return Lc(function(e,t){var n=-1,r=44;do{switch(Dc(r)){case 0:38===r&&12===Mc()&&(t[n]=1),e[n]+=ru(Cc-1,t,n);break;case 2:e[n]+=zc(r);break;case 4:if(44===r){e[++n]=58===Mc()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=dc(r)}}while(r=Ic());return e}(Ac(e),t))},iu=new WeakMap,au=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=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)||iu.get(n))&&!r){iu.set(e,!0);for(var o=[],i=ou(t,o),a=n.props,s=0,l=0;s6)switch(gc(e,t+1)){case 109:if(45!==gc(e,t+4))break;case 102:return mc(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==gc(e,t+3)?"$3":"$2-$3"))+e;case 115:return~hc(e,"stretch")?lu(mc(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==gc(e,t+1))break;case 6444:switch(gc(e,bc(e)-3-(~hc(e,"!important")&&10))){case 107:return mc(e,":",":-webkit-")+e;case 101:return mc(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===gc(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(gc(e,t+11)){case 114:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Uc+e+$c+mc(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Uc+e+$c+e+e}return e}var cu=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case qc:e.return=lu(e.value,e.length);break;case Kc:return Xc([Nc(e,{value:mc(e.value,"@","@-webkit-")})],r);case Yc: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 Xc([Nc(e,{props:[mc(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Xc([Nc(e,{props:[mc(t,/:(plac\w+)/,":-webkit-input-$1")]}),Nc(e,{props:[mc(t,/:(plac\w+)/,":-moz-$1")]}),Nc(e,{props:[mc(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],uu=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 r=e.stylisPlugins||cu;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},fu={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 pu=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},mu=/[A-Z]|^ms/g,hu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gu=function(e){return 45===e.charCodeAt(1)},vu=function(e){return null!=e&&"boolean"!=typeof e},bu=pu((function(e){return gu(e)?e:e.replace(mu,"-$&").toLowerCase()})),yu=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(hu,(function(e,t,n){return xu={name:t,styles:n,next:xu},t}))}return 1===fu[e]||gu(e)||"number"!=typeof t||0===t?t:t+"px"};function wu(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 xu={name:n.name,styles:n.styles,next:xu},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)xu={name:r.name,styles:r.styles,next:xu},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;onull!=e&&["name","styles"].every((t=>void 0!==e[t])),Vu=()=>{const e=(0,b.useContext)(Su),t=(0,s.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,n=new Array(t),r=0;rFu(t)?(Pu(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Hu(e,t){const n=rc();void 0===t&&"undefined"!=typeof process&&process.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,c=Vu()(lc(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return void 0!==u&&(o.children=u),o.className=c,o}function ju(e,t){return $u(e,t,{forwardsRef:!0})}function $u(e,t,n){const r=null!=n&&n.forwardsRef?(0,s.forwardRef)(e):e;void 0===t&&"undefined"!=typeof process&&process.env;let o=r.__contextSystemKey__||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[ic]:[...new Set(o)],displayName:t,selector:`.${lc(t)}`})}function Wu(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}function Uu(e,t){return!!e&&("string"==typeof t?Wu(e).includes(t):!!Array.isArray(t)&&t.some((t=>Wu(e).includes(t))))}const Gu={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Yu=/^((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)-.*))$/,qu=pu((function(e){return Yu.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ku=function(e){return"theme"!==e},Xu=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?qu:Ku},Zu=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Ju=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Mu(t,n,r);ku((function(){return Pu(t,n,r)}));return null},Qu=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Zu(t,n,i),c=l||Xu(s),u=!c("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,m=1;m{e&&(e.stopPropagation(),e.preventDefault())}}const z=!O&&(v&&w||y||!!w&&!(null!=x&&x.length)&&!1!==v),B=k?I:void 0,F=R["aria-describedby"]||B,V={className:P,"aria-label":R["aria-label"]||w,"aria-describedby":F,ref:t},H=(0,s.createElement)(s.Fragment,null,m&&"left"===h&&(0,s.createElement)(Zl,{icon:m,size:g}),_&&(0,s.createElement)(s.Fragment,null,_),m&&"right"===h&&(0,s.createElement)(Zl,{icon:m,size:g}),x),j="a"===D?(0,s.createElement)("a",a({},L,R,V),H):(0,s.createElement)("button",a({},A,R,V),H);return z?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ff,{text:null!=x&&x.length&&k?k:w,shortcut:y,position:b},j),k&&(0,s.createElement)(nd,null,(0,s.createElement)("span",{id:B},k))):(0,s.createElement)(s.Fragment,null,j,k&&(0,s.createElement)(nd,null,(0,s.createElement)("span",{id:B},k)))}));var id=od;let ad=0;function sd(e){const t=document.scrollingElement||document.body;e&&(ad=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=ad)}let ld=0;var cd=function(){return(0,s.useEffect)((()=>(0===ld&&sd(!0),++ld,()=>{1===ld&&sd(!1),--ld})),[]),null};const ud=Symbol(),dd=Symbol(),fd=Symbol();let pd=(e,t)=>new Proxy(e,t);const md=Object.getPrototypeOf,hd=new WeakMap,gd=e=>e&&(hd.has(e)?hd.get(e):md(e)===Object.prototype||md(e)===Array.prototype),vd=e=>"object"==typeof e&&null!==e,bd=new WeakMap,yd=e=>e[fd]||e,wd=(e,t,n)=>{if(!gd(e))return e;const r=yd(e),o=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.writable)))(r);let i=n&&n.get(r);return i&&i[1].f===o||(i=((e,t)=>{const n={f:t};let r=!1;const o=(t,o)=>{if(!r){let r=n.a.get(e);r||(r=new Set,n.a.set(e,r)),o&&r.has(ud)||r.add(t)}},i={get:(t,r)=>r===fd?e:(o(r),wd(t[r],n.a,n.c)),has:(t,i)=>i===dd?(r=!0,n.a.delete(e),!0):(o(i),i in t),getOwnPropertyDescriptor:(e,t)=>(o(t,!0),Object.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(o(ud),Reflect.ownKeys(e))};return t&&(i.set=i.deleteProperty=()=>!1),[i,n]})(r,o),i[1].p=pd(o?(e=>{let t=bd.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const n=Object.getOwnPropertyDescriptors(e);Object.values(n).forEach((e=>{e.configurable=!0})),t=Object.create(md(e),n)}bd.set(e,t)}return t})(r):r,i[0]),n&&n.set(r,i)),i[1].a=t,i[1].c=n,i[1].p},xd=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some(((e,t)=>e!==r[t]))},_d=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!vd(e)||!vd(t))return!0;const o=n.get(yd(e));if(!o)return!0;if(r){const n=r.get(e);if(n&&n.n===t)return n.g;r.set(e,{n:t,g:!1})}let i=null;for(const a of o){const o=a===ud?xd(e,t):_d(e[a],t[a],n,r);if(!0!==o&&!1!==o||(i=o),i)break}return null===i&&(i=!0),r&&r.set(e,{n:t,g:i}),i},Ed=(e,t=!0)=>{hd.set(e,t)};var Cd=n(635);const kd=e=>"object"==typeof e&&null!==e,Sd=new WeakSet,Td=Symbol("VERSION"),Nd=Symbol("LISTENERS"),Rd=Symbol("SNAPSHOT"),Id=(e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>kd(e)&&!Sd.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=Symbol("PROMISE_RESULT"),o=Symbol("PROMISE_ERROR"),i=new WeakMap,a=((e,t,n)=>{const a=i.get(n);if((null==a?void 0:a[0])===e)return a[1];const s=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return Ed(s,!0),i.set(n,[e,s]),Reflect.ownKeys(t).forEach((e=>{const i=Reflect.get(t,e,n);if(Sd.has(i))Ed(i,!1),s[e]=i;else if(i instanceof Promise)if(r in i)s[e]=i[r];else{const t=i[o]||i;Object.defineProperty(s,e,{get(){if(r in i)return i[r];throw t}})}else(null==i?void 0:i[Nd])?s[e]=i[Rd]:s[e]=i})),Object.freeze(s)}),s=new WeakMap,l=[1],c=(i=>{if(!kd(i))throw new Error("object required");const c=s.get(i);if(c)return c;let u=l[0];const d=new Set,f=(e,t=++l[0])=>{u!==t&&(u=t,d.forEach((n=>n(e,t))))},p=new Map,m=e=>{let t=p.get(e);return t||(t=(t,n)=>{const r=[...t];r[1]=[e,...r[1]],f(r,n)},p.set(e,t)),t},h=e=>{const t=p.get(e);return p.delete(e),t},g=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),v={get(e,t,n){return t===Td?u:t===Nd?d:t===Rd?a(u,e,n):Reflect.get(e,t,n)},deleteProperty(e,t){const n=Reflect.get(e,t),r=null==n?void 0:n[Nd];r&&r.delete(h(t));const o=Reflect.deleteProperty(e,t);return o&&f(["delete",[t],n]),o},set(t,i,a,s){var l;const c=Reflect.has(t,i),u=Reflect.get(t,i,s);if(c&&e(u,a))return!0;const d=null==u?void 0:u[Nd];let p;return d&&d.delete(h(i)),kd(a)&&(a=(e=>gd(e)&&e[fd]||null)(a)||a),(null==(l=Object.getOwnPropertyDescriptor(t,i))?void 0:l.set)?p=a:a instanceof Promise?p=a.then((e=>(p[r]=e,f(["resolve",[i],e]),e))).catch((e=>{p[o]=e,f(["reject",[i],e])})):(null==a?void 0:a[Nd])?(p=a,p[Nd].add(m(i))):n(a)?(p=Pd(a),p[Nd].add(m(i))):p=a,Reflect.set(t,i,p,s),f(["set",[i],a,u]),!0}},b=t(g,v);return s.set(i,b),Reflect.ownKeys(i).forEach((e=>{const t=Object.getOwnPropertyDescriptor(i,e);t.get||t.set?Object.defineProperty(g,e,t):b[e]=i[e]})),b}))=>[c,Sd,Td,Nd,Rd,e,t,n,r,o,i,a,s,l],[Md]=Id();function Pd(e={}){return Md(e)}function Od(e,t,n){let r;(null==e?void 0:e[Nd])||console.warn("Please use proxy object");const o=[],i=e=>{o.push(e),n?t(o.splice(0)):r||(r=Promise.resolve().then((()=>{r=void 0,t(o.splice(0))})))};return e[Nd].add(i),()=>{e[Nd].delete(i)}}function Dd(e){return(null==e?void 0:e[Rd])||console.warn("Please use proxy object"),e[Rd]}function Ad(e){return Sd.add(e),e}const{useSyncExternalStore:Ld}=Cd,zd=(e,t)=>{const n=(0,b.useRef)();(0,b.useEffect)((()=>{n.current=((e,t)=>{const n=[],r=new WeakSet,o=(e,i)=>{if(r.has(e))return;vd(e)&&r.add(e);const a=vd(e)&&t.get(yd(e));a?a.forEach((t=>{o(e[t],i?[...i,t]:[t])})):i&&n.push(i)};return o(e),n})(e,t)})),(0,b.useDebugValue)(n.current)};function Bd(e,t){const n=null==t?void 0:t.sync,r=(0,b.useRef)(),o=(0,b.useRef)();let i=!0;const a=Ld((0,b.useCallback)((t=>{const r=Od(e,t,n);return t(),r}),[e,n]),(()=>{const t=Dd(e);try{if(!i&&r.current&&o.current&&!_d(r.current,t,o.current,new WeakMap))return r.current}catch(e){}return t}),(()=>Dd(e)));i=!1;const s=new WeakMap;(0,b.useEffect)((()=>{r.current=a,o.current=s})),zd(a,s);const l=(0,b.useMemo)((()=>new WeakMap),[]);return wd(a,s,l)}Symbol();function Fd(e){const t=Pd({data:Array.from(e||[]),has(e){return this.data.some((t=>t[0]===e))},set(e,t){const n=this.data.find((t=>t[0]===e));return n?n[1]=t:this.data.push([e,t]),this},get(e){var t;return null==(t=this.data.find((t=>t[0]===e)))?void 0:t[1]},delete(e){const t=this.data.findIndex((t=>t[0]===e));return-1!==t&&(this.data.splice(t,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return{}},forEach(e){this.data.forEach((t=>{e(t[1],t[0],this)}))},keys(){return this.data.map((e=>e[0])).values()},values(){return this.data.map((e=>e[1])).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}var Vd=(0,s.createContext)({slots:Fd(),fills:Fd(),registerSlot:()=>{"undefined"!=typeof process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function Hd(e){const{updateSlot:t,unregisterSlot:n,registerFill:r,unregisterFill:o,...i}=(0,s.useContext)(Vd);return{...Bd(i.slots,{sync:!0}).get(e),updateSlot:(0,s.useCallback)((n=>{t(e,n)}),[e,t]),unregisterSlot:(0,s.useCallback)((t=>{n(e,t)}),[e,n]),registerFill:(0,s.useCallback)((t=>{r(e,t)}),[e,r]),unregisterFill:(0,s.useCallback)((t=>{o(e,t)}),[e,o])}}var jd=(0,s.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});var $d=e=>{const{getSlot:t,subscribe:n}=(0,s.useContext)(jd);return(0,s.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function Wd(e){let{name:t,children:n,registerFill:r,unregisterFill:o}=e;const i=$d(t),a=(0,s.useRef)({name:t,children:n});return(0,s.useLayoutEffect)((()=>{const e=a.current;return r(t,e),()=>o(t,e)}),[]),(0,s.useLayoutEffect)((()=>{a.current.children=n,i&&i.forceUpdate()}),[n]),(0,s.useLayoutEffect)((()=>{t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?("function"==typeof n&&(n=n(i.props.fillProps)),(0,s.createPortal)(n,i.node)):null}var Ud=e=>(0,s.createElement)(jd.Consumer,null,(t=>{let{registerFill:n,unregisterFill:r}=t;return(0,s.createElement)(Wd,a({},e,{registerFill:n,unregisterFill:r}))}));function Gd(e){return"function"==typeof e}class Yd extends s.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:r={},getFills:o}=this.props,i=(null!==(e=o(n,this))&&void 0!==e?e:[]).map((e=>{const t=Gd(e.children)?e.children(r):e.children;return s.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;const n=e.key||t;return(0,s.cloneElement)(e,{key:n})}))})).filter((e=>!(0,s.isEmptyElement)(e)));return(0,s.createElement)(s.Fragment,null,Gd(t)?t(i):i)}}var qd,Kd=e=>(0,s.createElement)(jd.Consumer,null,(t=>{let{registerSlot:n,unregisterSlot:r,getFills:o}=t;return(0,s.createElement)(Yd,a({},e,{registerSlot:n,unregisterSlot:r,getFills:o}))})),Xd=new Uint8Array(16);function Zd(){if(!qd&&!(qd="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qd(Xd)}var Jd=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Qd=function(e){return"string"==typeof e&&Jd.test(e)},ef=[],tf=0;tf<256;++tf)ef.push((tf+256).toString(16).substr(1));var nf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ef[e[t+0]]+ef[e[t+1]]+ef[e[t+2]]+ef[e[t+3]]+"-"+ef[e[t+4]]+ef[e[t+5]]+"-"+ef[e[t+6]]+ef[e[t+7]]+"-"+ef[e[t+8]]+ef[e[t+9]]+"-"+ef[e[t+10]]+ef[e[t+11]]+ef[e[t+12]]+ef[e[t+13]]+ef[e[t+14]]+ef[e[t+15]]).toLowerCase();if(!Qd(n))throw TypeError("Stringified UUID is invalid");return n};var rf=function(e,t,n){var r=(e=e||{}).random||(e.rng||Zd)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return nf(r)};const of=new Set,af=sc()((e=>{let t=rf().replace(/[0-9]/g,"");for(;of.has(t);)t=rf().replace(/[0-9]/g,"");return of.add(t),uu({container:e,key:t})}));var sf=function(e){const{children:t,document:n}=e;if(!n)return null;const r=af(n.head);return(0,s.createElement)(Tu,{value:r},t)};function lf(){const[,e]=(0,s.useState)({}),t=(0,s.useRef)(!0);return(0,s.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}function cf(e){let{name:t,children:n}=e;const{registerFill:r,unregisterFill:o,...i}=Hd(t),a=(0,s.useRef)({rerender:lf()});if((0,s.useEffect)((()=>(r(a),()=>{o(a)})),[r,o]),!i.ref||!i.ref.current)return null;"function"==typeof n&&(n=n(i.fillProps));const l=(0,s.createElement)(sf,{document:i.ref.current.ownerDocument},n);return(0,s.createPortal)(l,i.ref.current)}var uf=(0,s.forwardRef)((function(e,t){let{name:n,fillProps:r={},as:o="div",...i}=e;const{registerSlot:l,unregisterSlot:c,...u}=(0,s.useContext)(Vd),f=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(l(n,f,r),()=>{c(n,f)})),[l,c,n]),(0,s.useLayoutEffect)((()=>{u.updateSlot(n,r)})),(0,s.createElement)(o,a({ref:(0,d.useMergeRefs)([t,f])},i))})),df=window.wp.isShallowEqual,ff=n.n(df);function pf(e){let{children:t}=e;const n=function(){const e=(0,s.useRef)(Fd()),t=(0,s.useRef)(Fd()),n=(0,s.useCallback)(((t,n,r)=>{const o=e.current.get(t)||{};e.current.set(t,Ad({...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}))}),[]),r=(0,s.useCallback)(((t,n)=>{var r;(null===(r=e.current.get(t))||void 0===r?void 0:r.ref)===n&&e.current.delete(t)}),[]),o=(0,s.useCallback)(((n,r)=>{const o=e.current.get(n);if(o&&!ff()(o.fillProps,r)){o.fillProps=r;const e=t.current.get(n);e&&e.map((e=>e.current.rerender()))}}),[]),i=(0,s.useCallback)(((e,n)=>{t.current.set(e,Ad([...t.current.get(e)||[],n]))}),[]),a=(0,s.useCallback)(((e,n)=>{t.current.get(e)&&t.current.set(e,Ad(t.current.get(e).filter((e=>e!==n))))}),[]);return(0,s.useMemo)((()=>({slots:e.current,fills:t.current,registerSlot:n,updateSlot:o,unregisterSlot:r,registerFill:i,unregisterFill:a})),[n,o,r,i,a])}();return(0,s.createElement)(Vd.Provider,{value:n},t)}class mf extends s.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){var n,r;this.fills[e]=null!==(n=null===(r=this.fills[e])||void 0===r?void 0:r.filter((e=>e!==t)))&&void 0!==n?n:[],this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter((t=>t!==e))}}render(){return(0,s.createElement)(jd.Provider,{value:this.contextValue},this.props.children)}}function hf(e){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ud,e),(0,s.createElement)(cf,e))}const gf=(0,s.forwardRef)(((e,t)=>{let{bubblesVirtually:n,...r}=e;return n?(0,s.createElement)(uf,a({},r,{ref:t})):(0,s.createElement)(Kd,r)}));function vf(e){let{children:t,...n}=e;return(0,s.createElement)(mf,n,(0,s.createElement)(pf,null,t))}function bf(e){const t=t=>(0,s.createElement)(hf,a({name:e},t));t.displayName=e+"Fill";const n=t=>(0,s.createElement)(gf,a({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}const yf={bottom:"bottom",top:"top","middle left":"left","middle right":"right","bottom left":"bottom-end","bottom center":"bottom","bottom right":"bottom-start","top left":"top-end","top center":"top","top right":"top-start","middle left left":"left","middle left right":"left","middle left bottom":"left-end","middle left top":"left-start","middle right left":"right","middle right right":"right","middle right bottom":"right-end","middle right top":"right-start","bottom left left":"bottom-end","bottom left right":"bottom-end","bottom left bottom":"bottom-end","bottom left top":"bottom-end","bottom center left":"bottom","bottom center right":"bottom","bottom center bottom":"bottom","bottom center top":"bottom","bottom right left":"bottom-start","bottom right right":"bottom-start","bottom right bottom":"bottom-start","bottom right top":"bottom-start","top left left":"top-end","top left right":"top-end","top left bottom":"top-end","top left top":"top-end","top center left":"top","top center right":"top","top center bottom":"top","top center top":"top","top right left":"top-start","top right right":"top-start","top right bottom":"top-start","top right top":"top-start",middle:"bottom","middle center":"bottom","middle center bottom":"bottom","middle center left":"bottom","middle center right":"bottom","middle center top":"bottom"},wf=e=>{var t;return null!==(t=yf[e])&&void 0!==t?t:"bottom"},xf={top:{originX:.5,originY:1},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},right:{originX:0,originY:.5},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},bottom:{originX:.5,originY:0},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},left:{originX:1,originY:.5},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}},_f=e=>{var t;const n=null==e||null===(t=e.defaultView)||void 0===t?void 0:t.frameElement;if(!n)return;const r=n.getBoundingClientRect();return{x:r.left,y:r.top}};function Ef(e){return e.split("-")[0]}function Cf(e){return["top","bottom"].includes(Ef(e))?"x":"y"}function kf(e){return"x"===e?"y":"x"}const Sf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{options:e,fn(t){var n;const{x:r,y:o,placement:i,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=e,d={x:r,y:o},f=Cf(i),p=kf(f);let m=d[f],h=d[p];const g="function"==typeof l?l(t):l,v="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g},b={x:0,y:0,...null===(n=s.frameOffset)||void 0===n?void 0:n.amount};if(c){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis+b[f],n=a.reference[f]+a.reference[e]-v.mainAxis+b[f];mn&&(m=n)}if(u){var y,w,x,_;const e="y"===f?"width":"height",t=["top","left"].includes(Ef(i)),n=a.reference[p]-a.floating[e]+(t&&null!==(y=null===(w=s.offset)||void 0===w?void 0:w[p])&&void 0!==y?y:0)+(t?0:v.crossAxis)+b[p],r=a.reference[p]+a.reference[e]+(t?0:null!==(x=null===(_=s.offset)||void 0===_?void 0:_[p])&&void 0!==x?x:0)-(t?v.crossAxis:0)+b[p];hr&&(h=r)}return{[f]:m,[p]:h}}}},Tf="Popover",Nf=()=>(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation"},(0,s.createElement)(i.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,s.createElement)(i.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})),Rf=(0,s.forwardRef)(((e,t)=>{let{style:n,placement:r,shouldAnimate:o=!1,...i}=e;const[l,c]=(0,s.useState)(!1),u=function(){!Bt.current&&Ft();const[e]=(0,b.useState)(zt.current);return e}(),{style:d,...f}=(0,s.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:xf[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(r)),[r]),p=(0,s.useCallback)((()=>c(!0)),[]),m=o&&!u?{style:{...d,...n},...f,onAnimationComplete:p,animate:!l&&f.animate}:{animate:!1,style:n};return(0,s.createElement)(Gl.div,a({},m,i,{ref:t}))})),If=(0,s.createContext)(void 0),Mf=(0,s.forwardRef)(((e,t)=>{var n,r,o,i;const{animate:l=!0,headerTitle:u,onClose:f,children:p,className:m,noArrow:h=!0,position:g,placement:v="bottom-start",offset:b=0,focusOnMount:y="firstElement",anchor:w,expandOnMobile:x,onFocusOutside:_,__unstableSlotName:E=Tf,flip:C=!0,resize:k=!0,shift:S=!1,variant:T,__unstableForcePosition:N,anchorRef:R,anchorRect:I,getAnchorRect:M,isAlternate:P,...O}=e;let D=C,A=k;void 0!==N&&(Kl()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),D=!N,A=!N),void 0!==R&&Kl()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==I&&Kl()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==M&&Kl()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const L=P?"toolbar":T;void 0!==P&&Kl()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const z=(0,s.useRef)(null),[B,F]=(0,s.useState)(null),[V,H]=(0,s.useState)(),j=(0,s.useCallback)((e=>{F(e)}),[]),$=(0,d.useViewportMatch)("medium","<"),W=x&&$,U=!W&&!h,G=g?wf(g):v,Y=(0,s.useRef)(_f(V)),q=[{name:"frameOffset",fn(e){let{x:t,y:n}=e;return Y.current?{x:t+Y.current.x,y:n+Y.current.y,data:{amount:Y.current}}:{x:t,y:n}}},Ye(b),D?Ge():void 0,A?Xe({apply(e){var t;const{firstElementChild:n}=null!==(t=oe.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}):void 0,S?Ke({crossAxis:!0,limiter:Sf(),padding:1}):void 0,Mt({element:z})].filter((e=>void 0!==e)),K=(0,s.useContext)(If)||E,X=Hd(K);let Z;(f||_)&&(Z=(e,t)=>{"focus-outside"===e&&_?_(t):f&&f()});const[J,Q]=(0,d.__experimentalUseDialog)({focusOnMount:y,__unstableOnClose:Z,onClose:Z}),{x:ee,y:te,reference:ne,floating:re,refs:oe,strategy:ie,update:ae,placement:se,middlewareData:{arrow:le}}=At({placement:G,middleware:q,whileElementsMounted:(e,t,n)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,c=l||i?[...st(e)?Ct(e):e.contextElement?Ct(e.contextElement):[],...Ct(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(a){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),st(e)&&!s&&d.observe(e),st(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?bt(e):null;return s&&function t(){const r=bt(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(u)}}(e,t,n,{animationFrame:!0})}),ce=(0,s.useCallback)((e=>{z.current=e,ae()}),[ae]),ue=null==R?void 0:R.top,de=null==R?void 0:R.bottom,fe=null==R?void 0:R.startContainer,pe=null==R?void 0:R.current;(0,s.useLayoutEffect)((()=>{const e=(e=>{var t;let n,{anchor:r,anchorRef:o,anchorRect:i,getAnchorRect:a,fallbackReferenceElement:s,fallbackDocument:l}=e;if(r)n=r.ownerDocument;else if(null!=o&&o.top)n=null==o?void 0:o.top.ownerDocument;else if(null!=o&&o.startContainer)n=o.startContainer.ownerDocument;else if(null!=o&&o.current)n=o.current.ownerDocument;else if(o)n=o.ownerDocument;else if(i&&null!=i&&i.ownerDocument)n=i.ownerDocument;else if(a){var c;n=null===(c=a(s))||void 0===c?void 0:c.ownerDocument}return null!==(t=n)&&void 0!==t?t:l})({anchor:w,anchorRef:R,anchorRect:I,getAnchorRect:M,fallbackReferenceElement:B,fallbackDocument:document}),t=(e=>{var t;let{anchor:n,anchorRef:r,anchorRect:o,getAnchorRect:i,fallbackReferenceElement:a}=e,s=null;return n?s=n:null!=r&&r.top?s={getBoundingClientRect(){const e=r.top.getBoundingClientRect(),t=r.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,t.bottom-e.top)}}:null!=r&&r.current?s=r.current:r?s=r:o?s={getBoundingClientRect(){return o}}:i?s={getBoundingClientRect(){var e,t,n,r;const o=i(a);return new window.DOMRect(null!==(e=o.x)&&void 0!==e?e:o.left,null!==(t=o.y)&&void 0!==t?t:o.top,null!==(n=o.width)&&void 0!==n?n:o.right-o.left,null!==(r=o.height)&&void 0!==r?r:o.bottom-o.top)}}:a&&(s=a.parentElement),null!==(t=s)&&void 0!==t?t:null})({anchor:w,anchorRef:R,anchorRect:I,getAnchorRect:M,fallbackReferenceElement:B});ne(t),H(e)}),[w,R,ue,de,fe,pe,I,M,B,ne]),(0,s.useLayoutEffect)((()=>{var e,t;if(V===document||V===(null===(e=oe.floating.current)||void 0===e?void 0:e.ownerDocument)||null==V||null===(t=V.defaultView)||void 0===t||!t.frameElement)return void(Y.current=void 0);const{defaultView:n}=V,r=()=>{Y.current=_f(V),ae()};return n.addEventListener("resize",r),r(),()=>{n.removeEventListener("resize",r)}}),[V,ae,oe.floating]);const me=(0,d.useMergeRefs)([re,J,t]);let he=(0,s.createElement)(Rf,a({shouldAnimate:l&&!W,placement:se,className:c()("components-popover",m,{"is-expanded":W,"is-positioned":null!==ee&&null!==te,[`is-${"toolbar"===L?"alternate":L}`]:L})},O,{ref:me},Q,{tabIndex:-1,style:W?void 0:{position:ie,top:0,left:0,x:Math.round(null!=ee?ee:0)||void 0,y:Math.round(null!=te?te:0)||void 0}}),W&&(0,s.createElement)(cd,null),W&&(0,s.createElement)("div",{className:"components-popover__header"},(0,s.createElement)("span",{className:"components-popover__header-title"},u),(0,s.createElement)(id,{className:"components-popover__close",icon:Yl,onClick:f})),(0,s.createElement)("div",{className:"components-popover__content"},p),U&&(0,s.createElement)("div",{ref:ce,className:["components-popover__arrow",`is-${se.split("-")[0]}`].join(" "),style:{left:void 0!==(null==le?void 0:le.x)&&Number.isFinite(le.x)?`${le.x+(null!==(n=null===(r=Y.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)}px`:"",top:void 0!==(null==le?void 0:le.y)&&Number.isFinite(le.y)?`${le.y+(null!==(o=null===(i=Y.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0)}px`:""}},(0,s.createElement)(Nf,null)));return X.ref&&(he=(0,s.createElement)(hf,{name:K},he)),R||I||w?he:(0,s.createElement)("span",{ref:j},he)}));Mf.Slot=(0,s.forwardRef)((function(e,t){let{name:n=Tf}=e;return(0,s.createElement)(gf,{bubblesVirtually:!0,name:n,className:"popover-slot",ref:t})})),Mf.__unstableSlotNameProvider=If.Provider;var Pf=Mf;var Of=function(e){const{shortcut:t,className:n}=e;if(!t)return null;let r,o;return"string"==typeof t&&(r=t),null!==t&&"object"==typeof t&&(r=t.display,o=t.ariaLabel),(0,s.createElement)("span",{className:n,"aria-label":o},r)};const Df=700,Af=(0,s.createElement)("div",{className:"event-catcher"}),Lf=e=>{let{eventHandlers:t,child:n,childrenWithPopover:r,mergedRefs:o}=e;return(0,s.cloneElement)((0,s.createElement)("span",{className:"disabled-element-wrapper"},(0,s.cloneElement)(Af,t),(0,s.cloneElement)(n,{children:r,ref:o})),{...t})},zf=e=>{let{child:t,eventHandlers:n,childrenWithPopover:r,mergedRefs:o}=e;return(0,s.cloneElement)(t,{...n,children:r,ref:o})},Bf=(e,t,n)=>{if(1!==s.Children.count(e))return;const r=s.Children.only(e);r.props.disabled||"function"==typeof r.props[t]&&r.props[t](n)};var Ff=function(e){var t;const{children:n,position:r="bottom middle",text:o,shortcut:i,delay:a=Df}=e,[l,c]=(0,s.useState)(!1),[u,f]=(0,s.useState)(!1),p=(0,d.useDebounce)(f,a),[m,h]=(0,s.useState)(null),g=null===(t=s.Children.toArray(n)[0])||void 0===t?void 0:t.ref,v=(0,d.useMergeRefs)([h,g]),b=e=>{"OPTION"!==e.target.tagName&&(Bf(n,"onMouseDown",e),document.addEventListener("mouseup",x),c(!0))},y=e=>{"OPTION"!==e.target.tagName&&(Bf(n,"onMouseUp",e),document.removeEventListener("mouseup",x),c(!1))},w=e=>"mouseUp"===e?y:"mouseDown"===e?b:void 0,x=w("mouseUp"),_=(e,t)=>r=>{if(Bf(n,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&l)return;p.cancel();const o=["focus","mouseenter"].includes(r.type);o!==u&&(t?p(o):f(o))},E=()=>{p.cancel(),document.removeEventListener("mouseup",x)};if((0,s.useEffect)((()=>E),[]),1!==s.Children.count(n))return n;const C={onMouseEnter:_("onMouseEnter",!0),onMouseLeave:_("onMouseLeave"),onClick:_("onClick"),onFocus:_("onFocus"),onBlur:_("onBlur"),onMouseDown:w("mouseDown")},k=s.Children.only(n),{children:S,disabled:T}=k.props,N=T?Lf:zf,R=(e=>{let{anchor:t,grandchildren:n,isOver:r,offset:o,position:i,shortcut:a,text:l}=e;return(0,s.concatChildren)(n,r&&(0,s.createElement)(Pf,{focusOnMount:!1,position:i,className:"components-tooltip","aria-hidden":"true",animate:!1,offset:o,anchor:t,shift:!0},l,(0,s.createElement)(Of,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:S,...{anchor:m,isOver:u,offset:4,position:r,shortcut:i,text:o}});return N({child:k,eventHandlers:C,childrenWithPopover:R,mergedRefs:v})};const Vf=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],Hf={"top left":(0,u.__)("Top Left"),"top center":(0,u.__)("Top Center"),"top right":(0,u.__)("Top Right"),"center left":(0,u.__)("Center Left"),"center center":(0,u.__)("Center"),center:(0,u.__)("Center"),"center right":(0,u.__)("Center Right"),"bottom left":(0,u.__)("Bottom Left"),"bottom center":(0,u.__)("Bottom Center"),"bottom right":(0,u.__)("Bottom Right")},jf=Vf.flat();function $f(e){return("center"===e?"center center":e).replace("-"," ")}function Wf(e,t){return`${e}-${$f(t).replace(" ","-")}`}n(1281);function Uf(){for(var e=arguments.length,t=new Array(e),n=0;n0:"number"==typeof e},qf=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Kf=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Xf=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Zf=function(e){return{r:Kf(e.r,0,255),g:Kf(e.g,0,255),b:Kf(e.b,0,255),a:Kf(e.a)}},Jf=function(e){return{r:qf(e.r),g:qf(e.g),b:qf(e.b),a:qf(e.a,3)}},Qf=/^#([0-9a-f]{3,8})$/i,ep=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},tp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},np=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:o}},rp=function(e){return{h:Xf(e.h),s:Kf(e.s,0,100),l:Kf(e.l,0,100),a:Kf(e.a)}},op=function(e){return{h:qf(e.h),s:qf(e.s),l:qf(e.l),a:qf(e.a,3)}},ip=function(e){return np((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},ap=function(e){return{h:(t=tp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},sp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,up=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dp={string:[[function(e){var t=Qf.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?qf(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?qf(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=cp.exec(e)||up.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zf({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=sp.exec(e)||lp.exec(e);if(!t)return null;var n,r,o=rp({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Gf[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ip(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Yf(t)&&Yf(n)&&Yf(r)?Zf({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Yf(t)||!Yf(n)||!Yf(r))return null;var a=rp({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return ip(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Yf(t)||!Yf(n)||!Yf(r))return null;var a=function(e){return{h:Xf(e.h),s:Kf(e.s,0,100),v:Kf(e.v,0,100),a:Kf(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return np(a)},"hsv"]]},fp=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Jf(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?ep(qf(255*o)):"","#"+ep(t)+ep(n)+ep(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Jf(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jf(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return op(ap(this.rgba))},e.prototype.toHslString=function(){return t=(e=op(ap(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=tp(this.rgba),{h:qf(e.h),s:qf(e.s),v:qf(e.v),a:qf(e.a,3)};var e},e.prototype.invert=function(){return bp({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),bp(mp(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),bp(mp(this.rgba,-e))},e.prototype.grayscale=function(){return bp(mp(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),bp(gp(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),bp(gp(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?bp({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):qf(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=ap(this.rgba);return"number"==typeof e?bp({h:e,s:t.s,l:t.l,a:t.a}):qf(t.h)},e.prototype.isEqual=function(e){return this.toHex()===bp(e).toHex()},e}(),bp=function(e){return e instanceof vp?e:new vp(e)},yp=[],wp=function(e){e.forEach((function(e){yp.indexOf(e)<0&&(e(vp,dp),yp.push(e))}))};function xp(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"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var p=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));p0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return bp(e).alpha(t).toRgbString()}wp([xp]);const Ep="#fff",Cp={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},kp="var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #006ba1))",Sp={theme:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba))",themeDark10:kp,background:Ep,backgroundDisabled:Cp[100],border:Cp[600],borderHover:Cp[700],borderFocus:kp,borderDisabled:Cp[400],textDisabled:Cp[600],textDark:Ep,darkGrayPlaceholder:_p(Cp[900],.62),lightGrayPlaceholder:_p(Ep,.65)},Tp=Object.freeze({gray:Cp,white:Ep,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},ui:Sp});function Np(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}var Rp={name:"93uojk",styles:"border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const Ip=()=>Rp,Mp=Qu("div",{target:"ecapk1j3"})(Ip,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(e=>{let{size:t=92}=e;return Uf("grid-template-rows:repeat( 3, calc( ",t,"px / 3 ) );width:",t,"px;","")}),";"),Pp=Qu("div",{target:"ecapk1j2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Op=e=>Uf("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",Np("transition")," ",(e=>{let{isActive:t}=e;return Uf("box-shadow:",t?`0 0 0 2px ${Tp.gray[900]}`:null,";color:",t?Tp.gray[900]:Tp.gray[400],";*:hover>&{color:",t?Tp.gray[900]:Tp.ui.theme,";}","")})(e),";",""),Dp=Qu("span",{target:"ecapk1j1"})("height:6px;width:6px;",Op,";"),Ap=Qu("span",{target:"ecapk1j0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Lp(e){let{isActive:t=!1,value:n,...r}=e;const o=Hf[n];return(0,s.createElement)(Ff,{text:o},(0,s.createElement)(Se,a({as:Ap,role:"gridcell"},r),(0,s.createElement)(nd,null,n),(0,s.createElement)(Dp,{isActive:t,role:"presentation"})))}function zp(e){return(0,b.useState)(e)[0]}function Bp(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=v(e);!(t=o()).done;)r();return n}function Fp(e){for(var t,n=[],r=v(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function Vp(e){return e.slice().reverse()}function Hp(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function jp(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function $p(e){void 0===e&&(e={});var t=zp(e).baseId,n=(0,b.useContext)(we),r=(0,b.useRef)(0),o=(0,b.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}function Wp(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Up(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&Wp(t.ref.current,e.ref.current)}))}function Gp(e){for(var t,n=0,r=v(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function Yp(e){for(var t=Bp(e),n=Gp(t),r=[],o=0;oi&&(n=!0),-1):(rUf({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(e=>{let{disablePointerEvents:t}=e;return Uf({pointerEvents:t?"none":void 0},"","")}),";"),ym=Qu("span",{target:"erowt50"})("height:2px;width:2px;",Op,";",(e=>{let{isActive:t}=e;return Uf("box-shadow:",t?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")}),";"),wm=Ap,xm=24;var _m=function(e){let{className:t,disablePointerEvents:n=!0,size:r=xm,style:o={},value:i="center",...l}=e;const u=function(){const e=$f(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center"),t=jf.indexOf(e);return t>-1?t:void 0}(i),d=(r/xm).toFixed(2),f=c()("component-alignment-matrix-control-icon",t),p={...o,transform:`scale(${d})`};return(0,s.createElement)(bm,a({},l,{className:f,disablePointerEvents:n,role:"presentation",style:p}),jf.map(((e,t)=>{const n=u===t;return(0,s.createElement)(wm,{key:e},(0,s.createElement)(ym,{isActive:n}))})))};const Em=()=>{};function Cm(e){let{className:t,id:n,label:r=(0,u.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:l=Em,width:f=92,...p}=e;const[m]=(0,s.useState)(null!=i?i:o),h=function(e){const t=(0,d.useInstanceId)(Cm,"alignment-matrix-control");return e||t}(n),g=Wf(h,m),v=im({baseId:h,currentId:g,rtl:(0,u.isRTL)()}),{setCurrentId:b}=v;(0,s.useEffect)((()=>{void 0!==i&&b(Wf(h,i))}),[i,b,h]);const y=c()("component-alignment-matrix-control",t);return(0,s.createElement)(mm,a({},p,v,{"aria-label":r,as:Mp,className:y,role:"grid",size:f}),Vf.map(((e,t)=>(0,s.createElement)(vm,a({},v,{as:Pp,role:"row",key:t}),e.map((e=>{const t=Wf(h,e),n=v.currentId===t;return(0,s.createElement)(Lp,a({},v,{id:t,isActive:n,key:e,value:e,onFocus:()=>{l(e)},tabIndex:n?0:-1}))}))))))}Cm.Icon=_m;var km=Cm;function Sm(e){return"appear"===e?"top":"left"}function Tm(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=Sm(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}function Nm(e){let{type:t,options:n={},children:r}=e;return r({className:Tm({type:t,...n})})}function Rm(){const e=(0,b.useRef)(!1);return $t((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class Im extends b.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Mm({children:e,isPresent:t}){const n=(0,b.useId)(),r=(0,b.useRef)(null),o=(0,b.useRef)({width:0,height:0,top:0,left:0});return(0,b.useInsertionEffect)((()=>{const{width:e,height:i,top:a,left:s}=o.current;if(t||!r.current||!e||!i)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),b.createElement(Im,{isPresent:t,childRef:r,sizeRef:o},b.cloneElement(e,{ref:r}))}const Pm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=nn(Om),l=(0,b.useId)(),c=(0,b.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))})),i?void 0:[n]);return(0,b.useMemo)((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),b.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===a&&(e=b.createElement(Mm,{isPresent:n},e)),b.createElement(jt.Provider,{value:c},e)};function Om(){return new Map}const Dm=e=>e.key||"";const Am=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{o&&(a="wait",Gr(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=function(){const e=Rm(),[t,n]=(0,b.useState)(0),r=(0,b.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,b.useCallback)((()=>vo.postRender(r)),[r]),t]}();const l=(0,b.useContext)(an).forceRender;l&&(s=l);const c=Rm(),u=function(e){const t=[];return b.Children.forEach(e,(e=>{(0,b.isValidElement)(e)&&t.push(e)})),t}(e);let d=u;const f=new Set,p=(0,b.useRef)(d),m=(0,b.useRef)(new Map).current,h=(0,b.useRef)(!0);if($t((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=Dm(e);t.set(n,e)}))}(u,m),p.current=d})),Hr((()=>{h.current=!0,m.clear(),f.clear()})),h.current)return b.createElement(b.Fragment,null,d.map((e=>b.createElement(Pm,{key:Dm(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:a},e))));d=[...d];const g=p.current.map(Dm),v=u.map(Dm),y=g.length;for(let e=0;e{if(-1!==v.indexOf(e))return;const n=m.get(e);if(!n)return;const o=g.indexOf(e);d.splice(o,0,b.createElement(Pm,{key:Dm(n),isPresent:!1,onExitComplete:()=>{m.delete(e),f.delete(e);const t=p.current.findIndex((t=>t.key===e));if(p.current.splice(t,1),!f.size){if(p.current=u,!1===c.current)return;s(),r&&r()}},custom:t,presenceAffectsLayout:i,mode:a},n))})),d=d.map((e=>{const t=e.key;return f.has(t)?e:b.createElement(Pm,{key:Dm(e),isPresent:!0,presenceAffectsLayout:i,mode:a},e)})),"production"!==Wr&&"wait"===a&&d.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),b.createElement(b.Fragment,null,f.size?d:d.map((e=>(0,b.cloneElement)(e))))},Lm=(0,s.createContext)({flexItemDisplay:void 0});const zm={name:"zjik7",styles:"display:flex"},Bm={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},Fm={name:"82a6rk",styles:"flex:1"},Vm={name:"13nosa1",styles:">*{min-height:0;}"},Hm={name:"1pwxzk4",styles:">*{min-width:0;}"};function jm(e){const{className:t,display:n,isBlock:r=!1,...o}=Hu(e,"FlexItem"),i={},a=(0,s.useContext)(Lm).flexItemDisplay;i.Base=Uf({display:n||a},"","");return{...o,className:Vu()(Bm,i.Base,r&&Fm,t)}}var $m=ju((function(e,t){const n=function(e){return jm({isBlock:!0,...Hu(e,"FlexBlock")})}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"FlexBlock");var Wm=ju((function(e,t){const n=jm(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"FlexItem");var Um=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var Gm=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M7 11.5h10V13H7z"}));const Ym=["40em","52em","64em"],qm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>Ym.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${Ym.length} breakpoints, got index ${t}`);const[n,r]=(0,s.useState)(t);return(0,s.useEffect)((()=>{const e=()=>{const e=Ym.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function Km(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=qm(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}function Xm(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(n=t.supports)&&void 0!==n&&n.call(t,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}function Zm(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:l=!1,...c}=Hu(function(e){const{isReversed:t,...n}=e;return void 0!==t?(Kl()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),u=Km(Array.isArray(r)?r:[r]),d="string"==typeof u&&!!u.includes("column"),f=Vu();return{...c,className:(0,s.useMemo)((()=>{const e=Uf({alignItems:d?"normal":t,flexDirection:u,flexWrap:l?"wrap":void 0,gap:Xm(i),justifyContent:a,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0},"","");return f(zm,e,d?Vm:Hm,n)}),[t,n,f,u,o,i,d,a,l]),isColumn:d}}var Jm=ju((function(e,t){const{children:n,isColumn:r,...o}=Zm(e);return(0,s.createElement)(Lm.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,s.createElement)(td,a({},o,{ref:t}),n))}),"Flex");const Qm={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function eh(e){return null!=e}function th(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(eh))&&void 0!==e?e:n}const nh=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,rh="…",oh={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},ih={ellipsis:rh,ellipsizeMode:oh.auto,limit:0,numberOfLines:0};function ah(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=eh(r)?r:rh;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}function sh(e){const{className:t,children:n,ellipsis:r=rh,ellipsizeMode:o=oh.auto,limit:i=0,numberOfLines:a=0,...l}=Hu(e,"Truncate"),c=Vu(),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n={...ih,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===oh.none)return e;let a,s;switch(o){case oh.head:a=0,s=i;break;case oh.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}return o!==oh.auto?ah(e,a,s,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),d=o===oh.auto;return{...l,className:(0,s.useMemo)((()=>c(d&&!a&&Qm,d&&!!a&&Uf("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),t)),[t,c,a,d]),children:u}}let lh;wp([xp]);const ch=sc()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&bp(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!lh){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),lh=e}return lh}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));function uh(e){const t=function(e){const t=ch(e);return bp(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const dh="36px",fh="12px",ph={controlSurfaceColor:Tp.white,controlTextActiveColor:Tp.ui.theme,controlPaddingX:fh,controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:Tp.white,controlBorderRadius:"2px",controlBoxShadow:"transparent",controlBoxShadowFocus:`0 0 0 0.5px ${Tp.ui.theme}`,controlDestructiveBorderColor:Tp.alert.red,controlHeight:dh,controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},mh={toggleGroupControlBackgroundColor:ph.controlBackgroundColor,toggleGroupControlBorderColor:Tp.ui.border,toggleGroupControlBackdropBackgroundColor:ph.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Tp.ui.border,toggleGroupControlButtonColorActive:ph.controlBackgroundColor};var hh=Object.assign({},ph,mh,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${Xm(2)}`,cardPaddingSmall:`${Xm(4)}`,cardPaddingMedium:`${Xm(4)} ${Xm(6)}`,cardPaddingLarge:`${Xm(6)} ${Xm(8)}`,surfaceBackgroundColor:Tp.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Tp.white,surfaceColor:Tp.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const gh=Uf("color:",Tp.gray[900],";line-height:",hh.fontLineHeightBase,";margin:0;",""),vh={name:"4zleql",styles:"display:block"},bh=Uf("color:",Tp.alert.green,";",""),yh=Uf("color:",Tp.alert.red,";",""),wh=Uf("color:",Tp.gray[700],";",""),xh=Uf("mark{background:",Tp.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),_h={name:"50zrmy",styles:"text-transform:uppercase"};var Eh=n(3138);const Ch=sc()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const kh={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},Sh=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function Th(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13;if(e in kh)return Th(kh[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}const t=`(${e} / 13)`;return`calc(${t} * ${hh.fontSize})`}function Nh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!Sh.includes(e))return Th(e);const t=`fontSizeH${e}`;return hh[t]}var Rh={name:"50zrmy",styles:"text-transform:uppercase"};function Ih(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:l,isDestructive:c=!1,display:u,highlightEscape:d=!1,highlightCaseSensitive:f=!1,highlightWords:p,highlightSanitize:m,isBlock:h=!1,letterSpacing:g,lineHeight:v,optimizeReadabilityFor:b,size:y,truncate:w=!1,upperCase:x=!1,variant:_,weight:E=hh.fontWeight,...C}=Hu(t,"Text");let k=o;const S=Array.isArray(p),T="caption"===y;if(S){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");k=function(e){let{activeClassName:t="",activeIndex:n=-1,activeStyle:r,autoEscape:o,caseSensitive:i=!1,children:a,findChunks:l,highlightClassName:c="",highlightStyle:u={},highlightTag:d="mark",sanitize:f,searchWords:p=[],unhighlightClassName:m="",unhighlightStyle:h}=e;if(!a)return null;if("string"!=typeof a)return a;const g=a,v=(0,Eh.findAll)({autoEscape:o,caseSensitive:i,findChunks:l,sanitize:f,searchWords:p,textToHighlight:g}),b=d;let y,w=-1,x="";const _=v.map(((e,o)=>{const a=g.substr(e.start,e.end-e.start);if(e.highlight){let e;w++,"object"==typeof c?i?e=c[a]:(c=Ch(c),e=c[a.toLowerCase()]):e=c;const l=w===+n;x=`${e} ${l?t:""}`,y=!0===l&&null!==r?Object.assign({},u,r):u;const d={children:a,className:x,key:o,style:y};return"string"!=typeof b&&(d.highlightIndex=w),(0,s.createElement)(b,d)}return(0,s.createElement)("span",{children:a,className:m,key:o,style:h})}));return _}({autoEscape:d,children:o,caseSensitive:f,searchWords:p,sanitize:m})}const N=Vu();let R;!0===w&&(R="auto"),!1===w&&(R="none");const I=sh({...C,className:(0,s.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${hh.controlHeight} + ${Xm(2)})`;switch(e){case"large":n=`calc(${hh.controlHeightLarge} + ${Xm(2)})`;break;case"small":n=`calc(${hh.controlHeightSmall} + ${Xm(2)})`;break;case"xSmall":n=`calc(${hh.controlHeightXSmall} + ${Xm(2)})`}return n}(n,v);if(t.Base=Uf({color:a,display:u,fontSize:Th(y),fontWeight:E,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=Rh,t.optimalTextColor=null,b){const e="dark"===uh(b);t.optimalTextColor=Uf(e?{color:Tp.gray[900]}:{color:Tp.white},"","")}return N(gh,t.Base,t.optimalTextColor,c&&yh,!!S&&xh,h&&vh,T&&wh,_&&e[_],x&&t.upperCase,i)}),[n,r,i,a,N,u,h,T,c,S,g,v,b,y,x,_,E]),children:o,ellipsizeMode:l||R});return!w&&Array.isArray(o)&&(k=s.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return Uu(e,["Link"])?(0,s.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...I,children:w?I.children:k}}var Mh=ju((function(e,t){const n=Ih(e);return(0,s.createElement)(td,a({as:"span"},n,{ref:t}))}),"Text");const Ph={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"},Oh=new RegExp(/-left/g),Dh=new RegExp(/-right/g),Ah=new RegExp(/Left/g),Lh=new RegExp(/Right/g);function zh(e){return"left"===e?"right":"right"===e?"left":Oh.test(e)?e.replace(Oh,"-right"):Dh.test(e)?e.replace(Dh,"-left"):Ah.test(e)?e.replace(Ah,"Right"):Lh.test(e)?e.replace(Lh,"Left"):e}const Bh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[zh(t),n]})))};function Fh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,u.isRTL)()?Uf(t,""):Uf(e,""):(0,u.isRTL)()?Uf(Bh(e),""):Uf(e,"")}Fh.watch=()=>(0,u.isRTL)();var Vh={name:"1739oy8",styles:"z-index:1"};const Hh=e=>{let{isFocused:t}=e;return t?Vh:""},jh=Qu(Jm,{target:"em5sgkm7"})("box-sizing:border-box;position:relative;border-radius:2px;padding-top:0;",Hh,";");var $h={name:"1d3w5wq",styles:"width:100%"};const Wh=Qu("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(e=>{let{disabled:t}=e;return Uf({backgroundColor:t?Tp.ui.backgroundDisabled:Tp.ui.background},"","")})," ",(e=>{let{__unstableInputWidth:t,labelPosition:n}=e;return t?"side"===n?"":Uf("edge"===n?{flex:`0 0 ${t}`}:{width:t},"",""):$h}),";"),Uh=e=>{let{inputSize:t,__next36pxDefaultSize:n}=e;const r={default:{height:36,lineHeight:1,minHeight:36,paddingLeft:Xm(4),paddingRight:Xm(4)},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Xm(2),paddingRight:Xm(2)},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Xm(4),paddingRight:Xm(4)}};return n||(r.default={height:30,lineHeight:1,minHeight:30,paddingLeft:Xm(2),paddingRight:Xm(2)}),r[t]||r.default},Gh=Qu("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Tp.gray[900],";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(e=>{let t,n,{isDragging:r,dragCursor:o}=e;return r&&(t=Uf("cursor:",o,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),r&&o&&(n=Uf("&:active{cursor:",o,";}","")),Uf(t," ",n,";","")})," ",(e=>{let{disabled:t}=e;return t?Uf({color:Tp.ui.textDisabled},"",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"},r=n[t]||n.default;return r?Uf("font-size:","16px",";@media ( min-width: 600px ){font-size:",r,";}",""):""})," ",(e=>Uf(Uh(e),"",""))," ",(e=>{let{paddingInlineStart:t,paddingInlineEnd:n}=e;return Uf({paddingInlineStart:t,paddingInlineEnd:n},"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),Yh=Qu(Mh,{target:"em5sgkm4"})("&&&{",Ph,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),qh=e=>(0,s.createElement)(Yh,a({},e,{as:"label"})),Kh=Qu(Wm,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),Xh=Qu("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(e=>{let t,{disabled:n,isFocused:r}=e,o=r?Tp.ui.borderFocus:Tp.ui.border;return r&&(t=`0 0 0 1px ${Tp.ui.borderFocus} inset`),n&&(o=Tp.ui.borderDisabled),Uf({boxShadow:t,borderColor:o,borderStyle:"solid",borderWidth:1},"","")})," ",Fh({paddingLeft:2}),";}"),Zh=Qu("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Jh=Qu("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Qh=(0,s.memo)((function(e){let{disabled:t=!1,isFocused:n=!1}=e;return(0,s.createElement)(Xh,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:t,isFocused:n})}));var eg=Qh;function tg(e){let{children:t,hideLabelFromVision:n,htmlFor:r,...o}=e;return t?n?(0,s.createElement)(nd,{as:"label",htmlFor:r},t):(0,s.createElement)(Kh,null,(0,s.createElement)(qh,a({htmlFor:r},o),t)):null}function ng(e,t){let{__next36pxDefaultSize:n,__unstableInputWidth:r,children:o,className:i,disabled:l=!1,hideLabelFromVision:c=!1,labelPosition:u,id:f,isFocused:p=!1,label:m,prefix:h,size:g="default",suffix:v,...b}=e;const y=function(e){const t=(0,d.useInstanceId)(ng);return e||`input-base-control-${t}`}(f),w=c||!m,{paddingLeft:x,paddingRight:_}=Uh({inputSize:g,__next36pxDefaultSize:n}),E=(0,s.useMemo)((()=>({InputControlPrefixWrapper:{paddingLeft:x},InputControlSuffixWrapper:{paddingRight:_}})),[x,_]);return(0,s.createElement)(jh,a({},b,function(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}(u),{className:i,gap:2,isFocused:p,labelPosition:u,ref:t}),(0,s.createElement)(tg,{className:"components-input-control__label",hideLabelFromVision:c,labelPosition:u,htmlFor:y},m),(0,s.createElement)(Wh,{__unstableInputWidth:r,className:"components-input-control__container",disabled:l,hideLabel:w,labelPosition:u},(0,s.createElement)(oc,{value:E},h&&(0,s.createElement)(Zh,{className:"components-input-control__prefix"},h),o,v&&(0,s.createElement)(Jh,{className:"components-input-control__suffix"},v)),(0,s.createElement)(eg,{disabled:l,isFocused:p})))}var rg=(0,s.forwardRef)(ng);const og={toVector(e,t){return void 0===e&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function ig(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function ag(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+ig(e-n,n-t,r)+n:e}function sg(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function lg(e,t,n){return(t=sg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ug(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function xg(e){const t=yg(e);return vg(e)?t.identifier:t.pointerId}function _g(e){const t=yg(e);return[t.clientX,t.clientY]}function Eg(e,...t){return"function"==typeof e?e(...t):e}function Cg(){}function kg(...e){return 0===e.length?Cg:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Sg(e,t){return Object.assign({},t,e||{})}class Tg{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Eg(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);og.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=s&&u[0]),!1===c[1]&&(c[1]=Math.abs(a)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===c[1]&&(c[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?a-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Eg(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[m,h]=t.offset,[[g,v],[b,y]]=t._bounds;t.overflow=[mv?1:0,hy?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[ag(t,i,a,r),ag(n,s,l,o)]}(t._bounds,t.offset,w),t.delta=og.sub(t.offset,f),this.computeMovement(),p&&(!t.last||o>32)){t.delta=og.sub(t.offset,f);const e=t.delta.map(Math.abs);og.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(ug(ug(ug({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class Ng extends Tg{constructor(...e){super(...e),lg(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=og.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=og.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[bg(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Rg=e=>e,Ig={enabled(e=!0){return e},eventOptions(e,t,n){return ug(ug({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return og.toVector(e)}},from(e){return"function"==typeof e?e:null!=e?og.toVector(e):void 0},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Rg},threshold(e){return og.toVector(e,0)}};const Mg=ug(ug({},Ig),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold(e=0){return e},bounds(e={}){if("function"==typeof e)return t=>Mg.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),Pg={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const Og="undefined"!=typeof window&&window.document&&window.document.createElement;function Dg(){return Og&&"ontouchstart"in window||Og&&window.navigator.maxTouchPoints>1}const Ag={isBrowser:Og,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:Dg(),touchscreen:Dg(),pointer:Og&&"onpointerdown"in window,pointerLock:Og&&"exitPointerLock"in window.document},Lg={mouse:0,touch:0,pen:8},zg=ug(ug({},Mg),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&Ag.pointerLock,Ag.touch&&n?"touch":this.pointerLock?"mouse":Ag.pointer&&!o?"pointer":Ag.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,Ag.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=og.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(og.toVector(e)),distance:this.transform(og.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold(e){return e?ug(ug({},Lg),e):Lg},keyboardDisplacement(e=10){return e}});ug(ug({},Ig),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Ag.touch&&Ag.gesture)return"gesture";if(Ag.touch&&r)return"touch";if(Ag.touchscreen){if(Ag.pointer)return"pointer";if(Ag.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=Sg(Eg(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=Sg(Eg(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return og.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return void 0===e?"ctrlKey":e},pinchOnWheel(e=!0){return e}});ug(ug({},Mg),{},{mouseOnly:(e=!0)=>e});const Bg=ug(ug({},Mg),{},{mouseOnly:(e=!0)=>e}),Fg=new Map,Vg=new Map;function Hg(e){Fg.set(e.key,e.engine),Vg.set(e.key,e.resolver)}const jg={key:"drag",engine:class extends Ng{constructor(...e){super(...e),lg(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Mg.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=xg(e),n._pointerActive=!0,this.computeValues(_g(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==bg(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const r=xg(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=_g(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=og.sub(o,t._values),this.computeValues(o)),og.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=xg(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,i]=t.velocity,[a,s]=t.movement,[l,c]=n.swipe.velocity,[u,d]=n.swipe.distance,f=n.swipe.duration;t.elapsedTimel&&Math.abs(a)>u&&(t.swipe[0]=e),Math.abs(i)>c&&Math.abs(s)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=Pg[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,og.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in Pg&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:zg},$g={key:"hover",engine:class extends Ng{constructor(...e){super(...e),lg(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(_g(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=_g(e);t._movement=t._delta=og.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:Bg};function Wg(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Ug={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=(Ag.isBrowser?window:void 0)){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Gg=["target","eventOptions","window","enabled","transform"];function Yg(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=Yg(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class qg{constructor(e,t){lg(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=dg[e];return e+(n&&n[t]||t)}(t,n),s=ug(ug({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class Kg{constructor(){lg(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class Xg{constructor(e){lg(this,"gestures",new Set),lg(this,"_targetEventStore",new qg(this)),lg(this,"gestureEventStores",{}),lg(this,"gestureTimeoutStores",{}),lg(this,"handlers",{}),lg(this,"config",{}),lg(this,"pointerIds",new Set),lg(this,"touchIds",new Set),lg(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&Zg(e,"drag");t.wheel&&Zg(e,"wheel");t.scroll&&Zg(e,"scroll");t.move&&Zg(e,"move");t.pinch&&Zg(e,"pinch");t.hover&&Zg(e,"hover")}(this,e)}setEventIds(e){return vg(e)?(this.touchIds=new Set(wg(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:a,enabled:s,transform:l}=r,c=Wg(r,Gg);if(n.shared=Yg({target:o,eventOptions:i,window:a,enabled:s,transform:l},Ug),t){const e=Vg.get(t);n[t]=Yg(ug({shared:n.shared},c),e)}else for(const e in c){const t=Vg.get(e);t&&(n[e]=Yg(ug({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=Jg(n,o.eventOptions,!!r);if(o.enabled){new(Fg.get(t))(this,e,t).bind(i)}}const o=Jg(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](ug(ug({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=kg(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=gg(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function Zg(e,t){e.gestures.add(t),e.gestureEventStores[t]=new qg(e,t),e.gestureTimeoutStores[t]=new Kg}const Jg=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,c;const u=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(c=a.passive)&&void 0!==c?c:t.passive;let f=s?r:mg(r,o,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Qg(e,t={},n,r){const o=y().useMemo((()=>new Xg(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),y().useEffect(o.effect.bind(o)),y().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}const ev=e=>e,tv={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},nv="CHANGE",rv="COMMIT",ov="CONTROL",iv="DRAG_END",av="DRAG_START",sv="DRAG",lv="INVALIDATE",cv="PRESS_DOWN",uv="PRESS_ENTER",dv="PRESS_UP",fv="RESET";function pv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tv;const{value:t}=e;return{...tv,...e,initialValue:t}}function mv(e){return(t,n)=>{const r={...t};switch(n.type){case ov:return r.value=n.payload.value,r.isDirty=!1,r._event=void 0,r;case dv:case cv:r.isDirty=!1;break;case av:r.isDragging=!0;break;case iv:r.isDragging=!1;break;case nv:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case rv:r.value=n.payload.value,r.isDirty=!1;break;case fv:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case lv:r.error=n.payload.error}return r._event=n.payload.event,e(r,n)}}const hv=()=>{};const gv=(0,s.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:l=!1,isFocused:c,isPressEnterToChange:u=!1,onBlur:d=hv,onChange:f=hv,onDrag:p=hv,onDragEnd:m=hv,onDragStart:h=hv,onFocus:g=hv,onKeyDown:v=hv,onValidate:b=hv,size:y="default",setIsFocused:w,stateReducer:x=(e=>e),value:_,type:E,...C}=e;const{state:k,change:S,commit:T,drag:N,dragEnd:R,dragStart:I,invalidate:M,pressDown:P,pressEnter:O,pressUp:D,reset:A}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ev,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tv,n=arguments.length>2?arguments[2]:void 0;const[r,o]=(0,s.useReducer)(mv(e),pv(t)),i=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},a=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},c=i(nv),u=(e,t)=>o({type:lv,payload:{error:e,event:t}}),d=i(fv),f=i(rv),p=l(av),m=l(sv),h=l(iv),g=a(dv),v=a(cv),b=a(uv),y=(0,s.useRef)(r),w=(0,s.useRef)({value:t.value,onChangeHandler:n});return(0,s.useLayoutEffect)((()=>{y.current=r,w.current={value:t.value,onChangeHandler:n}})),(0,s.useLayoutEffect)((()=>{var e;void 0===y.current._event||r.value===w.current.value||r.isDirty||w.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:y.current._event})}),[r.value,r.isDirty]),(0,s.useLayoutEffect)((()=>{var e;t.value===y.current.value||y.current.isDirty||o({type:ov,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:c,commit:f,dispatch:o,drag:m,dragEnd:h,dragStart:p,invalidate:u,pressDown:v,pressEnter:b,pressUp:g,reset:d,state:r}}(x,{isDragEnabled:l,value:_,isPressEnterToChange:u},f),{value:L,isDragging:z,isDirty:B}=k,F=(0,s.useRef)(!1),V=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,s.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(z,r),H=e=>{const t=e.currentTarget.value;try{b(t),T(t,e)}catch(t){M(t,e)}},j=($=e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return m(e),void R(e);p(e),N(e),z||(h(e),I(e))}},W={axis:"e"===r||"w"===r?"x":"y",threshold:o,enabled:l,pointer:{capture:!1}},Hg(jg),Qg({drag:$},W||{},"drag"));var $,W;const U=l?j():{};let G;return"number"===E&&(G=e=>{var t;null===(t=C.onMouseDown)||void 0===t||t.call(C,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,s.createElement)(Gh,a({},C,U,{className:"components-input-control__input",disabled:n,dragCursor:V,isDragging:z,id:i,onBlur:e=>{d(e),null==w||w(!1),!B&&e.target.validity.valid||(F.current=!0,H(e))},onChange:e=>{const t=e.target.value;S(t,e)},onFocus:e=>{g(e),null==w||w(!0)},onKeyDown:e=>{const{key:t}=e;switch(v(e),t){case"ArrowUp":D(e);break;case"ArrowDown":P(e);break;case"Enter":O(e),u&&(e.preventDefault(),H(e));break;case"Escape":u&&B&&(e.preventDefault(),A(_,e))}},onMouseDown:G,ref:t,inputSize:y,value:null!=L?L:"",type:E}))}));var vv=gv,bv={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function yv(e){return(0,ec.get)(bv,e,"")}const wv={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const xv=Qu("div",{target:"ej5x27r4"})("font-family:",yv("default.fontFamily"),";font-size:",yv("default.fontSize"),";",wv,";"),_v=Qu("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Uf("margin-bottom:",Xm(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),Ev=Uf(Ph,";display:inline-block;margin-bottom:",Xm(2),";padding:0;",""),Cv=Qu("label",{target:"ej5x27r2"})(Ev,";");var kv={name:"11yad0w",styles:"margin-bottom:revert"};const Sv=Qu("p",{target:"ej5x27r1"})("margin-top:",Xm(2),";margin-bottom:0;font-size:",yv("helpText.fontSize"),";font-style:normal;color:",Tp.gray[700],";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&kv}),";"),Tv=Qu("span",{target:"ej5x27r0"})(Ev,";"),Nv=e=>{let{__nextHasNoMarginBottom:t=!1,id:n,label:r,hideLabelFromVision:o=!1,help:i,className:a,children:l}=e;return(0,s.createElement)(xv,{className:c()("components-base-control",a)},(0,s.createElement)(_v,{className:"components-base-control__field",__nextHasNoMarginBottom:t},r&&n&&(o?(0,s.createElement)(nd,{as:"label",htmlFor:n},r):(0,s.createElement)(Cv,{className:"components-base-control__label",htmlFor:n},r)),r&&!n&&(o?(0,s.createElement)(nd,{as:"label"},r):(0,s.createElement)(Nv.VisualLabel,null,r)),l),!!i&&(0,s.createElement)(Sv,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},i))};Nv.VisualLabel=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)(Tv,a({},r,{className:c()("components-base-control__label",t)}),n)};var Rv=Nv;const Iv=()=>{};const Mv=(0,s.forwardRef)((function(e,t){let{__next36pxDefaultSize:n,__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:l=!1,help:u,hideLabelFromVision:f=!1,id:p,isPressEnterToChange:m=!1,label:h,labelPosition:g="top",onChange:v=Iv,onValidate:b=Iv,onKeyDown:y=Iv,prefix:w,size:x="default",style:_,suffix:E,value:C,...k}=e;const[S,T]=(0,s.useState)(!1),N=function(e){const t=(0,d.useInstanceId)(Mv);return e||`inspector-input-control-${t}`}(p),R=c()("components-input-control",i),I=function(e){const t=(0,s.useRef)(e.value),[n,r]=(0,s.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,s.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{var n;r({}),null===(n=e.onBlur)||void 0===n||n.call(e,t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:C,onBlur:k.onBlur,onChange:v}),M=u?{["string"==typeof u?"aria-describedby":"aria-details"]:`${N}__help`}:{};return(0,s.createElement)(Rv,{className:R,help:u,id:N,__nextHasNoMarginBottom:!0},(0,s.createElement)(rg,{__next36pxDefaultSize:n,__unstableInputWidth:o,disabled:l,gap:3,hideLabelFromVision:f,id:N,isFocused:S,justify:"left",label:h,labelPosition:g,prefix:w,size:x,style:_,suffix:E},(0,s.createElement)(vv,a({},k,M,{__next36pxDefaultSize:n,className:"components-input-control__input",disabled:l,id:N,isFocused:S,isPressEnterToChange:m,onKeyDown:y,onValidate:b,paddingInlineStart:w?Xm(2):void 0,paddingInlineEnd:E?Xm(2):void 0,ref:t,setIsFocused:T,size:x,stateReducer:r},I))))}));var Pv=Mv;var Ov={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const Dv=e=>{let{hideHTMLArrows:t}=e;return t?Ov:""},Av=Qu(Pv,{target:"ep09it41"})(Dv,";"),Lv=e=>{let{size:t}=e;return"small"!==t?"":Uf("width:",Xm(5),";min-width:",Xm(5),";height:",Xm(5),";","")},zv=Qu(id,{target:"ep09it40"})("&&&&&{color:",Tp.ui.theme,";",Lv,";}");function Bv(e){const t=Number(e);return isNaN(t)?0:t}function Fv(){for(var e=arguments.length,t=new Array(e),n=0;ne+Bv(t)),0)}function Vv(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Hv(e,t,n){const r=Bv(e);return Math.max(t,Math.min(r,n))}function jv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=Bv(e),i=Bv(r),a=Vv(r),s=Math.round(o/i)*i,l=Hv(s,t,n);return a?Bv(l.toFixed(a)):l}const $v={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},Wv={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function Uv(e){return"string"==typeof e?[e]:s.Children.toArray(e).filter((e=>(0,s.isValidElement)(e)))}function Gv(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Hu(e,"HStack"),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if(!eh(e))return{};const n="column"===t?Wv:$v;return e in n?n[e]:{align:e}}(t,r),c=Uv(n).map(((e,t)=>{if(Uu(e,["Spacer"])){const n=e,r=n.key||`hstack-${t}`;return(0,s.createElement)(Wm,a({isBlock:!0,key:r},n.props))}return e}));return Zm({children:c,direction:r,justify:"center",...l,...i,gap:o})}var Yv=ju((function(e,t){const n=Gv(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"HStack");const qv=e=>null!=e;const Kv=ju((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:f,paddingTop:p,paddingX:m,paddingY:h,...g}=Hu(e,"Spacer");return{...g,className:Vu()(qv(n)&&Uf("margin:",Xm(n),";",""),qv(l)&&Uf("margin-bottom:",Xm(l),";margin-top:",Xm(l),";",""),qv(s)&&Uf("margin-left:",Xm(s),";margin-right:",Xm(s),";",""),qv(a)&&Uf("margin-top:",Xm(a),";",""),qv(r)&&Uf("margin-bottom:",Xm(r),";",""),qv(o)&&Fh({marginLeft:Xm(o)})(),qv(i)&&Fh({marginRight:Xm(i)})(),qv(c)&&Uf("padding:",Xm(c),";",""),qv(h)&&Uf("padding-bottom:",Xm(h),";padding-top:",Xm(h),";",""),qv(m)&&Uf("padding-left:",Xm(m),";padding-right:",Xm(m),";",""),qv(p)&&Uf("padding-top:",Xm(p),";",""),qv(u)&&Uf("padding-bottom:",Xm(u),";",""),qv(d)&&Fh({paddingLeft:Xm(d)})(),qv(f)&&Fh({paddingRight:Xm(f)})(),t)}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Spacer");var Xv=Kv;const Zv=()=>{};const Jv=(0,s.forwardRef)((function(e,t){let{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:l="native",isDragEnabled:f=!0,isShiftStepEnabled:p=!0,label:m,max:h=1/0,min:g=-1/0,required:v=!1,shiftStep:b=10,step:y=1,type:w="number",value:x,size:_="default",suffix:E,onChange:C=Zv,...k}=e;i&&(Kl()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"}),l="none");const S=(0,s.useRef)(),T=(0,d.useMergeRefs)([S,t]),N="any"===y,R=N?1:nh(y),I=jv(0,g,h,R),M=(e,t)=>N?Math.min(h,Math.max(g,nh(e))):jv(e,g,h,null!=t?t:R),P="number"===w?"off":void 0,O=c()("components-number-control",r),D=(e,t,n)=>{null==n||n.preventDefault();const r=(null==n?void 0:n.shiftKey)&&p,o=r?nh(b)*R:R;let i=function(e){const t=""===e;return!eh(e)||t}(e)?I:e;return"up"===t?i=Fv(i,o):"down"===t&&(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=Bv(t);return 0===n?r:e-r}),0)}(i,o)),M(i,r?o:void 0)},A=e=>t=>C(String(D(x,e,t)),{event:{...t,target:S.current}});return(0,s.createElement)(Av,a({autoComplete:P,inputMode:"numeric"},k,{className:O,dragDirection:o,hideHTMLArrows:"native"!==l,isDragEnabled:f,label:m,max:h,min:g,ref:T,required:v,step:y,type:w,value:x,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,a=i.event,s=n.value;if(r!==dv&&r!==cv||(n.value=D(s,r===dv?"up":"down",a)),r===sv&&f){const[e,t]=i.delta,r=i.shiftKey&&p,a=r?nh(b)*R:R;let l,c;switch(o){case"n":c=t,l=-1;break;case"e":c=e,l=(0,u.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,u.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=M(Fv(s,e),r?a:void 0)}}if(r===uv||r===rv){const e=!1===v&&""===s;n.value=e?s:M(s)}return n})(e,t);return null!==(r=null==n?void 0:n(i,t))&&void 0!==r?r:i},size:_,suffix:"custom"===l?(0,s.createElement)(s.Fragment,null,E,(0,s.createElement)(Xv,{marginBottom:0,marginRight:2},(0,s.createElement)(Yv,{spacing:1},(0,s.createElement)(zv,{icon:Um,isSmall:!0,"aria-hidden":"true","aria-label":(0,u.__)("Increment"),tabIndex:-1,onClick:A("up"),size:_}),(0,s.createElement)(zv,{icon:Gm,isSmall:!0,"aria-hidden":"true","aria-label":(0,u.__)("Decrement"),tabIndex:-1,onClick:A("down"),size:_})))):E,onChange:C}))}));var Qv=Jv;const eb=e=>{let{__nextHasNoMarginBottom:t}=e;return t?"":Uf("margin-bottom:",Xm(2),";","")},tb=Qu(Jm,{target:"e65ony43"})(eb,";"),nb=Qu("div",{target:"e65ony42"})("border-radius:50%;border:",hh.borderWidth," solid ",Tp.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),rb=Qu("div",{target:"e65ony41"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),ob=Qu("div",{target:"e65ony40"})("background:",Tp.ui.theme,";border-radius:50%;border:",3,"px solid ",Tp.ui.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");var ib=function(e){let{value:t,onChange:n,...r}=e;const o=(0,s.useRef)(),i=(0,s.useRef)(),l=(0,s.useRef)(),c=e=>{const{x:t,y:r}=i.current;e.preventDefault(),e.target.focus(),n(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(t,r,e.clientX,e.clientY))},{startDrag:u,isDragging:f}=(0,d.__experimentalUseDragging)({onDragStart:e=>{(()=>{const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),c(e)},onDragMove:c,onDragEnd:c});return(0,s.useEffect)((()=>{f?(void 0===l.current&&(l.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=l.current||null,l.current=void 0)}),[f]),(0,s.createElement)(nb,a({ref:o,onMouseDown:u,className:"components-angle-picker-control__angle-circle",style:f?{cursor:"grabbing"}:void 0},r),(0,s.createElement)(rb,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,s.createElement)(ob,{className:"components-angle-picker-control__angle-circle-indicator"})))};function ab(e){let{__nextHasNoMarginBottom:t=!1,className:n,label:r=(0,u.__)("Angle"),onChange:o,value:i}=e;t||Kl()("Bottom margin styles for wp.components.AnglePickerControl",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const a=c()("components-angle-picker-control",n);return(0,s.createElement)(tb,{__nextHasNoMarginBottom:t,className:a,gap:4},(0,s.createElement)($m,null,(0,s.createElement)(Qv,{label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;o(t)},size:"__unstable-large",step:"1",value:i,spinControls:"none",suffix:(0,s.createElement)(Xv,{as:Mh,marginBottom:0,marginRight:Xm(3),style:{color:Tp.ui.theme}},"°")})),(0,s.createElement)(Wm,{style:{marginBottom:Xm(1),marginTop:"auto"}},(0,s.createElement)(ib,{"aria-hidden":"true",value:i,onChange:o})))}var sb=n(4793),lb=n.n(sb),cb=window.wp.richText,ub=window.wp.a11y;const db=new RegExp(`[${["-","~","­","֊","־","᐀","᠆","‐","‑","‒","–","—","―","⁓","⁻","₋","−","⸗","⸺","⸻","〜","〰","゠","︱","︲","﹘","﹣","-"].join("")}]`,"g"),fb=e=>lb()(e).toLocaleLowerCase().replace(db,"-");function pb(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function mb(e){return t=>{const[n,r]=(0,s.useState)([]);return(0,s.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,d.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+pb(t),"i");r(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=[];for(let o=0;oe.test(lb()(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}function hb(e){const t=e.useItems?e.useItems:mb(e);return function(e){let{filterValue:n,instanceId:r,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:l,onSelect:u,onReset:d,reset:f,value:p,contentRef:m}=e;const[h]=t(n),g=(0,cb.useAnchor)({editableContentElement:m.current,value:p}),v=(0,s.useRef)();return function(e,t){(0,s.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[t])}(v,f),(0,s.useLayoutEffect)((()=>{l(h)}),[h]),!h.length>0?null:(0,s.createElement)(Pf,{focusOnMount:!1,onClose:d,placement:"top-start",className:"components-autocomplete__popover",anchor:g,ref:v},(0,s.createElement)("div",{id:o,role:"listbox",className:"components-autocomplete__results"},h.map(((e,t)=>(0,s.createElement)(id,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>u(e)},e.label)))))}}function gb(e){let{record:t,onChange:n,onReplace:r,completers:o,contentRef:i}=e;const a=(0,d.useDebounce)(ub.speak,500),l=(0,d.useInstanceId)(gb),[c,f]=(0,s.useState)(0),[p,m]=(0,s.useState)([]),[h,g]=(0,s.useState)(""),[v,b]=(0,s.useState)(null),[y,w]=(0,s.useState)(null),x=(0,s.useRef)(!1);function _(e){const{getOptionCompletion:o}=v||{};if(!e.isDisabled){if(o){const i=o(e.value,h),{action:a,value:l}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void r([l]);"insert-at-caret"===a&&function(e){const r=t.start,o=r-v.triggerPrefix.length-h.length,i=(0,cb.create)({html:(0,s.renderToString)(e)});n((0,cb.insert)(t,i,o,r))}(l)}E()}}function E(){f(0),m([]),g(""),b(null),w(null)}const C=(0,s.useMemo)((()=>{if((0,cb.isCollapsed)(t))return(0,cb.getTextContent)((0,cb.slice)(t,0))}),[t]);(0,s.useEffect)((()=>{if(!C)return void E();const e=lb()(C),n=(0,cb.getTextContent)((0,cb.slice)(t,void 0,(0,cb.getTextContent)(t).length)),r=null==o?void 0:o.find((t=>{let{triggerPrefix:r,allowContext:o}=t;const i=e.lastIndexOf(r);if(-1===i)return!1;const a=e.slice(i+r.length);if(a.length>50)return!1;const s=0===p.length,l=1===a.split(/\s/).length,c=x.current&&a.split(/\s/).length<=3;return!(s&&!c&&!l)&&(!(o&&!o(e.slice(0,i),n))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)))}));if(!r)return void E();const i=pb(r.triggerPrefix),a=e.slice(e.lastIndexOf(r.triggerPrefix)).match(new RegExp(`${i}([\0-￿]*)$`)),s=a&&a[1];b(r),w((()=>r!==v?hb(r):y)),g(s)}),[C]);const{key:k=""}=p[c]||{},{className:S}=v||{},T=!!v&&p.length>0,N=T?`components-autocomplete-listbox-${l}`:null;return{listBoxId:N,activeId:T?`components-autocomplete-item-${l}-${k}`:null,onKeyDown:function(e){if(x.current="Backspace"===e.key,v&&0!==p.length&&!e.defaultPrevented&&!e.isComposing&&229!==e.keyCode){switch(e.key){case"ArrowUp":f((0===c?p.length:c)-1);break;case"ArrowDown":f((c+1)%p.length);break;case"Escape":b(null),w(null),e.preventDefault();break;case"Enter":_(p[c]);break;case"ArrowLeft":case"ArrowRight":return void E();default:return}e.preventDefault()}},popover:void 0!==t.start&&y&&(0,s.createElement)(y,{className:S,filterValue:h,instanceId:l,listBoxId:N,selectedIndex:c,onChangeOptions:function(e){f(e.length===p.length?c:0),m(e),function(e){a&&(e.length?a((0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):a((0,u.__)("No results."),"assertive"))}(e)},onSelect:_,value:t,contentRef:i,reset:E})}}function vb(e){const[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(),o=(0,s.useRef)(),i=(0,s.useRef)(),{popover:a,listBoxId:l,activeId:c,onKeyDown:u}=gb({...e,contentRef:r});i.current=u,(0,s.useEffect)((()=>{t&&(o.current?o.current.start===e.record.start&&o.current.end===e.record.end||(n(!1),o.current=null):o.current=e.record)}),[e.record]);const f=(0,d.useMergeRefs)([r,(0,d.useRefEffect)((e=>{function t(e){i.current(e)}function r(){n(!0),o.current=null}return e.addEventListener("keydown",t),e.addEventListener("input",r),()=>{e.removeEventListener("keydown",t),e.removeEventListener("input",r)}}),[])]);return t?{ref:f,children:a,"aria-autocomplete":l?"list":void 0,"aria-owns":l,"aria-activedescendant":c}:{ref:f}}function bb(e){let{children:t,isSelected:n,...r}=e;const{popover:o,...i}=gb(r);return(0,s.createElement)(s.Fragment,null,t(i),n&&o)}function yb(e){const{help:t,id:n,...r}=e,o=(0,d.useInstanceId)(Rv,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{["string"==typeof t?"aria-describedby":"aria-details"]:`${o}__help`}:{}}}}var wb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var xb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const _b=Uf("",""),Eb={name:"bjn8wh",styles:"position:relative"},Cb=e=>{const{color:t=Tp.gray[200],style:n="solid",width:r=hh.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==hh.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},kb={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Sb(e){const{className:t,size:n="default",...r}=Hu(e,"BorderBoxControlLinkedButton"),o=Vu();return{...r,className:(0,s.useMemo)((()=>o((e=>Uf("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Fh({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}var Tb=ju(((e,t)=>{const{className:n,isLinked:r,...o}=Sb(e),i=r?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,s.createElement)(Ff,{text:i},(0,s.createElement)(td,{className:n},(0,s.createElement)(id,a({},o,{isSmall:!0,icon:r?wb:xb,iconSize:24,"aria-label":i,ref:t}))))}),"BorderBoxControlLinkedButton");function Nb(e){const{className:t,value:n,size:r="default",...o}=Hu(e,"BorderBoxControlVisualizer"),i=Vu(),a=(0,s.useMemo)((()=>i(((e,t)=>Uf("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",Cb(null==e?void 0:e.top),";border-bottom:",Cb(null==e?void 0:e.bottom),";",Fh({borderLeft:Cb(null==e?void 0:e.left)})()," ",Fh({borderRight:Cb(null==e?void 0:e.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:a,value:n}}var Rb=ju(((e,t)=>{const{value:n,...r}=Nb(e);return(0,s.createElement)(td,a({},r,{ref:t}))}),"BorderBoxControlVisualizer");var Ib=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var Mb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 11.25h14v1.5H5z"}));var Pb=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var Ob=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const Db=Qu(Qv,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",Xh,"{transition:box-shadow 0.1s linear;}}"),Ab=e=>{let{selectSize:t}=e;const n={default:Uf("box-sizing:border-box;padding:2px 1px;width:20px;color:",Tp.gray[800],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),large:Uf("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",Xm(2),";padding:",Xm(1),";color:",Tp.ui.theme,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")};return"__unstable-large"===t?n.large:n.default},Lb=Qu("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",Ab,";color:",Tp.gray[900],";}"),zb=Qu("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",Ab,";",(e=>{let{selectSize:t="default"}=e;const n={default:Uf("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Fh({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",Tp.gray[100],";}&:focus{border:1px solid ",Tp.ui.borderFocus,";box-shadow:inset 0 0 0 ",hh.borderWidth+" "+Tp.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),large:Uf("display:flex;justify-content:center;align-items:center;&:hover{color:",Tp.ui.borderFocus,";box-shadow:inset 0 0 0 ",hh.borderWidth+" "+Tp.ui.borderFocus,";outline:",hh.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",hh.borderWidthFocus+" "+Tp.ui.borderFocus,";outline:",hh.borderWidthFocus," solid transparent;}","")};return"__unstable-large"===t?n.large:n.default}),";&:not( :disabled ){cursor:pointer;}}");const Bb={name:"f3vz0n",styles:"font-weight:500"},Fb=Uf("box-shadow:inset 0 0 0 ",hh.borderWidth," ",Tp.ui.borderFocus,";",""),Vb=Uf("border:0;padding:0;margin:0;",wv,";",""),Hb=Uf(Db,"{flex:0 0 auto;}",""),jb=(e,t)=>{const{style:n}=e||{};return Uf("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?Tp.gray[300]:void 0;return Uf("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",Xm(4),";width:",Xm(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},$b=Uf("width:",228,"px;>div:first-of-type>",Cv,"{margin-bottom:0;",Bb,";}&& ",Cv,"+button:not( .has-text ){min-width:24px;padding:0;}",""),Wb=Uf("",""),Ub=Uf("",""),Gb=Uf("justify-content:center;width:100%;&&{border-top:",hh.borderWidth," solid ",Tp.gray[200],";border-top-left-radius:0;border-top-right-radius:0;height:46px;}",""),Yb=Uf(Cv,"{",Bb,";}",""),qb={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const Kb=[{label:(0,u.__)("Solid"),icon:Mb,value:"solid"},{label:(0,u.__)("Dashed"),icon:Pb,value:"dashed"},{label:(0,u.__)("Dotted"),icon:Ob,value:"dotted"}],Xb=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"label"},t):(0,s.createElement)(Cv,null,t):null};var Zb=ju(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:r,label:o,onChange:i,value:l,...c}=function(e){const{className:t,...n}=Hu(e,"BorderControlStylePicker"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(Yb,t)),[t,r]),buttonClassName:(0,s.useMemo)((()=>r(qb)),[r])}}(e);return(0,s.createElement)(td,a({},c,{ref:t}),(0,s.createElement)(Xb,{label:o,hideLabelFromVision:r}),(0,s.createElement)(Jm,{justify:"flex-start",gap:1},Kb.map((e=>(0,s.createElement)(id,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===l,onClick:()=>i(e.value===l?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker");var Jb=(0,s.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,s.createElement)("span",a({className:c()("component-color-indicator",n),style:{background:r},ref:t},o))})),Qb=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ey=function(e){return.2126*Qb(e.r)+.7152*Qb(e.g)+.0722*Qb(e.b)};function ty(e){e.prototype.luminance=function(){return e=ey(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,r,o,i,a,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(s=ey(i))>(l=ey(a))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}const ny=(0,s.forwardRef)((function(e,t){let{renderContent:n,renderToggle:r,className:o,contentClassName:i,expandOnMobile:l,headerTitle:u,focusOnMount:f,popoverProps:p,onClose:m,onToggle:h,style:g,position:v}=e;void 0!==v&&Kl()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[b,y]=(0,s.useState)(null),w=(0,s.useRef)(),[x,_]=function(e,t){const[n,r]=(0,s.useState)(e);return[n,e=>{r(e),t&&t(e)}]}(!1,h);function E(){m&&m(),_(!1)}(0,s.useEffect)((()=>()=>{h&&x&&h(!1)}),[h,x]);const C={isOpen:x,onToggle:function(){_(!x)},onClose:E},k=!!(null!=p&&p.anchor||null!=p&&p.anchorRef||null!=p&&p.getAnchorRect||null!=p&&p.anchorRect);return(0,s.createElement)("div",{className:c()("components-dropdown",o),ref:(0,d.useMergeRefs)([w,t,y]),tabIndex:-1,style:g},r(C),x&&(0,s.createElement)(Pf,a({position:v,onClose:E,onFocusOutside:function(){var e;if(!w.current)return;const{ownerDocument:t}=w.current,n=null==t||null===(e=t.activeElement)||void 0===e?void 0:e.closest('[role="dialog"]');w.current.contains(t.activeElement)||n&&!n.contains(w.current)||E()},expandOnMobile:l,headerTitle:u,focusOnMount:f,offset:13,anchor:k?void 0:b},p,{className:c()("components-dropdown__content",null==p?void 0:p.className,i)}),n(C)))}));var ry=ny;var oy=ju((function(e,t){const n=Hu(e,"InputControlSuffixWrapper");return(0,s.createElement)(Xv,a({marginBottom:0},n,{ref:t}))}),"InputControlSuffixWrapper");const iy=Qu("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Tp.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;",(e=>{let{disabled:t}=e;return t?Uf({color:Tp.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t="default"}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"}[t];return n?Uf("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:r="default"}=e;if(n)return;const o={default:{height:36,minHeight:36,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};t||(o.default={height:30,minHeight:30,paddingTop:0,paddingBottom:0});return Uf(o[r]||o.default,"","")}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:r="default"}=e;const o={default:16,small:8,"__unstable-large":16};t||(o.default=8);const i=o[r]||o.default;return Fh({paddingLeft:i,paddingRight:i+18,...n?{paddingTop:i,paddingBottom:i}:{}})}),";",(e=>{let{multiple:t}=e;return{overflow:t?"auto":"hidden"}}),";}"),ay=Qu("div",{target:"e1mv6sxx1"})("margin-inline-end:",Xm(-1),";line-height:0;"),sy=Qu(oy,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Fh({right:0}),";");var ly=function(e){let{icon:t,size:n=24,...r}=e;return(0,s.cloneElement)(t,{width:n,height:n,...r})};var cy=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));var uy=()=>(0,s.createElement)(sy,null,(0,s.createElement)(ay,null,(0,s.createElement)(ly,{icon:cy,size:18})));const dy=()=>{};const fy=(0,s.forwardRef)((function(e,t){let{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:l,label:u,multiple:f=!1,onBlur:p=dy,onChange:m=dy,onFocus:h=dy,options:g=[],size:v="default",value:b,labelPosition:y="top",children:w,prefix:x,suffix:_,__next36pxDefaultSize:E=!1,__nextHasNoMarginBottom:C=!1,...k}=e;const[S,T]=(0,s.useState)(!1),N=function(e){const t=(0,d.useInstanceId)(fy);return e||`inspector-select-control-${t}`}(l),R=o?`${N}__help`:void 0;if(!(null!=g&&g.length||w))return null;const I=c()("components-select-control",n);return(0,s.createElement)(Rv,{help:o,id:N,__nextHasNoMarginBottom:C},(0,s.createElement)(rg,{className:I,disabled:r,hideLabelFromVision:i,id:N,isFocused:S,label:u,size:v,suffix:_||!f&&(0,s.createElement)(uy,null),prefix:x,labelPosition:y,__next36pxDefaultSize:E},(0,s.createElement)(iy,a({},k,{__next36pxDefaultSize:E,"aria-describedby":R,className:"components-select-control__input",disabled:r,id:N,multiple:f,onBlur:e=>{p(e),T(!1)},onChange:e=>{if(f){const t=Array.from(e.target.options).filter((e=>{let{selected:t}=e;return t})),n=t.map((e=>{let{value:t}=e;return t}));m(n)}else m(e.target.value,{event:e})},onFocus:e=>{h(e),T(!0)},ref:t,selectSize:v,value:b}),w||g.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,s.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))}));var py=fy;const my={initial:void 0,fallback:""};var hy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:my;const{initial:n,fallback:r}={...my,...t},[o,i]=(0,s.useState)(e),a=eh(e);(0,s.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]);const l=th([e,o,n],r),c=(0,s.useCallback)((e=>{a||i(e)}),[a]);return[l,c]};function gy(e,t,n){return"number"!=typeof e?null:parseFloat(`${Hv(e,t,n)}`)}const vy=()=>Uf({height:30,minHeight:30},"",""),by=12,yy=Qu("div",{target:"e1epgpqk14"})({name:"1se47kl",styles:"-webkit-tap-highlight-color:transparent;align-items:flex-start;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),wy=Qu("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=Tp.ui.borderFocus}=e;return Uf({color:t},"","")}),";",vy,";",(e=>{let{marks:t,__nextHasNoMarginBottom:n}=e;return n?"":Uf({marginBottom:t?16:void 0},"","")}),";"),xy=Qu("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Fh({marginRight:6}),";"),_y=Qu("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Fh({marginLeft:6}),";"),Ey=Qu("span",{target:"e1epgpqk10"})("background-color:",Tp.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||"";return t&&(r=Tp.ui.backgroundDisabled),Uf({background:r},"","")}),";"),Cy=Qu("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=Tp.gray[400]),Uf({background:r},"","")}),";"),ky=Qu("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),Sy=Qu("span",{target:"e1epgpqk7"})("height:",by,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":Tp.gray[300];return t&&(r=Tp.gray[400]),Uf({backgroundColor:r},"","")}),";"),Ty=Qu("span",{target:"e1epgpqk6"})("color:",Tp.gray[300],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return Uf({color:t?Tp.gray[700]:Tp.gray[300]},"","")}),";"),Ny=e=>{let{disabled:t}=e;return Uf("background-color:",t?Tp.gray[400]:Tp.ui.theme,";","")},Ry=Qu("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",by,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",by,"px;border-radius:50%;",Ny,";",Fh({marginLeft:-10}),";",Fh({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Iy=Qu("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",Ny,";",(e=>{let{isFocused:t}=e;return t?Uf("&::before{content:' ';position:absolute;background-color:",Tp.ui.theme,";opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),My=Qu("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",by,"px );");var Py={name:"1cypxip",styles:"top:-80%"},Oy={name:"1lr98c4",styles:"bottom:-80%"};const Dy=Qu("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return Uf({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?Oy:Py}),";",Np("transition"),";",Fh({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),Ay=Qu(Qv,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;width:",Xm(16),"!important;input[type='number']&{",vy,";}",Fh({marginLeft:`${Xm(4)} !important`}),";"),Ly=Qu("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",vy,";}",Fh({marginLeft:8}),";");var zy=(0,s.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,s.createElement)(My,a({},i,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o}))}));function By(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,l=c()("components-range-control__mark",n&&"is-filled",t),u=c()("components-range-control__mark-label",n&&"is-filled");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Sy,a({},i,{"aria-hidden":"true",className:l,isFilled:n,style:o})),r&&(0,s.createElement)(Ty,{"aria-hidden":"true",className:u,isFilled:n,style:o},r))}function Fy(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0,...c}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ey,a({disabled:t},c)),n&&(0,s.createElement)(Vy,{disabled:t,marks:n,min:r,max:o,step:i,value:l}))}function Vy(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0}=e,c=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const a=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(a/o);for(;e>t.push({value:o*t.length+n}););}const s=[];return t.forEach(((e,t)=>{if(e.valuer)return;const o=`mark-${t}`,l=e.value<=i,c=(e.value-n)/a*100+"%",d={[(0,u.isRTL)()?"right":"left"]:c};s.push({...e,isFilled:l,key:o,style:d})})),s}({marks:n,min:r,max:o,step:"any"===i?1:i,value:l});return(0,s.createElement)(ky,{"aria-hidden":"true",className:"components-range-control__marks"},c.map((e=>(0,s.createElement)(By,a({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function Hy(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:l=0,renderTooltipContent:u=(e=>e),zIndex:d=100,...f}=e,p=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,s.useState)(),i=(0,s.useCallback)((()=>{t&&t.current&&o(n)}),[n,t]);return(0,s.useEffect)((()=>{i()}),[i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),m=c()("components-simple-tooltip",t),h={...i,zIndex:d};return(0,s.createElement)(Dy,a({},f,{"aria-hidden":o,className:m,position:p,show:o,role:"tooltip",style:h}),u(l))}const jy=()=>{};const $y=(0,s.forwardRef)((function e(t,n){var r;const{__nextHasNoMarginBottom:o=!1,afterIcon:i,allowReset:l=!1,beforeIcon:f,className:p,color:m=Tp.ui.theme,currentInput:h,disabled:g=!1,help:v,hideLabelFromVision:b=!1,initialPosition:y,isShiftStepEnabled:w=!0,label:x,marks:_=!1,max:E=100,min:C=0,onBlur:k=jy,onChange:S=jy,onFocus:T=jy,onMouseLeave:N=jy,onMouseMove:R=jy,railColor:I,renderTooltipContent:M=(e=>e),resetFallbackValue:P,shiftStep:O=10,showTooltip:D,step:A=1,trackColor:L,value:z,withInputField:B=!0,...F}=t,[V,H]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,a]=hy(gy(r,t,n),{initial:gy(null!=o?o:null,t,n),fallback:null});return[i,(0,s.useCallback)((e=>{a(null===e?null:gy(e,t,n))}),[t,n,a])]}({min:C,max:E,value:null!=z?z:null,initial:y}),j=(0,s.useRef)(!1);let $=D,W=B;"any"===A&&($=!1,W=!1);const[U,G]=(0,s.useState)($),[Y,q]=(0,s.useState)(!1),K=(0,s.useRef)(),X=null===(r=K.current)||void 0===r?void 0:r.matches(":focus"),Z=!g&&Y,J=null===V,Q=J?"":void 0!==V?V:h,ee=J?(E-C)/2+C:V,te=`${Hv(J?50:(V-C)/(E-C)*100,0,100)}%`,ne=c()("components-range-control",p),re=c()("components-range-control__wrapper",!!_&&"is-marked"),oe=(0,d.useInstanceId)(e,"inspector-range-control"),ie=v?`${oe}__help`:void 0,ae=!1!==$&&Number.isFinite(V),se=()=>{let e=parseFloat(`${P}`),t=e;isNaN(e)&&(e=null,t=void 0),H(e),S(t)},le={[(0,u.isRTL)()?"right":"left"]:te};return(0,s.createElement)(Rv,{__nextHasNoMarginBottom:o,className:ne,label:x,hideLabelFromVision:b,id:`${oe}`,help:v},(0,s.createElement)(yy,{className:"components-range-control__root"},f&&(0,s.createElement)(xy,null,(0,s.createElement)(Zl,{icon:f})),(0,s.createElement)(wy,{__nextHasNoMarginBottom:o,className:re,color:m,marks:!!_},(0,s.createElement)(zy,a({},F,{className:"components-range-control__slider",describedBy:ie,disabled:g,id:`${oe}`,label:x,max:E,min:C,onBlur:e=>{k(e),q(!1),G(!1)},onChange:e=>{const t=parseFloat(e.target.value);H(t),S(t)},onFocus:e=>{T(e),q(!0),G(!0)},onMouseMove:R,onMouseLeave:N,ref:(0,d.useMergeRefs)([K,n]),step:A,value:null!=Q?Q:void 0})),(0,s.createElement)(Fy,{"aria-hidden":!0,disabled:g,marks:_,max:E,min:C,railColor:I,step:A,value:ee}),(0,s.createElement)(Cy,{"aria-hidden":!0,className:"components-range-control__track",disabled:g,style:{width:te},trackColor:L}),(0,s.createElement)(Ry,{style:le,disabled:g},(0,s.createElement)(Iy,{"aria-hidden":!0,isFocused:Z,disabled:g})),ae&&(0,s.createElement)(Hy,{className:"components-range-control__tooltip",inputRef:K,tooltipPosition:"bottom",renderTooltipContent:M,show:X||U,style:le,value:V})),i&&(0,s.createElement)(_y,null,(0,s.createElement)(Zl,{icon:i})),W&&(0,s.createElement)(Ay,{"aria-label":x,className:"components-range-control__number",disabled:g,inputMode:"decimal",isShiftStepEnabled:w,max:E,min:C,onBlur:()=>{j.current&&(se(),j.current=!1)},onChange:e=>{let t=parseFloat(e);H(t),isNaN(t)?l&&(j.current=!0):((tE)&&(t=gy(t,C,E)),S(t),j.current=!1)},shiftStep:O,step:A,value:Q}),l&&(0,s.createElement)(Ly,null,(0,s.createElement)(id,{className:"components-range-control__reset",disabled:g||void 0===V,variant:"secondary",isSmall:!0,onClick:se},(0,u.__)("Reset")))))}));var Wy=$y;const Uy=Qu(Qv,{target:"ez9hsf47"})(Wh,"{width:",Xm(24),";}"),Gy=Qu(py,{target:"ez9hsf46"})("margin-left:",Xm(-2),";width:5em;",Xh,"{display:none;}"),Yy=Qu(Wy,{target:"ez9hsf45"})("flex:1;margin-right:",Xm(2),";"),qy=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${Xm(2)} );\n\tmargin-left: ${Xm(1)};\n}`,Ky=Qu("div",{target:"ez9hsf44"})("padding-top:",Xm(2),";padding-right:0;padding-left:0;padding-bottom:0;"),Xy=Qu(Yv,{target:"ez9hsf43"})("padding-left:",Xm(4),";padding-right:",Xm(4),";"),Zy=Qu(Jm,{target:"ez9hsf42"})("padding-top:",Xm(4),";padding-left:",Xm(4),";padding-right:",Xm(3),";padding-bottom:",Xm(5),";"),Jy=Qu("div",{target:"ez9hsf41"})(wv,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;overflow:hidden;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",Xm(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",Xm(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",hh.borderWidthFocus," #fff;}",qy,";"),Qy=Qu(id,{target:"ez9hsf40"})("&&&&&{min-width:",Xm(6),";padding:0;>svg{margin-right:0;}}");var ew=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function tw(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function nw(e){return e instanceof tw(e).Element||e instanceof Element}function rw(e){return e instanceof tw(e).HTMLElement||e instanceof HTMLElement}function ow(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tw(e).ShadowRoot||e instanceof ShadowRoot)}var iw=Math.max,aw=Math.min,sw=Math.round;function lw(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function cw(){return!/^((?!chrome|android).)*safari/i.test(lw())}function uw(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&rw(e)&&(o=e.offsetWidth>0&&sw(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&sw(r.height)/e.offsetHeight||1);var a=(nw(e)?tw(e):window).visualViewport,s=!cw()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function dw(e){var t=tw(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fw(e){return e?(e.nodeName||"").toLowerCase():null}function pw(e){return((nw(e)?e.ownerDocument:e.document)||window.document).documentElement}function mw(e){return uw(pw(e)).left+dw(e).scrollLeft}function hw(e){return tw(e).getComputedStyle(e)}function gw(e){var t=hw(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function vw(e,t,n){void 0===n&&(n=!1);var r=rw(t),o=rw(t)&&function(e){var t=e.getBoundingClientRect(),n=sw(t.width)/e.offsetWidth||1,r=sw(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=pw(t),a=uw(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==fw(t)||gw(i))&&(s=function(e){return e!==tw(e)&&rw(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:dw(e);var t}(t)),rw(t)?((l=uw(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=mw(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function bw(e){var t=uw(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function yw(e){return"html"===fw(e)?e:e.assignedSlot||e.parentNode||(ow(e)?e.host:null)||pw(e)}function ww(e){return["html","body","#document"].indexOf(fw(e))>=0?e.ownerDocument.body:rw(e)&&gw(e)?e:ww(yw(e))}function xw(e,t){var n;void 0===t&&(t=[]);var r=ww(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=tw(r),a=o?[i].concat(i.visualViewport||[],gw(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(xw(yw(a)))}function _w(e){return["table","td","th"].indexOf(fw(e))>=0}function Ew(e){return rw(e)&&"fixed"!==hw(e).position?e.offsetParent:null}function Cw(e){for(var t=tw(e),n=Ew(e);n&&_w(n)&&"static"===hw(n).position;)n=Ew(n);return n&&("html"===fw(n)||"body"===fw(n)&&"static"===hw(n).position)?t:n||function(e){var t=/firefox/i.test(lw());if(/Trident/i.test(lw())&&rw(e)&&"fixed"===hw(e).position)return null;var n=yw(e);for(ow(n)&&(n=n.host);rw(n)&&["html","body"].indexOf(fw(n))<0;){var r=hw(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var kw="top",Sw="bottom",Tw="right",Nw="left",Rw="auto",Iw=[kw,Sw,Tw,Nw],Mw="start",Pw="end",Ow="viewport",Dw="popper",Aw=Iw.reduce((function(e,t){return e.concat([t+"-"+Mw,t+"-"+Pw])}),[]),Lw=[].concat(Iw,[Rw]).reduce((function(e,t){return e.concat([t,t+"-"+Mw,t+"-"+Pw])}),[]),zw=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Bw(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Fw={placement:"bottom",modifiers:[],strategy:"absolute"};function Vw(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Yw(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Ww(o):null,a=o?Uw(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case kw:t={x:s,y:n.y-r.height};break;case Sw:t={x:s,y:n.y+n.height};break;case Tw:t={x:n.x+n.width,y:l};break;case Nw:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Gw(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Mw:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Pw:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var qw={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Yw({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Kw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xw(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,m=a.y,h=void 0===m?0:m,g="function"==typeof u?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Nw,w=kw,x=window;if(c){var _=Cw(n),E="clientHeight",C="clientWidth";if(_===tw(n)&&"static"!==hw(_=pw(n)).position&&"absolute"===s&&(E="scrollHeight",C="scrollWidth"),o===kw||(o===Nw||o===Tw)&&i===Pw)w=Sw,h-=(d&&_===x&&x.visualViewport?x.visualViewport.height:_[E])-r.height,h*=l?1:-1;if(o===Nw||(o===kw||o===Sw)&&i===Pw)y=Tw,p-=(d&&_===x&&x.visualViewport?x.visualViewport.width:_[C])-r.width,p*=l?1:-1}var k,S=Object.assign({position:s},c&&Kw),T=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:sw(t*r)/r||0,y:sw(n*r)/r||0}}({x:p,y:h}):{x:p,y:h};return p=T.x,h=T.y,l?Object.assign({},S,((k={})[w]=b?"0":"",k[y]=v?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",k)):Object.assign({},S,((t={})[w]=b?h+"px":"",t[y]=v?p+"px":"",t.transform="",t))}var Zw={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:Ww(t.placement),variation:Uw(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Xw(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xw(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Jw={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];rw(o)&&fw(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});rw(r)&&fw(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Qw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Lw.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ww(e),o=[Nw,kw].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Nw,Tw].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},ex={left:"right",right:"left",bottom:"top",top:"bottom"};function tx(e){return e.replace(/left|right|bottom|top/g,(function(e){return ex[e]}))}var nx={start:"end",end:"start"};function rx(e){return e.replace(/start|end/g,(function(e){return nx[e]}))}function ox(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ow(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ix(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ax(e,t,n){return t===Ow?ix(function(e,t){var n=tw(e),r=pw(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=cw();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+mw(e),y:l}}(e,n)):nw(t)?function(e,t){var n=uw(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ix(function(e){var t,n=pw(e),r=dw(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=iw(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=iw(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+mw(e),l=-r.scrollTop;return"rtl"===hw(o||n).direction&&(s+=iw(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(pw(e)))}function sx(e,t,n,r){var o="clippingParents"===t?function(e){var t=xw(yw(e)),n=["absolute","fixed"].indexOf(hw(e).position)>=0&&rw(e)?Cw(e):e;return nw(n)?t.filter((function(e){return nw(e)&&ox(e,n)&&"body"!==fw(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=ax(e,n,r);return t.top=iw(o.top,t.top),t.right=aw(o.right,t.right),t.bottom=aw(o.bottom,t.bottom),t.left=iw(o.left,t.left),t}),ax(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lx(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function cx(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ux(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Ow:c,d=n.elementContext,f=void 0===d?Dw:d,p=n.altBoundary,m=void 0!==p&&p,h=n.padding,g=void 0===h?0:h,v=lx("number"!=typeof g?g:cx(g,Iw)),b=f===Dw?"reference":Dw,y=e.rects.popper,w=e.elements[m?b:f],x=sx(nw(w)?w:w.contextElement||pw(e.elements.popper),l,u,a),_=uw(e.elements.reference),E=Yw({reference:_,element:y,strategy:"absolute",placement:o}),C=ix(Object.assign({},y,E)),k=f===Dw?C:_,S={top:x.top-k.top+v.top,bottom:k.bottom-x.bottom+v.bottom,left:x.left-k.left+v.left,right:k.right-x.right+v.right},T=e.modifiersData.offset;if(f===Dw&&T){var N=T[o];Object.keys(S).forEach((function(e){var t=[Tw,Sw].indexOf(e)>=0?1:-1,n=[kw,Sw].indexOf(e)>=0?"y":"x";S[e]+=N[n]*t}))}return S}var dx={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=void 0===p||p,h=n.allowedAutoPlacements,g=t.options.placement,v=Ww(g),b=l||(v===g||!m?[tx(g)]:function(e){if(Ww(e)===Rw)return[];var t=tx(e);return[rx(e),t,rx(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat(Ww(n)===Rw?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Lw:l,u=Uw(r),d=u?s?Aw:Aw.filter((function(e){return Uw(e)===u})):Iw,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=ux(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Ww(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,x=t.rects.popper,_=new Map,E=!0,C=y[0],k=0;k=0,I=R?"width":"height",M=ux(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=R?N?Tw:Nw:N?Sw:kw;w[I]>x[I]&&(P=tx(P));var O=tx(P),D=[];if(i&&D.push(M[T]<=0),s&&D.push(M[P]<=0,M[O]<=0),D.every((function(e){return e}))){C=S,E=!1;break}_.set(S,D)}if(E)for(var A=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},L=m?3:1;L>0;L--){if("break"===A(L))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function fx(e,t,n){return iw(e,aw(t,n))}var px={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,m=n.tetherOffset,h=void 0===m?0:m,g=ux(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Ww(t.placement),b=Uw(t.placement),y=!b,w=Gw(v),x="x"===w?"y":"x",_=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,k="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(_){if(i){var R,I="y"===w?kw:Nw,M="y"===w?Sw:Tw,P="y"===w?"height":"width",O=_[w],D=O+g[I],A=O-g[M],L=p?-C[P]/2:0,z=b===Mw?E[P]:C[P],B=b===Mw?-C[P]:-E[P],F=t.elements.arrow,V=p&&F?bw(F):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=H[I],$=H[M],W=fx(0,E[P],V[P]),U=y?E[P]/2-L-W-j-S.mainAxis:z-W-j-S.mainAxis,G=y?-E[P]/2+L+W+$+S.mainAxis:B+W+$+S.mainAxis,Y=t.elements.arrow&&Cw(t.elements.arrow),q=Y?"y"===w?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(R=null==T?void 0:T[w])?R:0,X=O+G-K,Z=fx(p?aw(D,O+U-K-q):D,O,p?iw(A,X):A);_[w]=Z,N[w]=Z-O}if(s){var J,Q="x"===w?kw:Nw,ee="x"===w?Sw:Tw,te=_[x],ne="y"===x?"height":"width",re=te+g[Q],oe=te-g[ee],ie=-1!==[kw,Nw].indexOf(v),ae=null!=(J=null==T?void 0:T[x])?J:0,se=ie?re:te-E[ne]-C[ne]-ae+S.altAxis,le=ie?te+E[ne]+C[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=fx(e,t,n);return r>n?n:r}(se,te,le):fx(p?se:re,te,p?le:oe);_[x]=ce,N[x]=ce-te}t.modifiersData[r]=N}},requiresIfExists:["offset"]};var mx={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ww(n.placement),l=Gw(s),c=[Nw,Tw].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return lx("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:cx(e,Iw))}(o.padding,n),d=bw(i),f="y"===l?kw:Nw,p="y"===l?Sw:Tw,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],h=a[l]-n.rects.reference[l],g=Cw(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=m/2-h/2,y=u[f],w=v-d[c]-u[p],x=v/2-d[c]/2+b,_=fx(y,x,w),E=l;n.modifiersData[r]=((t={})[E]=_,t.centerOffset=_-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ox(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hx(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function gx(e){return[kw,Tw,Sw,Nw].some((function(t){return e[t]>=0}))}var vx={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ux(t,{elementContext:"reference"}),s=ux(t,{altBoundary:!0}),l=hx(a,r),c=hx(s,o,i),u=gx(l),d=gx(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},bx=Hw({defaultModifiers:[$w,qw,Zw,Jw,Qw,dx,px,mx,vx]});function yx(e){void 0===e&&(e={});var t,n,r=zp(e),o=r.visible,i=void 0!==o&&o,a=r.animated,s=void 0!==a&&a,l=$p(h(r,["visible","animated"])),c=(0,b.useState)(i),u=c[0],d=c[1],f=(0,b.useState)(s),p=f[0],g=f[1],v=(0,b.useState)(!1),y=v[0],w=v[1],x=(t=u,n=(0,b.useRef)(null),U((function(){n.current=t}),[t]),n),_=null!=x.current&&x.current!==u;p&&!y&&_&&w(!0),(0,b.useEffect)((function(){if("number"==typeof p&&y){var e=setTimeout((function(){return w(!1)}),p);return function(){clearTimeout(e)}}return function(){}}),[p,y]);var E=(0,b.useCallback)((function(){return d(!0)}),[]),C=(0,b.useCallback)((function(){return d(!1)}),[]),k=(0,b.useCallback)((function(){return d((function(e){return!e}))}),[]),S=(0,b.useCallback)((function(){return w(!1)}),[]);return m(m({},l),{},{visible:u,animated:p,animating:y,show:E,hide:C,toggle:k,setVisible:d,setAnimated:g,stopAnimation:S})}var wx=ee("Mac")&&!ee("Chrome")&&ee("Safari");function xx(e){return function(t){return e&&!A(t,e)?e:t}}function _x(e){void 0===e&&(e={});var t=zp(e),n=t.gutter,r=void 0===n?12:n,o=t.placement,i=void 0===o?"bottom":o,a=t.unstable_flip,s=void 0===a||a,l=t.unstable_offset,c=t.unstable_preventOverflow,u=void 0===c||c,d=t.unstable_fixed,f=void 0!==d&&d,p=t.modal,g=void 0!==p&&p,v=h(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),y=(0,b.useRef)(null),w=(0,b.useRef)(null),x=(0,b.useRef)(null),_=(0,b.useRef)(null),E=(0,b.useState)(i),C=E[0],k=E[1],S=(0,b.useState)(i),T=S[0],N=S[1],R=(0,b.useState)(l||[0,r])[0],I=(0,b.useState)({position:"fixed",left:"100%",top:"100%"}),M=I[0],P=I[1],O=(0,b.useState)({}),D=O[0],A=O[1],L=function(e){void 0===e&&(e={});var t=zp(e),n=t.modal,r=void 0===n||n,o=yx(h(t,["modal"])),i=(0,b.useState)(r),a=i[0],s=i[1],l=(0,b.useRef)(null);return m(m({},o),{},{modal:a,setModal:s,unstable_disclosureRef:l})}(m({modal:g},v)),z=(0,b.useCallback)((function(){return!!y.current&&(y.current.forceUpdate(),!0)}),[]),B=(0,b.useCallback)((function(e){e.placement&&N(e.placement),e.styles&&(P(xx(e.styles.popper)),_.current&&A(xx(e.styles.arrow)))}),[]);return U((function(){return w.current&&x.current&&(y.current=bx(w.current,x.current,{placement:C,strategy:f?"fixed":"absolute",onFirstUpdate:wx?B:void 0,modifiers:[{name:"eventListeners",enabled:L.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:s,options:{padding:8}},{name:"offset",options:{offset:R}},{name:"preventOverflow",enabled:u,options:{tetherOffset:function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!_.current,options:{element:_.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:L.visible&&!0,fn:function(e){var t=e.state;return B(t)}}]})),function(){y.current&&(y.current.destroy(),y.current=null)}}),[C,f,L.visible,s,R,u]),(0,b.useEffect)((function(){if(L.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=y.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[L.visible]),m(m({},L),{},{unstable_referenceRef:w,unstable_popoverRef:x,unstable_arrowRef:_,unstable_popoverStyles:M,unstable_arrowStyles:D,unstable_update:z,unstable_originalPlacement:C,placement:T,place:k})}var Ex={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};var Cx=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],kx=[].concat(Cx,["unstable_portal"]),Sx=F({name:"TooltipReference",compose:re,keys:Cx,useProps:function(e,t){var n=t.ref,r=t.onFocus,o=t.onBlur,i=t.onMouseEnter,a=t.onMouseLeave,s=h(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),l=G(r),c=G(o),u=G(i),d=G(a),f=(0,b.useCallback)((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),p=(0,b.useCallback)((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),g=(0,b.useCallback)((function(t){var n,r;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),v=(0,b.useCallback)((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return m({ref:H(e.unstable_referenceRef,n),tabIndex:0,onFocus:f,onBlur:p,onMouseEnter:g,onMouseLeave:v,"aria-describedby":e.baseId},s)}}),Tx=z({as:"div",useHook:Sx});const Nx=(0,s.createContext)({});var Rx=F({name:"DisclosureContent",compose:re,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,i=h(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,s=(0,b.useState)(null),l=s[0],c=s[1],u=!e.visible&&!a,d=u?m({display:"none"},o):o,f=G(n),p=G(r),g=(0,b.useRef)(0);(0,b.useEffect)((function(){if(e.animated)return g.current=window.requestAnimationFrame((function(){g.current=window.requestAnimationFrame((function(){e.visible?c("enter"):c(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(g.current)}}),[e.animated,e.visible,a]);var v=(0,b.useCallback)((function(t){var n;Y(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),y=(0,b.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),v(e)}),[v]),w=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),v(e)}),[v]);return m({id:e.baseId,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,onTransitionEnd:y,onAnimationEnd:w,hidden:u,style:d},i)}}),Ix=z({as:"div",useHook:Rx});function Mx(){return W?document.body:null}var Px=(0,b.createContext)(Mx());function Ox(e){var t=e.children,n=(0,b.useContext)(Px)||Mx(),r=(0,b.useState)((function(){if(W){var e=document.createElement("div");return e.className=Ox.__className,e}return null}))[0];return U((function(){if(r&&n)return n.appendChild(r),function(){n.removeChild(r)}}),[r,n]),r?(0,It.createPortal)((0,b.createElement)(Px.Provider,{value:r},t),r):null}function Dx(e){e.defaultPrevented||"Escape"===e.key&&Ex.show(null)}Ox.__className="__reakit-portal",Ox.__selector="."+Ox.__className;var Ax=F({name:"Tooltip",compose:Rx,keys:kx,useOptions:function(e){var t=e.unstable_portal;return m({unstable_portal:void 0===t||t},h(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=t.wrapElement,i=h(t,["ref","style","wrapElement"]);(0,b.useEffect)((function(){var t;j(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",Dx)}),[]);var a=(0,b.useCallback)((function(t){return e.unstable_portal&&(t=(0,b.createElement)(Ox,null,t)),o?o(t):t}),[e.unstable_portal,o]);return m({ref:H(e.unstable_popoverRef,n),role:"tooltip",style:m(m({},e.unstable_popoverStyles),{},{pointerEvents:"none"},r),wrapElement:a},i)}}),Lx=z({as:"div",memo:!0,useHook:Ax});var zx=ju((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=Hu(e,"Shortcut");if(!r)return null;let l,c;return"string"==typeof r?l=r:(l=r.display,c=r.ariaLabel),(0,s.createElement)(td,a({as:n,className:o,"aria-label":c,ref:t},i),l)}),"Shortcut");const Bx=Uf("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",hh.transitionDurationFastest," ease;font-size:",hh.fontSize,";&[data-enter]{opacity:1;}",""),Fx=Qu("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",Tp.white,";padding:4px 8px;"),Vx={name:"12mkfdx",styles:"outline:none"},Hx=Qu(zx,{target:"e7tfjmw0"})("display:inline-block;margin-left:",Xm(1),";"),{TooltipPopoverView:jx}=t;var $x=ju((function(e,t){const{children:n,className:r,...o}=Hu(e,"TooltipContent"),{tooltip:i}=(0,s.useContext)(Nx),l=Vu()(Bx,r);return(0,s.createElement)(Lx,a({as:td},o,i,{className:l,ref:t}),(0,s.createElement)(jx,null,n))}),"TooltipContent");const Wx=ju((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:l,focusable:c=!0,gutter:u=4,id:d,modal:f=!0,placement:p,visible:g=!1,shortcut:v,...y}=Hu(e,"Tooltip"),w=function(e){void 0===e&&(e={});var t=zp(e),n=t.placement,r=void 0===n?"top":n,o=t.unstable_timeout,i=void 0===o?0:o,a=h(t,["placement","unstable_timeout"]),s=(0,b.useState)(i),l=s[0],c=s[1],u=(0,b.useRef)(null),d=(0,b.useRef)(null),f=_x(m(m({},a),{},{placement:r})),p=(f.modal,f.setModal,h(f,["modal","setModal"])),g=(0,b.useCallback)((function(){null!==u.current&&window.clearTimeout(u.current),null!==d.current&&window.clearTimeout(d.current)}),[]),v=(0,b.useCallback)((function(){g(),p.hide(),d.current=window.setTimeout((function(){Ex.hide(p.baseId)}),l)}),[g,p.hide,l,p.baseId]),y=(0,b.useCallback)((function(){g(),!l||Ex.currentTooltipId?(Ex.show(p.baseId),p.show()):(Ex.show(null),u.current=window.setTimeout((function(){Ex.show(p.baseId),p.show()}),l))}),[g,l,p.show,p.baseId]);return(0,b.useEffect)((function(){return Ex.subscribe((function(e){e!==p.baseId&&(g(),p.visible&&p.hide())}))}),[p.baseId,g,p.visible,p.hide]),(0,b.useEffect)((function(){return function(){g(),Ex.hide(p.baseId)}}),[g,p.baseId]),m(m({},p),{},{hide:v,show:y,unstable_timeout:l,unstable_setTimeout:c})}({animated:n?r:void 0,baseId:o||d,gutter:u,placement:p,visible:g,...y}),x=(0,s.useMemo)((()=>({tooltip:w})),[w]);return(0,s.createElement)(Nx.Provider,{value:x},l&&(0,s.createElement)($x,{unstable_portal:f,ref:t},l,v&&(0,s.createElement)(Hx,{shortcut:v})),i&&(0,s.createElement)(Tx,a({},w,i.props,{ref:null==i?void 0:i.ref}),(e=>(c||(e.tabIndex=void 0),(0,s.cloneElement)(i,e)))))}),"Tooltip");var Ux=Wx;const Gx=e=>{const{color:t,colorType:n}=e,[r,o]=(0,s.useState)(null),i=(0,s.useRef)(),a=(0,d.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));return(0,s.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),(0,s.createElement)(Ux,{content:(0,s.createElement)(Mh,{color:"white"},r===t.toHex()?(0,u.__)("Copied!"):(0,u.__)("Copy")),placement:"bottom"},(0,s.createElement)(Qy,{isSmall:!0,ref:a,icon:ew,showTooltip:!1}))},Yx=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:a}=e;return(0,s.createElement)(Yv,{spacing:4},(0,s.createElement)(Uy,{min:t,max:n,label:r,hideLabelFromVision:!0,value:a,onChange:e=>{i(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,s.createElement)(Xv,{as:Mh,paddingLeft:Xm(4),color:Tp.ui.theme,lineHeight:1},o),spinControls:"none",size:"__unstable-large"}),(0,s.createElement)(Yy,{__nextHasNoMarginBottom:!0,label:r,hideLabelFromVision:!0,min:t,max:n,value:a,onChange:i,withInputField:!1}))},qx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:a,a:l}=t.toRgb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Yx,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n(bp({r:e,g:i,b:a,a:l}))}),(0,s.createElement)(Yx,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n(bp({r:o,g:e,b:a,a:l}))}),(0,s.createElement)(Yx,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>n(bp({r:o,g:i,b:e,a:l}))}),r&&(0,s.createElement)(Yx,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>n(bp({r:o,g:i,b:a,a:e/100}))}))},Kx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:a,a:l}=t.toHsl();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Yx,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n(bp({h:e,s:i,l:a,a:l}))}}),(0,s.createElement)(Yx,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n(bp({h:o,s:e,l:a,a:l}))}}),(0,s.createElement)(Yx,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a,onChange:e=>{n(bp({h:o,s:i,l:e,a:l}))}}),r&&(0,s.createElement)(Yx,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>{n(bp({h:o,s:i,l:a,a:e/100}))}}))},Xx=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,s.createElement)(Mv,{prefix:(0,s.createElement)(Xv,{as:Mh,marginLeft:Xm(4),color:Tp.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n(bp(t))},maxLength:r?9:7,label:(0,u.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{var n,r,o,i;const a=null===(n=t.payload)||void 0===n||null===(r=n.event)||void 0===r?void 0:r.nativeEvent;if("insertFromPaste"!==(null==a?void 0:a.inputType))return{...e};const s=null!==(o=e.value)&&void 0!==o&&o.startsWith("#")?e.value.slice(1).toUpperCase():null===(i=e.value)||void 0===i?void 0:i.toUpperCase();return{...e,value:s}},__unstableInputWidth:"9em"})},Zx=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,s.createElement)(Kx,i);case"rgb":return(0,s.createElement)(qx,i);default:return(0,s.createElement)(Xx,i)}};function Jx(){return(Jx=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function e_(e){var t=(0,b.useRef)(e),n=(0,b.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var t_=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(o_(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=r_(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(i_(t),!function(e,t){return t&&!n_(e)}(t,l.current)&&r)){if(n_(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(o_(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),u=c[0],d=c[1],f=c[2];return(0,b.useEffect)((function(){return f}),[f]),b.createElement("div",Jx({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),s_=function(e){return e.filter(Boolean).join(" ")},l_=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=s_(["react-colorful__pointer",e.className]);return b.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},b.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},c_=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},u_=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:c_(e.h),s:c_(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:c_(o/2),a:c_(r,2)}}),d_=function(e){var t=u_(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},f_=function(e){var t=u_(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},p_=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:c_(255*[r,s,a,a,l,r][c]),g:c_(255*[l,r,r,s,a,a][c]),b:c_(255*[a,a,l,r,r,s][c]),a:c_(o,2)}},m_=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?g_({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)}):{h:0,s:0,v:0,a:1}},h_=m_,g_=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:c_(60*(s<0?s+6:s)),s:c_(i?a/i*100:0),v:c_(i/255*100),a:o}},v_=b.memo((function(e){var t=e.hue,n=e.onChange,r=s_(["react-colorful__hue",e.className]);return b.createElement("div",{className:r},b.createElement(a_,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:t_(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":c_(t),"aria-valuemax":"360","aria-valuemin":"0"},b.createElement(l_,{className:"react-colorful__hue-pointer",left:t/360,color:d_({h:t,s:100,v:100,a:1})})))})),b_=b.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:d_({h:t.h,s:100,v:100,a:1})};return b.createElement("div",{className:"react-colorful__saturation",style:r},b.createElement(a_,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:t_(t.s+100*e.left,0,100),v:t_(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+c_(t.s)+"%, Brightness "+c_(t.v)+"%"},b.createElement(l_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:d_(t)})))})),y_=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},w_=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function x_(e,t,n){var r=e_(n),o=(0,b.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,b.useRef)({color:t,hsva:i});(0,b.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,b.useEffect)((function(){var t;y_(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,b.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var __,E_="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,C_=new Map,k_=function(e){E_((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!C_.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',C_.set(t,r);var o=__||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},S_=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Qx(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);k_(s);var l=x_(n,o,i),c=l[0],u=l[1],d=s_(["react-colorful",t]);return b.createElement("div",Jx({},a,{ref:s,className:d}),b.createElement(b_,{hsva:c,onChange:u}),b.createElement(v_,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},T_=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+f_(Object.assign({},n,{a:0}))+", "+f_(Object.assign({},n,{a:1}))+")"},i=s_(["react-colorful__alpha",t]),a=c_(100*n.a);return b.createElement("div",{className:i},b.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),b.createElement(a_,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:t_(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},b.createElement(l_,{className:"react-colorful__alpha-pointer",left:n.a,color:f_(n)})))},N_=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Qx(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);k_(s);var l=x_(n,o,i),c=l[0],u=l[1],d=s_(["react-colorful",t]);return b.createElement("div",Jx({},a,{ref:s,className:d}),b.createElement(b_,{hsva:c,onChange:u}),b.createElement(v_,{hue:c.h,onChange:u}),b.createElement(T_,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},R_={defaultColor:"rgba(0, 0, 0, 1)",toHsva:m_,fromHsva:function(e){var t=p_(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:w_},I_=function(e){return b.createElement(N_,Jx({},e,{colorModel:R_}))},M_={defaultColor:"rgb(0, 0, 0)",toHsva:h_,fromHsva:function(e){var t=p_(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:w_},P_=function(e){return b.createElement(S_,Jx({},e,{colorModel:M_}))};const O_=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?I_:P_,i=(0,s.useMemo)((()=>t.toRgbString()),[t]);return(0,s.createElement)(o,{color:i,onChange:e=>{r(bp(e))}})};function D_(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[a,l]=(0,s.useState)(i);let c;return c=o&&"function"==typeof n?n:o||"function"!=typeof n?l:e=>{n(e),l(e)},[o?r:a,c]}wp([xp]);const A_=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],L_=ju(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:l,...c}=Hu(e,"ColorPicker"),[f,p]=D_({onChange:o,value:r,defaultValue:i}),m=(0,s.useMemo)((()=>bp(f||"")),[f]),h=(0,d.useDebounce)(p),g=(0,s.useCallback)((e=>{h(e.toHex())}),[h]),[v,b]=(0,s.useState)(l||"hex");return(0,s.createElement)(Jy,a({ref:t},c),(0,s.createElement)(O_,{onChange:g,color:m,enableAlpha:n}),(0,s.createElement)(Ky,null,(0,s.createElement)(Xy,{justify:"space-between"},(0,s.createElement)(Gy,{__nextHasNoMarginBottom:!0,options:A_,value:v,onChange:e=>b(e),label:(0,u.__)("Color format"),hideLabelFromVision:!0}),(0,s.createElement)(Gx,{color:m,colorType:l||v})),(0,s.createElement)(Zy,{direction:"column",gap:2},(0,s.createElement)(Zx,{colorType:v,color:m,onChange:g,enableAlpha:n}))))}),"ColorPicker");var z_=L_;function B_(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const F_=sc()((e=>{const t=bp(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));const V_=e=>(0,s.createElement)(z_,function(e){const{onChangeComplete:t}=e,n=(0,s.useCallback)((e=>{t(F_(e))}),[t]);return function(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}(e)?{color:B_(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}(e));var H_=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function j_(e){const{actions:t,className:n,options:r,children:o}=e;return(0,s.createElement)("div",{className:c()("components-circular-option-picker",n)},(0,s.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,s.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}j_.Option=function(e){const{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e,l=(0,s.createElement)(id,a({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,s.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},o?(0,s.createElement)(Ff,{text:o},l):l,n&&(0,s.createElement)(ly,a({icon:H_},r||{})))},j_.ButtonAction=function(e){const{className:t,children:n,...r}=e;return(0,s.createElement)(id,a({className:c()("components-circular-option-picker__clear",t),variant:"tertiary"},r),n)},j_.DropdownLinkAction=function(e){const{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,s.createElement)(ry,a({className:c()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,s.createElement)(id,a({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};var $_=ju((function(e,t){const n=function(e){const{expanded:t=!1,...n}=Hu(e,"VStack");return Gv({direction:"column",expanded:t,...n})}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"VStack");var W_=ju((function(e,t){const n=sh(e);return(0,s.createElement)(td,a({as:"span"},n,{ref:t}))}),"Truncate");var U_=ju((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=Hu(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...Ih({color:Tp.gray[900],size:Nh(n),isBlock:!0,weight:hh.fontWeightHeading,...r}),...i,as:o}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Heading");const G_=Qu(U_,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),Y_=Qu("div",{target:"eovvns30"})("margin-left:",Xm(-2),";margin-right:",Xm(-2),";&:first-of-type{margin-top:",Xm(-2),";}&:last-of-type{margin-bottom:",Xm(-2),";}",(e=>{let{paddingSize:t="small"}=e;if("none"===t)return;const n={small:Xm(2),medium:Xm(4)};return Uf("padding:",n[t]||n.small,";","")}),";");var q_=ju((function(e,t){const{paddingSize:n="small",...r}=Hu(e,"DropdownContentWrapper");return(0,s.createElement)(Y_,a({},r,{paddingSize:n,ref:t}))}),"DropdownContentWrapper");wp([xp,ty]);const K_=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function X_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;const l=(0,s.useMemo)((()=>r.map(((e,t)=>{let{color:r,name:a}=e;const l=bp(r),c=i===r;return(0,s.createElement)(j_.Option,{key:`${r}-${t}`,isSelected:c,selectedIconProps:c?{fill:l.contrast()>l.contrast("#000")?"#fff":"#000"}:{},tooltipText:a||(0,u.sprintf)((0,u.__)("Color code: %s"),r),style:{backgroundColor:r,color:r},onClick:c?n:()=>o(r,t),"aria-label":a?(0,u.sprintf)((0,u.__)("Color: %s"),a):(0,u.sprintf)((0,u.__)("Color code: %s"),r)})}))),[r,i,o,n]);return(0,s.createElement)(j_,{className:t,options:l,actions:a})}function Z_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;return 0===r.length?null:(0,s.createElement)($_,{spacing:3,className:t},r.map(((e,t)=>{let{name:l,colors:c}=e;return(0,s.createElement)($_,{spacing:2,key:t},(0,s.createElement)(G_,null,l),(0,s.createElement)(X_,{clearColor:n,colors:c,onChange:e=>o(e,t),value:i,actions:r.length===t+1?a:null}))})))}function J_(e){let{isRenderedInSidebar:t,popoverProps:n,...r}=e;const o=(0,s.useMemo)((()=>({shift:!0,...t?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...n})),[t,n]);return(0,s.createElement)(ry,a({contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:o},r))}wp([xp,ty]);const Q_=(0,s.forwardRef)((function(e,t){const{clearable:n=!0,colors:r=[],disableCustomColors:o=!1,enableAlpha:i=!1,onChange:l,value:c,__experimentalIsRenderedInSidebar:d=!1,...f}=e,[p,m]=(0,s.useState)(c),h=(0,s.useCallback)((()=>l(void 0)),[l]),g=(0,s.useCallback)((e=>{m(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=null==r?void 0:r.getComputedStyle(t).backgroundColor;return o?bp(o).toHex():e})(c,e))}),[c]),v=K_(r),b=(0,s.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const r=/^var\(/.test(e),o=r?e:bp(e).toHex(),i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?n:bp(n).toHex()))return t;return(0,u.__)("Custom")}(c,r,v)),[c,r,v]),y=bp(null!=p?p:""),w=null!=c&&c.startsWith("#")?c.substring(1):null!=c?c:"",x=w?(0,u.sprintf)((0,u.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),b,w):(0,u.__)("Custom color picker."),_={clearable:n,clearColor:h,onChange:l,value:c,actions:!!n&&(0,s.createElement)(j_.ButtonAction,{onClick:h},(0,u.__)("Clear"))};return(0,s.createElement)($_,a({spacing:3,ref:t},f),!o&&(0,s.createElement)(J_,{isRenderedInSidebar:d,renderContent:()=>(0,s.createElement)(q_,{paddingSize:"none"},(0,s.createElement)(V_,{color:p,onChange:e=>l(e),enableAlpha:i})),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Jm,{as:"button",ref:g,justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":x,style:(r=c,void 0===r||0===bp(r).alpha()?{color:"#000"}:{background:c,color:y.contrast()>y.contrast("#000")?"#fff":"#000"})},(0,s.createElement)(Wm,{isBlock:!0,as:W_,className:"components-color-palette__custom-color-name"},b),(0,s.createElement)(Wm,{as:"span",className:"components-color-palette__custom-color-value"},w));var r}}),v?(0,s.createElement)(Z_,a({},_,{colors:r})):(0,s.createElement)(X_,a({},_,{colors:r})))}));var eE=Q_;const tE="web"===s.Platform.OS,nE={px:{value:"px",label:tE?"px":(0,u.__)("Pixels (px)"),a11yLabel:(0,u.__)("Pixels (px)"),step:1},"%":{value:"%",label:tE?"%":(0,u.__)("Percentage (%)"),a11yLabel:(0,u.__)("Percent (%)"),step:.1},em:{value:"em",label:tE?"em":(0,u.__)("Relative to parent font size (em)"),a11yLabel:(0,u._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:tE?"rem":(0,u.__)("Relative to root font size (rem)"),a11yLabel:(0,u._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:tE?"vw":(0,u.__)("Viewport width (vw)"),a11yLabel:(0,u.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:tE?"vh":(0,u.__)("Viewport height (vh)"),a11yLabel:(0,u.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:tE?"vmin":(0,u.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,u.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:tE?"vmax":(0,u.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,u.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:tE?"ch":(0,u.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,u.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:tE?"ex":(0,u.__)("x-height of the font (ex)"),a11yLabel:(0,u.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:tE?"cm":(0,u.__)("Centimeters (cm)"),a11yLabel:(0,u.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:tE?"mm":(0,u.__)("Millimeters (mm)"),a11yLabel:(0,u.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:tE?"in":(0,u.__)("Inches (in)"),a11yLabel:(0,u.__)("Inches (in)"),step:.001},pc:{value:"pc",label:tE?"pc":(0,u.__)("Picas (pc)"),a11yLabel:(0,u.__)("Picas (pc)"),step:1},pt:{value:"pt",label:tE?"pt":(0,u.__)("Points (pt)"),a11yLabel:(0,u.__)("Points (pt)"),step:1}},rE=Object.values(nE),oE=[nE.px,nE["%"],nE.em,nE.rem,nE.vw,nE.vh],iE=nE.px;function aE(e,t,n){return lE(t?`${null!=e?e:""}${t}`:e,n)}function sE(e){return Array.isArray(e)&&!!e.length}function lE(e){var t,n;let r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rE;if(void 0!==e||null===e){r=`${e}`.trim();const t=parseFloat(r);o=isFinite(t)?t:void 0}const a=null===(t=r)||void 0===t?void 0:t.match(/[\d.\-\+]*\s*(.*)/),s=null==a||null===(n=a[1])||void 0===n?void 0:n.toLowerCase();let l;if(sE(i)){const e=i.find((e=>e.value===s));l=null==e?void 0:e.value}else l=iE.value;return[o,l]}function cE(e,t,n,r){const[o,i]=lE(e,t),a=null!=o?o:n;let s=i||r;return!s&&sE(t)&&(s=t[0].value),[a,s]}const uE=e=>{let{units:t=rE,availableUnits:n=[],defaultValues:r}=e;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n,t);return r&&o.forEach(((e,t)=>{if(r[e.value]){const[n]=lE(r[e.value]);o[t].default=n}})),o};function dE(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:a,previousStyleSelection:l,size:c="default",__experimentalIsRenderedInSidebar:u=!1,...d}=Hu(e,"BorderControlDropdown"),[f]=lE(null==t?void 0:t.width),p=0===f,m=Vu(),h=(0,s.useMemo)((()=>m((e=>Uf("background:#fff;&&>button{height:","__unstable-large"===e?"40px":"30px",";width:","__unstable-large"===e?"40px":"30px",";padding:0;display:flex;align-items:center;justify-content:center;",Fh({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",hh.borderWidth," solid ",Tp.ui.border,";&:focus,&:hover:not( :disabled ){",Fb," border-color:",Tp.ui.borderFocus,";z-index:1;position:relative;}}",""))(c),n)),[n,m,c]),g=(0,s.useMemo)((()=>m(Ub)),[m]),v=(0,s.useMemo)((()=>m(jb(t,c))),[t,m,c]),b=(0,s.useMemo)((()=>m($b)),[m]),y=(0,s.useMemo)((()=>m(Wb)),[m]),w=(0,s.useMemo)((()=>m(Gb)),[m]);return{...d,border:t,className:h,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:g,indicatorWrapperClassName:v,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?l:null==t?void 0:t.style,r=p&&e?"1px":null==t?void 0:t.width;a({color:e,style:n,width:r})},onStyleChange:e=>{const n=p&&e?"1px":null==t?void 0:t.width;a({...t,style:e,width:n})},onReset:()=>{a({...t,color:void 0,style:void 0})},popoverContentClassName:y,popoverControlsClassName:b,resetButtonClassName:w,__experimentalIsRenderedInSidebar:u}}const fE=ju(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:l,enableStyle:c,indicatorClassName:d,indicatorWrapperClassName:f,onReset:p,onColorChange:m,onStyleChange:h,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:y,__unstablePopoverProps:w,...x}=dE(e),{color:_,style:E}=r||{},C=((e,t)=>{if(e&&t){if(K_(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(_,o),k=((e,t,n,r)=>r?t?n?(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,t.color,n):(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?n?(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',e,n):(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',e):(0,u.__)("Border color and style picker."):t?(0,u.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?(0,u.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',e):(0,u.__)("Border color picker."))(_,C,E,c),S=_||E&&"none"!==E,T=n?"bottom left":void 0;return(0,s.createElement)(ry,a({renderToggle:e=>{let{onToggle:t}=e;return(0,s.createElement)(id,{onClick:t,variant:"tertiary","aria-label":k,tooltipPosition:T,label:(0,u.__)("Border color and style picker"),showTooltip:!0},(0,s.createElement)("span",{className:f},(0,s.createElement)(Jb,{className:d,colorValue:_})))},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(q_,{paddingSize:"medium"},(0,s.createElement)($_,{className:v,spacing:6},y?(0,s.createElement)(Yv,null,(0,s.createElement)(Cv,null,(0,u.__)("Border color")),(0,s.createElement)(id,{isSmall:!0,label:(0,u.__)("Close border color"),icon:Ib,onClick:t})):void 0,(0,s.createElement)(eE,{className:g,value:_,onChange:m,colors:o,disableCustomColors:i,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:l}),c&&(0,s.createElement)(Zb,{label:(0,u.__)("Style"),value:E,onChange:h}))),S&&(0,s.createElement)(q_,{paddingSize:"none"},(0,s.createElement)(id,{className:b,variant:"tertiary",onClick:()=>{p(),t()}},(0,u.__)("Reset to default"))))},popoverProps:{...w}},x,{ref:t}))}),"BorderControlDropdown");var pE=fE;function mE(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r,size:o="default",unit:i="px",units:l=oE,...u}=e;if(!sE(l)||1===(null==l?void 0:l.length))return(0,s.createElement)(Lb,{className:"components-unit-control__unit-label",selectSize:o},i);const d=c()("components-unit-control__select",t);return(0,s.createElement)(zb,a({className:d,onChange:e=>{const{value:t}=e.target,n=l.find((e=>e.value===t));null==r||r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},u),l.map((e=>(0,s.createElement)("option",{value:e.value,key:e.value},e.label))))}const hE=(0,s.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:d=!1,isPressEnterToChange:f=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:m=!0,label:h,onChange:g,onUnitChange:v,size:b="default",unit:y,units:w=oE,value:x,onBlur:_,onFocus:E,...C}=e;"unit"in e&&Kl()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const k=null!=x?x:void 0,S=(0,s.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rE;const r=Array.isArray(n)?[...n]:[],[,o]=aE(e,t,rE);return o&&!r.some((e=>e.value===o))&&nE[o]&&r.unshift(nE[o]),r}(k,y,w)),[k,y,w]),[T,N]=aE(k,y,S),[R,I]=hy(1===S.length?S[0].value:y,{initial:N,fallback:""});(0,s.useEffect)((()=>{void 0!==N&&I(N)}),[N,I]);const M=(0,s.useRef)(void 0),P=c()("components-unit-control","components-unit-control-wrapper",i),O=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(M.current=void 0);const[t,n]=cE(e.currentTarget.value,S,T,R);if(M.current=t,f&&n!==R){const t={event:e,data:Array.isArray(S)?S.find((e=>e.value===n)):void 0};null==v||v(n,t),I(n)}},D=(e,t)=>{const n={...e};var r;t.type===rv&&(void 0!==M.current&&(n.value=(null!==(r=M.current)&&void 0!==r?r:"").toString(),M.current=void 0));return n};let A=D;n&&(A=(e,t)=>{const r=D(e,t);return n(r,t)});const L=d?null:(0,s.createElement)(mE,{"aria-label":(0,u.__)("Select unit"),disabled:l,isUnitSelectTabbable:m,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=T?T:""}${e}`;p&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),null==g||g(r,t),null==v||v(e,t),I(e)},size:b,unit:R,units:S,onBlur:_,onFocus:E});let z=C.step;if(!z&&S){var B;const e=S.find((e=>e.value===R));z=null!==(B=null==e?void 0:e.step)&&void 0!==B?B:1}return(0,s.createElement)(Db,a({type:f?"text":"number"},C,{autoComplete:r,className:P,disabled:l,spinControls:"none",isPressEnterToChange:f,label:h,onBlur:e=>{O(e),null==_||_(e)},onKeyDown:e=>{const{key:t}=e;"Enter"===t&&O(e)},onChange:(e,t)=>{if(""===e||null==e)return void(null==g||g("",t));const n=cE(e,S,T,R).join("");null==g||g(n,t)},ref:t,size:b,suffix:L,value:null!=T?T:"",step:z,__unstableStateReducer:A,onFocus:E}))}));var gE=hE;function vE(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:a=!0,shouldSanitizeBorder:l=!0,size:c="default",value:u,width:d,__experimentalIsRenderedInSidebar:f=!1,...p}=Hu(e,"BorderControl"),[m,h]=lE(null==u?void 0:u.width),g=h||"px",v=0===m,[b,y]=(0,s.useState)(),[w,x]=(0,s.useState)(),_=(0,s.useCallback)((e=>{if(l)return o((e=>{const t=void 0===(null==e?void 0:e.width)||""===e.width,n=void 0===(null==e?void 0:e.color);if(!t||!n)return e})(e));o(e)}),[o,l]),E=(0,s.useCallback)((e=>{const t=""===e?void 0:e,[n]=lE(e),r=0===n,o={...u,width:t};r&&!v&&(y(null==u?void 0:u.color),x(null==u?void 0:u.style),o.color=void 0,o.style="none"),!r&&v&&(void 0===o.color&&(o.color=b),"none"===o.style&&(o.style=w)),_(o)}),[u,v,b,w,_]),C=(0,s.useCallback)((e=>{E(`${e}${g}`)}),[E,g]),k=Vu(),S=(0,s.useMemo)((()=>k(Vb,t)),[t,k]);let T=d;r&&(T="__unstable-large"===c?"116px":"90px");const N=(0,s.useMemo)((()=>{const e=!!T&&Hb,t=(e=>Uf("height:","__unstable-large"===e?"40px":"30px",";",""))(c);return k(Uf(Db,"{flex:1 1 40%;}&& ",zb,"{min-height:0;}",""),e,t)}),[T,k,c]),R=(0,s.useMemo)((()=>k(Uf("flex:1 1 60%;",Fh({marginRight:Xm(3)})(),";",""))),[k]);return{...p,className:S,colors:n,enableAlpha:i,enableStyle:a,innerWrapperClassName:N,inputWidth:T,onBorderChange:_,onSliderChange:C,onWidthChange:E,previousStyleSelection:w,sliderClassName:R,value:u,widthUnit:g,widthValue:m,size:c,__experimentalIsRenderedInSidebar:f}}const bE=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"legend"},t):(0,s.createElement)(Cv,{as:"legend"},t):null},yE=ju(((e,t)=>{const{colors:n,disableCustomColors:r,disableUnits:o,enableAlpha:i,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:d,inputWidth:f,label:p,onBorderChange:m,onSliderChange:h,onWidthChange:g,placeholder:v,__unstablePopoverProps:b,previousStyleSelection:y,showDropdownHeader:w,size:x,sliderClassName:_,value:E,widthUnit:C,widthValue:k,withSlider:S,__experimentalIsRenderedInSidebar:T,...N}=vE(e);return(0,s.createElement)(td,a({as:"fieldset"},N,{ref:t}),(0,s.createElement)(bE,{label:p,hideLabelFromVision:c}),(0,s.createElement)(Yv,{spacing:4,className:d},(0,s.createElement)(gE,{prefix:(0,s.createElement)(pE,{border:E,colors:n,__unstablePopoverProps:b,disableCustomColors:r,enableAlpha:i,enableStyle:l,onChange:m,previousStyleSelection:y,showDropdownHeader:w,__experimentalIsRenderedInSidebar:T,size:x}),label:(0,u.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:g,value:(null==E?void 0:E.width)||"",placeholder:v,disableUnits:o,__unstableInputWidth:f,size:x}),S&&(0,s.createElement)(Wy,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:h,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1})))}),"BorderControl");var wE=yE;const xE={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function _E(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:l=!1,justify:c,rowGap:u,rows:d,templateColumns:f,templateRows:p,...m}=Hu(e,"Grid"),h=Km(Array.isArray(i)?i:[i]),g=Km(Array.isArray(d)?d:[d]),v=f||!!i&&`repeat( ${h}, 1fr )`,b=p||!!d&&`repeat( ${g}, 1fr )`,y=Vu();return{...m,className:(0,s.useMemo)((()=>{const e=function(e){return e?xE[e]:{}}(n),i=Uf({alignItems:t,display:l?"inline-grid":"grid",gap:`calc( ${hh.gridBase} * ${a} )`,gridTemplateColumns:v||void 0,gridTemplateRows:b||void 0,gridRowGap:u,gridColumnGap:o,justifyContent:c,verticalAlign:l?"middle":void 0,...e},"","");return y(i,r)}),[t,n,r,o,y,a,v,b,l,c,u])}}var EE=ju((function(e,t){const n=_E(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Grid");function CE(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:a=!1,...l}=Hu(e,"BorderBoxControlSplitControls"),c=Vu(),u=(0,s.useMemo)((()=>c((e=>Uf("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[c,t,i]);return{...l,centeredClassName:(0,s.useMemo)((()=>c(kb,t)),[c,t]),className:u,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,s.useMemo)((()=>c(Uf(Fh({marginLeft:"auto"})(),";",""),t)),[c,t]),size:i,__experimentalIsRenderedInSidebar:a}}var kE=ju(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:c,popoverPlacement:f,popoverOffset:p,rightAlignedClassName:m,size:h="default",value:g,__experimentalIsRenderedInSidebar:v,...b}=CE(e),[y,w]=(0,s.useState)(null),x=(0,s.useMemo)((()=>f?{placement:f,offset:p,anchor:y,shift:!0}:void 0),[f,p,y]),_={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,isCompact:!0,__experimentalIsRenderedInSidebar:v,size:h},E=(0,d.useMergeRefs)([w,t]);return(0,s.createElement)(EE,a({},b,{ref:E,gap:4}),(0,s.createElement)(Rb,{value:g,size:h}),(0,s.createElement)(wE,a({className:n,hideLabelFromVision:!0,label:(0,u.__)("Top border"),onChange:e=>c(e,"top"),__unstablePopoverProps:x,value:null==g?void 0:g.top},_)),(0,s.createElement)(wE,a({hideLabelFromVision:!0,label:(0,u.__)("Left border"),onChange:e=>c(e,"left"),__unstablePopoverProps:x,value:null==g?void 0:g.left},_)),(0,s.createElement)(wE,a({className:m,hideLabelFromVision:!0,label:(0,u.__)("Right border"),onChange:e=>c(e,"right"),__unstablePopoverProps:x,value:null==g?void 0:g.right},_)),(0,s.createElement)(wE,a({className:n,hideLabelFromVision:!0,label:(0,u.__)("Bottom border"),onChange:e=>c(e,"bottom"),__unstablePopoverProps:x,value:null==g?void 0:g.bottom},_)))}),"BorderBoxControlSplitControls");const SE=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?$/;const TE=["top","right","bottom","left"],NE=["color","style","width"],RE=e=>!e||!NE.some((t=>void 0!==e[t])),IE=e=>{if(!e)return!1;if(ME(e)){return!TE.every((t=>RE(e[t])))}return!RE(e)},ME=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==TE.indexOf(e)))},PE=e=>{if(!ME(e))return!1;const t=TE.map((t=>OE(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},OE=(e,t)=>{if(RE(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")},DE=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(SE);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function AE(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:a="default",value:l,__experimentalIsRenderedInSidebar:c=!1,...u}=Hu(e,"BorderBoxControl"),d=PE(l),f=ME(l),p=f?(e=>{if(!e)return;const t=[],n=[],r=[];TE.forEach((o=>{var i,a,s;t.push(null===(i=e[o])||void 0===i?void 0:i.color),n.push(null===(a=e[o])||void 0===a?void 0:a.style),r.push(null===(s=e[o])||void 0===s?void 0:s.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:DE(r)}})(l):l,m=f?l:(e=>{if(e&&!RE(e))return{top:e,right:e,bottom:e,left:e}})(l),h=!isNaN(parseFloat(`${null==p?void 0:p.width}`)),[g,v]=(0,s.useState)(!d),b=Vu(),y=(0,s.useMemo)((()=>b(_b,t)),[b,t]),w=(0,s.useMemo)((()=>b(Uf("flex:1;",Fh({marginRight:"24px"})(),";",""))),[b]),x=(0,s.useMemo)((()=>b(Eb)),[b]);return{...u,className:y,colors:n,disableUnits:d&&!h,enableAlpha:o,enableStyle:i,hasMixedBorders:d,isLinked:g,linkedControlClassName:w,onLinkedChange:e=>{if(!e)return r(void 0);if(!d||(t=e)&&NE.every((e=>void 0!==t[e])))return r(RE(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(p,e),o={top:{...null==l?void 0:l.top,...n},right:{...null==l?void 0:l.right,...n},bottom:{...null==l?void 0:l.bottom,...n},left:{...null==l?void 0:l.left,...n}};if(PE(o))return r(o);const i=RE(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...m,[t]:e};PE(n)?r(n):r(e)},toggleLinked:()=>v(!g),linkedValue:p,size:a,splitValue:m,wrapperClassName:x,__experimentalIsRenderedInSidebar:c}}const LE=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(nd,{as:"label"},t):(0,s.createElement)(Cv,null,t):null},zE=ju(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:l,enableStyle:c,hasMixedBorders:f,hideLabelFromVision:p,isLinked:m,label:h,linkedControlClassName:g,linkedValue:v,onLinkedChange:b,onSplitChange:y,popoverPlacement:w,popoverOffset:x,size:_,splitValue:E,toggleLinked:C,wrapperClassName:k,__experimentalIsRenderedInSidebar:S,...T}=AE(e),[N,R]=(0,s.useState)(null),I=(0,s.useMemo)((()=>w?{placement:w,offset:x,anchor:N,shift:!0}:void 0),[w,x,N]),M=(0,d.useMergeRefs)([R,t]);return(0,s.createElement)(td,a({className:n},T,{ref:M}),(0,s.createElement)(LE,{label:h,hideLabelFromVision:p}),(0,s.createElement)(td,{className:k},m?(0,s.createElement)(wE,{className:g,colors:r,disableUnits:i,disableCustomColors:o,enableAlpha:l,enableStyle:c,onChange:b,placeholder:f?(0,u.__)("Mixed"):void 0,__unstablePopoverProps:I,shouldSanitizeBorder:!1,value:v,withSlider:!0,width:"__unstable-large"===_?"116px":"110px",__experimentalIsRenderedInSidebar:S,size:_}):(0,s.createElement)(kE,{colors:r,disableCustomColors:o,enableAlpha:l,enableStyle:c,onChange:y,popoverPlacement:w,popoverOffset:x,value:E,__experimentalIsRenderedInSidebar:S,size:_}),(0,s.createElement)(Tb,{onClick:C,isLinked:m,size:_})))}),"BorderBoxControl");var BE=zE;const FE=Qu("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),VE=Qu(Jm,{target:"e7pk0lh5"})({name:"5bhc30",styles:"margin-bottom:8px"}),HE=Qu(Jm,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),jE=Qu("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),$E=Qu(Jm,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),WE=Qu(Jm,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var UE={name:"1ch9yvl",styles:"border-radius:0"},GE={name:"tg3mx0",styles:"border-radius:2px"};const YE=e=>{let{isFirst:t,isLast:n,isOnly:r}=e;return t?Fh({borderTopRightRadius:0,borderBottomRightRadius:0})():n?Fh({borderTopLeftRadius:0,borderBottomLeftRadius:0})():r?GE:UE},qE=e=>{let{isFirst:t,isOnly:n}=e;return Fh({marginLeft:t||n?0:-1})()},KE=Qu(gE,{target:"e7pk0lh0"})("max-width:60px;",YE,";",qE,";"),XE=()=>{};function ZE(e){let{isFirst:t,isLast:n,isOnly:r,onHoverOn:o=XE,onHoverOff:i=XE,label:l,value:c,...u}=e;const d=(f=e=>{let{event:t,...n}=e;n.hovering?o(t,n):i(t,n)},Hg($g),Qg({hover:f},p||{},"hover"));var f,p;return(0,s.createElement)(jE,d(),(0,s.createElement)(JE,{text:l},(0,s.createElement)(KE,a({"aria-label":l,className:"component-box-control__unit-control",isFirst:t,isLast:n,isOnly:r,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:c},u))))}function JE(e){let{children:t,text:n}=e;return n?(0,s.createElement)(Ff,{text:n,position:"top"},(0,s.createElement)("div",null,t)):t}const QE={all:(0,u.__)("All"),top:(0,u.__)("Top"),bottom:(0,u.__)("Bottom"),left:(0,u.__)("Left"),right:(0,u.__)("Right"),mixed:(0,u.__)("Mixed"),vertical:(0,u.__)("Vertical"),horizontal:(0,u.__)("Horizontal")},eC={top:void 0,right:void 0,bottom:void 0,left:void 0},tC=["top","right","bottom","left"];function nC(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function rC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tC;const r=lC(n),o=r.map((t=>lE(e[t]))),i=o.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),a=o.map((e=>e[1])),s=i.every((e=>e===i[0]))?i[0]:"";let l;var c;"number"==typeof s?l=nC(a):l=null!==(c=oC(t))&&void 0!==c?c:nC(a);return[s,l].join("")}function oC(e){if(!e||"object"!=typeof e)return;return nC(Object.values(e).filter(Boolean))}function iC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tC;const r=rC(e,t,n),o=isNaN(parseFloat(r));return o}function aC(e){return void 0!==e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function sC(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function lC(e){const t=[];if(null==e||!e.length)return tC;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=tC.filter((t=>e.includes(t)));t.push(...n)}return t}function cC(e,t,n){const r={...e};return null!=n&&n.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):tC.forEach((e=>r[e]=t)),r}const uC=()=>{};function dC(e){let{onChange:t=uC,onFocus:n=uC,onHoverOn:r=uC,onHoverOff:o=uC,values:i,sides:l,selectedUnits:c,setSelectedUnits:u,...d}=e;const f=rC(i,c,l),p=aC(i)&&iC(i,c,l),m=p?QE.mixed:null;return(0,s.createElement)(ZE,a({},d,{disableUnits:p,isOnly:!0,value:f,onChange:e=>{const n=!isNaN(parseFloat(e)),r=cC(i,n?e:void 0,l);t(r)},onUnitChange:e=>{const t=cC(c,e,l);u(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{r({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{o({top:!1,bottom:!1,left:!1,right:!1})},placeholder:m}))}const fC=()=>{};function pC(e){let{onChange:t=fC,onFocus:n=fC,onHoverOn:r=fC,onHoverOff:o=fC,values:i,selectedUnits:l,setSelectedUnits:c,sides:u,...d}=e;const f=e=>t=>{n(t,{side:e})},p=e=>()=>{r({[e]:!0})},m=e=>()=>{o({[e]:!1})},h=e=>(n,r)=>{let{event:o}=r;const{altKey:a}=o,s={...i},l=!isNaN(parseFloat(n))?n:void 0;if(s[e]=l,a)switch(e){case"top":s.bottom=l;break;case"bottom":s.top=l;break;case"left":s.right=l;break;case"right":s.left=l}(e=>{t(e)})(s)},g=e=>t=>{const n={...l};n[e]=t,c(n)},v=null!=u&&u.length?tC.filter((e=>u.includes(e))):tC,b=v[0],y=v[v.length-1],w=b===y&&b;return(0,s.createElement)($E,{className:"component-box-control__input-controls-wrapper"},(0,s.createElement)(WE,{gap:0,align:"top",className:"component-box-control__input-controls"},v.map((e=>{const[t,n]=lE(i[e]),r=i[e]?n:l[e];return(0,s.createElement)(ZE,a({},d,{isFirst:b===e,isLast:y===e,isOnly:w===e,value:[t,r].join(""),onChange:h(e),onUnitChange:g(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:m(e),label:QE[e],key:`box-control-${e}`}))}))))}const mC=["vertical","horizontal"];function hC(e){let{onChange:t,onFocus:n,onHoverOn:r,onHoverOff:o,values:i,selectedUnits:l,setSelectedUnits:c,sides:u,...d}=e;const f=e=>t=>{n&&n(t,{side:e})},p=e=>()=>{r&&("vertical"===e&&r({top:!0,bottom:!0}),"horizontal"===e&&r({left:!0,right:!0}))},m=e=>()=>{o&&("vertical"===e&&o({top:!1,bottom:!1}),"horizontal"===e&&o({left:!1,right:!1}))},h=e=>n=>{if(!t)return;const r={...i},o=!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},g=e=>t=>{const n={...l};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),c(n)},v=null!=u&&u.length?mC.filter((e=>u.includes(e))):mC,b=v[0],y=v[v.length-1],w=b===y&&b;return(0,s.createElement)(WE,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},v.map((e=>{const[t,n]=lE("vertical"===e?i.top:i.left),r="vertical"===e?l.top:l.left;return(0,s.createElement)(ZE,a({},d,{isFirst:b===e,isLast:y===e,isOnly:w===e,value:[t,null!=r?r:n].join(""),onChange:h(e),onUnitChange:g(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:m(e),label:QE[e],key:e}))})))}const gC=Qu("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),vC=Qu("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),bC=Qu("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return Uf({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),yC=Qu(bC,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),wC=Qu(bC,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),xC=Qu(wC,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),_C=Qu(yC,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),EC=Qu(wC,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),CC=Qu(yC,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function kC(e){let{size:t=24,side:n="all",sides:r,...o}=e;const i=e=>!(e=>(null==r?void 0:r.length)&&!r.includes(e))(e)&&("all"===n||n===e),l=i("top")||i("vertical"),c=i("right")||i("horizontal"),u=i("bottom")||i("vertical"),d=i("left")||i("horizontal"),f=t/24;return(0,s.createElement)(gC,a({style:{transform:`scale(${f})`}},o),(0,s.createElement)(vC,null,(0,s.createElement)(xC,{isFocused:l}),(0,s.createElement)(_C,{isFocused:c}),(0,s.createElement)(EC,{isFocused:u}),(0,s.createElement)(CC,{isFocused:d})))}function SC(e){let{isLinked:t,...n}=e;const r=t?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,s.createElement)(Ff,{text:r},(0,s.createElement)(id,a({},n,{className:"component-box-control__linked-button",isSmall:!0,icon:t?wb:xb,iconSize:24,"aria-label":r})))}const TC={min:0},NC=()=>{};function RC(e){let{id:t,inputProps:n=TC,onChange:r=NC,label:o=(0,u.__)("Box Control"),values:i,units:l,sides:c,splitOnAxis:f=!1,allowReset:p=!0,resetValues:m=eC,onMouseOver:h,onMouseOut:g}=e;const[v,b]=hy(i,{fallback:eC}),y=v||eC,w=aC(i),x=1===(null==c?void 0:c.length),[_,E]=(0,s.useState)(w),[C,k]=(0,s.useState)(!w||!iC(y)||x),[S,T]=(0,s.useState)(sC(C,f)),[N,R]=(0,s.useState)({top:lE(null==i?void 0:i.top)[1],right:lE(null==i?void 0:i.right)[1],bottom:lE(null==i?void 0:i.bottom)[1],left:lE(null==i?void 0:i.left)[1]}),I=function(e){const t=(0,d.useInstanceId)(RC,"inspector-box-control");return e||t}(t),M=`${I}-heading`,P={...n,onChange:e=>{r(e),b(e),E(!0)},onFocus:(e,t)=>{let{side:n}=t;T(n)},isLinked:C,units:l,selectedUnits:N,setSelectedUnits:R,sides:c,values:y,onMouseOver:h,onMouseOut:g};return(0,s.createElement)(FE,{id:I,role:"group","aria-labelledby":M},(0,s.createElement)(VE,{className:"component-box-control__header"},(0,s.createElement)(Wm,null,(0,s.createElement)(Nv.VisualLabel,{id:M},o)),p&&(0,s.createElement)(Wm,null,(0,s.createElement)(id,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{r(m),b(m),R(m),E(!1)},disabled:!_},(0,u.__)("Reset")))),(0,s.createElement)(HE,{className:"component-box-control__header-control-wrapper"},(0,s.createElement)(Wm,null,(0,s.createElement)(kC,{side:S,sides:c})),C&&(0,s.createElement)($m,null,(0,s.createElement)(dC,a({"aria-label":o},P))),!C&&f&&(0,s.createElement)($m,null,(0,s.createElement)(hC,P)),!x&&(0,s.createElement)(Wm,null,(0,s.createElement)(SC,{onClick:()=>{k(!C),T(sC(!C,f))},isLinked:C}))),!C&&!f&&(0,s.createElement)(pC,P))}var IC=(0,s.forwardRef)((function(e,t){const{className:n,...r}=e,o=c()("components-button-group",n);return(0,s.createElement)("div",a({ref:t,role:"group",className:o},r))}));const MC={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function PC(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const OC=ju((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:l=0,value:c=0,...u}=Hu(e,"Elevation"),d=Vu();return{...u,className:(0,s.useMemo)((()=>{let e=eh(i)?i:2*c,s=eh(t)?t:c/2;a||(e=eh(i)?i:void 0,s=eh(t)?t:void 0);const u=`box-shadow ${hh.transitionDuration} ${hh.transitionTimingFunction}`,f={};return f.Base=Uf({borderRadius:n,bottom:l,boxShadow:PC(c),opacity:hh.elevationIntensity,left:l,right:l,top:l,transition:u},Np("transition"),"",""),eh(e)&&(f.hover=Uf("*:hover>&{box-shadow:",PC(e),";}","")),eh(s)&&(f.active=Uf("*:active>&{box-shadow:",PC(s),";}","")),eh(o)&&(f.focus=Uf("*:focus>&{box-shadow:",PC(o),";}","")),d(MC,f.Base,f.hover,f.focus,f.active,r)}),[t,n,r,d,o,i,a,l,c]),"aria-hidden":!0}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Elevation");var DC=OC;const AC=`calc(${hh.cardBorderRadius} - 1px)`,LC=Uf("box-shadow:0 0 0 1px ",hh.surfaceBorderColor,";outline:none;",""),zC={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},BC={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},FC={name:"13udsys",styles:"height:100%"},VC={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},HC={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},jC={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},$C=Uf("&:first-of-type{border-top-left-radius:",AC,";border-top-right-radius:",AC,";}&:last-of-type{border-bottom-left-radius:",AC,";border-bottom-right-radius:",AC,";}",""),WC=Uf("border-color:",hh.colorDivider,";",""),UC={name:"1t90u8d",styles:"box-shadow:none"},GC={name:"1e1ncky",styles:"border:none"},YC=Uf("border-radius:",AC,";",""),qC=Uf("padding:",hh.cardPaddingXSmall,";",""),KC={large:Uf("padding:",hh.cardPaddingLarge,";",""),medium:Uf("padding:",hh.cardPaddingMedium,";",""),small:Uf("padding:",hh.cardPaddingSmall,";",""),xSmall:qC,extraSmall:qC},XC=Uf("background-color:",Tp.ui.backgroundDisabled,";",""),ZC=Uf("background-color:",hh.surfaceColor,";color:",Tp.gray[900],";position:relative;","");hh.surfaceBackgroundColor;function JC(e){let{borderBottom:t,borderLeft:n,borderRight:r,borderTop:o}=e;const i=`1px solid ${hh.surfaceBorderColor}`;return Uf({borderBottom:t?i:void 0,borderLeft:n?i:void 0,borderRight:r?i:void 0,borderTop:o?i:void 0},"","")}const QC=Uf("",""),ek=Uf("background:",hh.surfaceBackgroundTintColor,";",""),tk=Uf("background:",hh.surfaceBackgroundTertiaryColor,";",""),nk=e=>[e,e].join(" "),rk=e=>["90deg",[hh.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),ok=e=>[[hh.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),ik=(e,t)=>Uf("background:",(e=>[`linear-gradient( ${rk(e)} ) center`,`linear-gradient( ${ok(e)} ) center`,hh.surfaceBorderBoldColor].join(","))(t),";background-size:",nk(e),";",""),ak=[`linear-gradient( ${[`${hh.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${hh.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),sk=(e,t,n)=>{switch(e){case"dotted":return ik(t,n);case"grid":return(e=>Uf("background:",hh.surfaceBackgroundColor,";background-image:",ak,";background-size:",nk(e),";",""))(t);case"primary":return QC;case"secondary":return ek;case"tertiary":return tk}};function lk(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:l="primary",...c}=Hu(e,"Surface"),u=Vu();return{...c,className:(0,s.useMemo)((()=>{const e={borders:JC({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return u(ZC,e.borders,sk(l,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,u,l])}}function ck(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=Hu(function(e){let{elevation:t,isElevated:n,...r}=e;const o={...r};let i=t;var a;return n&&(Kl()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(a=i)&&void 0!==a||(i=2)),void 0!==i&&(o.elevation=i),o}(e),"Card"),l=Vu();return{...lk({...a,className:(0,s.useMemo)((()=>l(LC,r&&UC,o&&YC,t)),[t,l,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}var uk=ju((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:l,...c}=ck(e),u=i?hh.cardBorderRadius:0,d=Vu(),f=(0,s.useMemo)((()=>d(Uf({borderRadius:u},"",""))),[d,u]),p=(0,s.useMemo)((()=>{const e={size:l,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,l]);return(0,s.createElement)(oc,{value:p},(0,s.createElement)(td,a({},c,{ref:t}),(0,s.createElement)(td,{className:d(FC)},n),(0,s.createElement)(DC,{className:f,isInteractive:!1,value:r?1:0}),(0,s.createElement)(DC,{className:f,isInteractive:!1,value:r})))}),"Card");const dk=Uf("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",hh.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",hh.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",hh.colorScrollbarThumbHover,";}}",""),fk={name:"13udsys",styles:"height:100%"},pk={name:"7zq9w",styles:"scroll-behavior:smooth"},mk={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},hk={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},gk={name:"umwchj",styles:"overflow-y:auto"};var vk=ju((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Hu(e,"Scrollable"),i=Vu();return{...o,className:(0,s.useMemo)((()=>i(fk,dk,r&&pk,"x"===n&&mk,"y"===n&&hk,"auto"===n&&gk,t)),[t,i,n,r])}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Scrollable");var bk=ju((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Hu(e,"CardBody"),a=Vu();return{...i,className:(0,s.useMemo)((()=>a(VC,$C,KC[o],r&&XC,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,s.createElement)(vk,a({},r,{ref:t})):(0,s.createElement)(td,a({},r,{ref:t}))}),"CardBody"),yk=F({name:"Separator",compose:re,keys:["orientation"],useOptions:function(e){var t=e.orientation;return m({orientation:void 0===t?"horizontal":t},h(e,["orientation"]))},useProps:function(e,t){return m({role:"separator","aria-orientation":e.orientation},t)}}),wk=z({as:"hr",memo:!0,useHook:yk});const xk={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var _k={name:"1u4hpl4",styles:"display:inline"};const Ek=Qu("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?_k:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Uf({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Uf({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:n,marginStart:r,marginEnd:o}=e;return Uf(Fh({[xk[t].start]:Xm(null!=r?r:n),[xk[t].end]:Xm(null!=o?o:n)})(),"","")}),";");var Ck=ju((function(e,t){const n=Hu(e,"Divider");return(0,s.createElement)(wk,a({as:Ek},n,{ref:t}))}),"Divider");var kk=ju((function(e,t){const n=function(e){const{className:t,...n}=Hu(e,"CardDivider"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(jC,WC,"components-card__divider",t)),[t,r])}}(e);return(0,s.createElement)(Ck,a({},n,{ref:t}))}),"CardDivider");var Sk=ju((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=Hu(e,"CardFooter"),l=Vu();return{...a,className:(0,s.useMemo)((()=>l(BC,$C,WC,KC[i],r&&GC,o&&XC,"components-card__footer",t)),[t,l,r,o,i]),justify:n}}(e);return(0,s.createElement)(Jm,a({},n,{ref:t}))}),"CardFooter");var Tk=ju((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Hu(e,"CardHeader"),a=Vu();return{...i,className:(0,s.useMemo)((()=>a(zC,$C,WC,KC[o],n&&GC,r&&XC,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,s.createElement)(Jm,a({},n,{ref:t}))}),"CardHeader");var Nk=ju((function(e,t){const n=function(e){const{className:t,...n}=Hu(e,"CardMedia"),r=Vu();return{...n,className:(0,s.useMemo)((()=>r(HC,$C,"components-card__media",t)),[t,r])}}(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"CardMedia");var Rk=function e(t){const{__nextHasNoMarginBottom:n,label:r,className:o,heading:i,checked:l,indeterminate:u,help:f,onChange:p,...m}=t;i&&Kl()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[h,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),y=(0,d.useRefEffect)((e=>{e&&(e.indeterminate=!!u,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[l,u]),w=`inspector-checkbox-control-${(0,d.useInstanceId)(e)}`;return(0,s.createElement)(Rv,{__nextHasNoMarginBottom:n,label:i,id:w,help:f,className:c()("components-checkbox-control",o)},(0,s.createElement)("span",{className:"components-checkbox-control__input-container"},(0,s.createElement)("input",a({ref:y,id:w,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>p(e.target.checked),checked:l,"aria-describedby":f?w+"__help":void 0},m)),v?(0,s.createElement)(ly,{icon:Gm,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,h?(0,s.createElement)(ly,{icon:H_,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,s.createElement)("label",{className:"components-checkbox-control__label",htmlFor:w},r))};function Ik(e){let{className:t,children:n,onCopy:r,onFinishCopy:o,text:i,...l}=e;Kl()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const u=(0,s.useRef)(),f=(0,d.useCopyToClipboard)(i,(()=>{r(),clearTimeout(u.current),o&&(u.current=setTimeout((()=>o()),4e3))}));(0,s.useEffect)((()=>{clearTimeout(u.current)}),[]);const p=c()("components-clipboard-button",t);return(0,s.createElement)(id,a({},l,{className:p,ref:f,onCopy:e=>{e.target.focus()}}),n)}var Mk=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const Pk=Uf("appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;&:hover{color:",Tp.ui.theme,";}&:focus{background-color:transparent;color:",Tp.ui.theme,";border-color:",Tp.ui.theme,";outline:3px solid transparent;}",""),Ok={name:"1bcj5ek",styles:"width:100%;display:block"},Dk={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},Ak=Uf("border:1px solid ",hh.surfaceBorderColor,";",""),Lk=Uf(">*:not( marquee )>*{border-bottom:1px solid ",hh.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),zk=hh.controlBorderRadius,Bk=Uf("border-radius:",zk,";",""),Fk=Uf("border-radius:",zk,";>*:first-of-type>*{border-top-left-radius:",zk,";border-top-right-radius:",zk,";}>*:last-of-type>*{border-bottom-left-radius:",zk,";border-bottom-right-radius:",zk,";}",""),Vk=`calc(${hh.fontSize} * ${hh.fontLineHeightBase})`,Hk=`calc((${hh.controlHeight} - ${Vk} - 2px) / 2)`,jk=`calc((${hh.controlHeightSmall} - ${Vk} - 2px) / 2)`,$k=`calc((${hh.controlHeightLarge} - ${Vk} - 2px) / 2)`,Wk={small:Uf("padding:",jk," ",hh.controlPaddingXSmall,";",""),medium:Uf("padding:",Hk," ",hh.controlPaddingX,";",""),large:Uf("padding:",$k," ",hh.controlPaddingXLarge,";","")};const Uk=(0,s.createContext)({size:"medium"}),Gk=()=>(0,s.useContext)(Uk);var Yk=ju((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=Hu(e,"ItemGroup");return{isBordered:n,className:Vu()(n&&Ak,o&&Lk,r&&Fk,t),role:i,isSeparated:o,...a}}(e),{size:l}=Gk(),c={spacedAround:!n&&!r,size:o||l};return(0,s.createElement)(Uk.Provider,{value:c},(0,s.createElement)(td,a({},i,{ref:t})))}),"ItemGroup");function qk(e){return Math.max(0,Math.min(100,e))}function Kk(e,t,n){const r=e.slice();return r[t]=n,r}function Xk(e,t,n){if(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some(((e,o)=>{let{position:s}=e;return o!==t&&(Math.abs(s-n)({placement:"bottom",offset:8})),[]),i=c()("components-custom-gradient-picker__control-point-dropdown",n);return(0,s.createElement)(J_,a({isRenderedInSidebar:t,popoverProps:o,className:i},r))}function tS(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:r,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:l,onStopControlPointChange:c,__experimentalIsRenderedInSidebar:d}=e;const f=(0,s.useRef)(),p=e=>{const t=Jk(e.clientX,r.current),{initialPosition:n,index:o,significantMoveHappened:s}=f.current;!s&&Math.abs(n-t)>=5&&(f.current.significantMoveHappened=!0),a(Xk(i,o,t))},m=()=>{window&&window.removeEventListener&&f.current&&f.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",m),c(),f.current.listenersActivated=!1)},h=(0,s.useRef)();return h.current=m,(0,s.useEffect)((()=>()=>{h.current()}),[]),i.map(((e,r)=>{const h=null==e?void 0:e.position;return o!==h&&(0,s.createElement)(eS,{isRenderedInSidebar:d,key:r,onClose:c,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(Qk,{key:r,onClick:()=>{f.current&&f.current.significantMoveHappened||(n?c():l(),o())},onMouseDown:()=>{window&&window.addEventListener&&(f.current={initialPosition:h,index:r,significantMoveHappened:!1,listenersActivated:!0},l(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",m))},onKeyDown:t=>{"ArrowLeft"===t.code?(t.stopPropagation(),a(Xk(i,r,qk(e.position-10)))):"ArrowRight"===t.code&&(t.stopPropagation(),a(Xk(i,r,qk(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:o=>{let{onClose:l}=o;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(V_,{enableAlpha:!n,color:e.color,onChange:e=>{a(Zk(i,r,bp(e).toRgbString()))}}),!t&&i.length>2&&(0,s.createElement)(Yv,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,s.createElement)(id,{onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,r)),l()},variant:"link"},(0,u.__)("Remove Control Point"))))},style:{left:`${e.position}%`,transform:"translateX( -50% )"}})}))}tS.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:r,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:l}=e;const[c,u]=(0,s.useState)(!1);return(0,s.createElement)(eS,{isRenderedInSidebar:l,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(id,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?o():(u(!1),r()),n()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:Um})},renderContent:()=>(0,s.createElement)(V_,{enableAlpha:!a,onChange:e=>{c?n(function(e,t,n){const r=e.findIndex((e=>e.position===t));return Zk(e,r,n)}(t,i,bp(e).toRgbString())):(n(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(t,i,bp(e).toRgbString())),u(!0))}}),style:null!==i?{left:`${i}%`,transform:"translateX( -50% )"}:void 0})};var nS=tS;function rS(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const oS={id:"IDLE"};function iS(e){let{background:t,hasGradient:n,value:r,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:l}=e;const u=(0,s.useRef)(),[d,f]=(0,s.useReducer)(rS,oS),p=e=>{const t=Jk(e.clientX,u.current);r.some((e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===d.id&&f({type:"STOP_INSERTER_MOVE"}):f({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===d.id,h="INSERTING_CONTROL_POINT"===d.id;return(0,s.createElement)("div",{className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:p,onMouseMove:p,style:{background:t},onMouseLeave:()=>{f({type:"STOP_INSERTER_MOVE"})}},(0,s.createElement)("div",{ref:u,className:"components-custom-gradient-picker__markers-container"},!i&&(m||h)&&(0,s.createElement)(nS.InsertPoint,{__experimentalIsRenderedInSidebar:l,disableAlpha:a,insertPosition:d.insertPosition,value:r,onChange:o,onOpenInserter:()=>{f({type:"OPEN_INSERTER"})},onCloseInserter:()=>{f({type:"CLOSE_INSERTER"})}}),(0,s.createElement)(nS,{__experimentalIsRenderedInSidebar:l,disableAlpha:a,disableRemove:i,gradientPickerDomRef:u,ignoreMarkerPosition:h?d.insertPosition:void 0,value:r,onChange:o,onStartControlPointChange:()=>{f({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{f({type:"STOP_CONTROL_CHANGE"})}})))}var aS=n(7115);const sS="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",lS={type:"angular",value:90},cS=[{value:"linear-gradient",label:(0,u.__)("Linear")},{value:"radial-gradient",label:(0,u.__)("Radial")}],uS={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function dS(e){let{type:t,value:n,length:r}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(r)}`}function fS(e){let{type:t,orientation:n,colorStops:r}=e;const o=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(n);return`${t}(${[o,...r.sort(((e,t)=>{var n,r,o,i;return(null!==(n=null==e||null===(r=e.length)||void 0===r?void 0:r.value)&&void 0!==n?n:0)-(null!==(o=null==t||null===(i=t.length)||void 0===i?void 0:i.value)&&void 0!==o?o:0)})).map(dS)].filter(Boolean).join(",")})`}function pS(e){return void 0===e.length||"%"!==e.length.type}function mS(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}wp([xp]);const hS=Qu($m,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),gS=Qu($m,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),vS=e=>{var t,n;let{gradientAST:r,hasGradient:o,onChange:i}=e;const a=null!==(t=null==r||null===(n=r.orientation)||void 0===n?void 0:n.value)&&void 0!==t?t:180;return(0,s.createElement)(ab,{__nextHasNoMarginBottom:!0,onChange:e=>{i(fS({...r,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:o?a:""})},bS=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const{type:o}=t;return(0,s.createElement)(py,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,u.__)("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&r(fS({...t,...t.orientation?{}:{orientation:lS},type:"linear-gradient"})),"radial-gradient"===e&&(()=>{const{orientation:e,...n}=t;r(fS({...n,type:"radial-gradient"}))})()},options:cS,size:"__unstable-large",value:n&&o})};function yS(e){let{__nextHasNoMargin:t=!1,value:n,onChange:r,__experimentalIsRenderedInSidebar:o}=e;const i=function(e){var t;let n;try{n=aS.parse(e)[0],n.value=e}catch(e){n=aS.parse(sS)[0],n.value=sS}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=uS[n.orientation.value].toString()),n.colorStops.some(pS)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=fS(n)}return n}(n),a=function(e){return fS({type:"linear-gradient",orientation:lS,colorStops:e.colorStops})}(i),l=i.value!==sS,u=i.colorStops.map((e=>({color:mS(e),position:parseInt(e.length.value)})));return t||Kl()("Outer margin styles for wp.components.CustomGradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,s.createElement)($_,{spacing:4,className:c()("components-custom-gradient-picker",{"is-next-has-no-margin":t})},(0,s.createElement)(iS,{__experimentalIsRenderedInSidebar:o,background:a,hasGradient:l,value:u,onChange:e=>{r(fS(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:r,g:o,b:i,a:a}=bp(n).toRgb();return{length:{type:"%",value:null==t?void 0:t.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,o,i,a]:[r,o,i]}}))}}(i,e)))}}),(0,s.createElement)(Jm,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,s.createElement)(hS,null,(0,s.createElement)(bS,{gradientAST:i,hasGradient:l,onChange:r})),(0,s.createElement)(gS,null,"linear-gradient"===i.type&&(0,s.createElement)(vS,{gradientAST:i,hasGradient:l,onChange:r}))))}const wS=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function xS(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a}=e;const l=(0,s.useMemo)((()=>r.map(((e,t)=>{let{gradient:r,name:a}=e;return(0,s.createElement)(j_.Option,{key:r,value:r,isSelected:i===r,tooltipText:a||(0,u.sprintf)((0,u.__)("Gradient code: %s"),r),style:{color:"rgba( 0,0,0,0 )",background:r},onClick:i===r?n:()=>o(r,t),"aria-label":a?(0,u.sprintf)((0,u.__)("Gradient: %s"),a):(0,u.sprintf)((0,u.__)("Gradient code: %s"),r)})}))),[r,i,o,n]);return(0,s.createElement)(j_,{className:t,options:l,actions:a})}function _S(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:l}=e;return(0,s.createElement)($_,{spacing:3,className:t},r.map(((e,t)=>{let{name:c,gradients:u}=e;return(0,s.createElement)($_,{spacing:2,key:t},(0,s.createElement)(G_,null,c),(0,s.createElement)(xS,a({clearGradient:n,gradients:u,onChange:e=>o(e,t),value:i},r.length===t+1?{actions:l}:{})))})))}function ES(e){let{__nextHasNoMargin:t=!1,className:n,gradients:r,onChange:o,value:i,clearable:l=!0,disableCustomGradients:c=!1,__experimentalIsRenderedInSidebar:d}=e;const f=(0,s.useCallback)((()=>o(void 0)),[o]),p=wS(r)?_S:xS;t||Kl()("Outer margin styles for wp.components.GradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"});const m=t?{}:{marginTop:null!=r&&r.length?void 0:3,marginBottom:l?0:6};return(0,s.createElement)(Xv,a({marginBottom:0},m),(0,s.createElement)($_,{spacing:null!=r&&r.length?4:0},!c&&(0,s.createElement)(yS,{__nextHasNoMargin:!0,__experimentalIsRenderedInSidebar:d,value:i,onChange:o}),((null==r?void 0:r.length)||l)&&(0,s.createElement)(p,{className:n,clearable:l,clearGradient:f,gradients:r,onChange:o,value:i,actions:l&&!c&&(0,s.createElement)(j_.ButtonAction,{onClick:f},(0,u.__)("Clear"))})))}var CS=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})),kS=window.wp.dom;const SS=()=>{},TS=["menuitem","menuitemradio","menuitemcheckbox"];class NS extends s.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?kS.focus.tabbable:kS.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=SS,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role"),n=TS.includes(t),r="Tab"===e.code;(n||r)&&e.preventDefault()}if(!a)return;const s=t(e.target.ownerDocument.activeElement);if(!s)return;const{index:l,focusables:c}=s,u=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(l,c.length,a):l+a;u>=0&&u(0,s.createElement)(NS,a({},e,{forwardedRef:t}));RS.displayName="NavigableContainer";var IS=(0,s.forwardRef)(RS);var MS=(0,s.forwardRef)((function(e,t){let{role:n="menu",orientation:r="vertical",...o}=e;return(0,s.createElement)(IS,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:n,"aria-orientation":"presentation"===n?null:r,eventToOffset:e=>{const{code:t}=e;let n=["ArrowDown"],o=["ArrowUp"];return"horizontal"===r&&(n=["ArrowRight"],o=["ArrowLeft"]),"both"===r&&(n=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),n.includes(t)?1:o.includes(t)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t)?0:void 0}},o))}));function PS(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}function OS(e){return"function"==typeof e}var DS=function(e){const{children:t,className:n,controls:r,icon:o=CS,label:i,popoverProps:l,toggleProps:u,menuProps:d,disableOpenOnArrowDown:f=!1,text:p,noIcons:m}=e;if(!(null!=r&&r.length||OS(t)))return null;let h;null!=r&&r.length&&(h=r,Array.isArray(h[0])||(h=[h]));const g=PS({className:"components-dropdown-menu__popover"},l);return(0,s.createElement)(ry,{className:c()("components-dropdown-menu",n),popoverProps:g,renderToggle:e=>{var t;let{isOpen:n,onToggle:r}=e;const l=PS({className:c()("components-dropdown-menu__toggle",{"is-opened":n})},u);return(0,s.createElement)(id,a({},l,{icon:o,onClick:e=>{r(e),l.onClick&&l.onClick(e)},onKeyDown:e=>{(e=>{f||n||"ArrowDown"!==e.code||(e.preventDefault(),r())})(e),l.onKeyDown&&l.onKeyDown(e)},"aria-haspopup":"true","aria-expanded":n,label:i,text:p,showTooltip:null===(t=null==u?void 0:u.showTooltip)||void 0===t||t}),l.children)},renderContent:e=>{var n;const r=PS({"aria-label":i,className:c()("components-dropdown-menu__menu",{"no-icons":m})},d);return(0,s.createElement)(MS,a({},r,{role:"menu"}),OS(t)?t(e):null,null===(n=h)||void 0===n?void 0:n.flatMap(((t,n)=>t.map(((t,r)=>(0,s.createElement)(id,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))}})};const AS=Qu(j_.Option,{target:"e5bw3229"})("width:",Xm(6),";height:",Xm(6),";pointer-events:none;"),LS=Qu(Pv,{target:"e5bw3228"})(Wh,"{background:",Tp.gray[100],";border-radius:",hh.controlBorderRadius,";",Gh,Gh,Gh,Gh,"{height:",Xm(8),";}",Xh,Xh,Xh,"{border-color:transparent;box-shadow:none;}}"),zS=Qu(td,{target:"e5bw3227"})("padding:3px 0 3px ",Xm(3),";height:calc( 40px - ",hh.borderWidth," );border:1px solid ",hh.surfaceBorderColor,";border-bottom-color:transparent;&:first-of-type{border-top-left-radius:",hh.controlBorderRadius,";border-top-right-radius:",hh.controlBorderRadius,";}&:last-of-type{border-bottom-left-radius:",hh.controlBorderRadius,";border-bottom-right-radius:",hh.controlBorderRadius,";border-bottom-color:",hh.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",Tp.ui.theme,";}"),BS=Qu("div",{target:"e5bw3226"})("line-height:",Xm(8),";margin-left:",Xm(2),";margin-right:",Xm(2),";white-space:nowrap;overflow:hidden;",zS,":hover &{color:",Tp.ui.theme,";}"),FS=Qu(U_,{target:"e5bw3225"})("text-transform:uppercase;line-height:",Xm(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),VS=Qu(td,{target:"e5bw3224"})("height:",Xm(6),";display:flex;"),HS=Qu(Yv,{target:"e5bw3223"})("margin-bottom:",Xm(2),";"),jS=Qu(td,{target:"e5bw3222"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),$S=Qu(id,{target:"e5bw3221"})("&&{color:",Tp.ui.theme,";}"),WS=Qu(id,{target:"e5bw3220"})("&&{margin-top:",Xm(1),";}"),US="#000";function GS(e){let{value:t,onChange:n,label:r}=e;return(0,s.createElement)(LS,{label:r,hideLabelFromVision:!0,value:t,onChange:n})}function YS(e){let{isGradient:t,element:n,onChange:r,onClose:o=(()=>{})}=e;return(0,s.createElement)(Pf,{placement:"left-start",offset:20,className:"components-palette-edit__popover",onClose:o},!t&&(0,s.createElement)(V_,{color:n.color,enableAlpha:!0,onChange:e=>r({...n,color:e})}),t&&(0,s.createElement)("div",{className:"components-palette-edit__popover-gradient-picker"},(0,s.createElement)(yS,{__nextHasNoMargin:!0,__experimentalIsRenderedInSidebar:!0,value:n.gradient,onChange:e=>r({...n,gradient:e})})))}function qS(e){let{canOnlyChangeValues:t,element:n,onChange:r,isEditing:o,onStartEditing:i,onRemove:l,onStopEditing:c,slugPrefix:f,isGradient:p}=e;const m=(0,d.__experimentalUseFocusOutside)(c),h=p?n.gradient:n.color;return(0,s.createElement)(zS,a({className:o?"is-selected":void 0,as:"div",onClick:i},o?{...m}:{style:{cursor:"pointer"}}),(0,s.createElement)(Yv,{justify:"flex-start"},(0,s.createElement)(Wm,null,(0,s.createElement)(AS,{style:{background:h,color:"transparent"}})),(0,s.createElement)(Wm,null,o&&!t?(0,s.createElement)(GS,{label:p?(0,u.__)("Gradient name"):(0,u.__)("Color name"),value:n.name,onChange:e=>r({...n,name:e,slug:f+(0,ec.kebabCase)(e)})}):(0,s.createElement)(BS,null,n.name)),o&&!t&&(0,s.createElement)(Wm,null,(0,s.createElement)(WS,{isSmall:!0,icon:Mb,label:(0,u.__)("Remove color"),onClick:l}))),o&&(0,s.createElement)(YS,{isGradient:p,onChange:r,element:n}))}function KS(e,t){let{slug:n,color:r,gradient:o}=t;return new RegExp(`^${e}color-([\\d]+)$`).test(n)&&(!!r&&r===US||!!o&&o===sS)}function XS(e){let{elements:t,onChange:n,editingElement:r,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:l}=e;const c=(0,s.useRef)();(0,s.useEffect)((()=>{c.current=t}),[t]),(0,s.useEffect)((()=>()=>{if(c.current.some(((e,t)=>KS(a,e)))){const e=c.current.filter((e=>!KS(a,e)));n(e.length?e:void 0)}}),[]);const u=(0,d.useDebounce)(n,100);return(0,s.createElement)($_,{spacing:3},(0,s.createElement)(Yk,{isRounded:!0},t.map(((e,c)=>(0,s.createElement)(qS,{isGradient:l,canOnlyChangeValues:i,key:c,element:e,onStartEditing:()=>{r!==c&&o(c)},onChange:e=>{u(t.map(((t,n)=>n===c?e:t)))},onRemove:()=>{o(null);const e=t.filter(((e,t)=>t!==c));n(e.length?e:void 0)},isEditing:c===r,onStopEditing:()=>{c===r&&o(null)},slugPrefix:a})))))}const ZS=[];function JS(e){let{gradients:t,colors:n=ZS,onChange:r,paletteLabel:o,emptyMessage:i,canOnlyChangeValues:a,canReset:l,slugPrefix:c=""}=e;const f=!!t,p=f?t:n,[m,h]=(0,s.useState)(!1),[g,v]=(0,s.useState)(null),b=m&&g&&p[g]&&!p[g].slug,y=p.length>0,w=(0,d.useDebounce)(r,100),x=(0,s.useCallback)(((e,t)=>{const n=p[t];n&&n[f?"gradient":"color"]===e?v(t):h(!0)}),[f,p]);return(0,s.createElement)(jS,null,(0,s.createElement)(HS,null,(0,s.createElement)(FS,null,o),(0,s.createElement)(VS,null,y&&m&&(0,s.createElement)($S,{isSmall:!0,onClick:()=>{h(!1),v(null)}},(0,u.__)("Done")),!a&&(0,s.createElement)(id,{isSmall:!0,isPressed:b,icon:Um,label:f?(0,u.__)("Add gradient"):(0,u.__)("Add color"),onClick:()=>{const e=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof(null==t?void 0:t.slug)){const r=null==t?void 0:t.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return(0,u.sprintf)((0,u.__)("Color %s"),r)}(p,c);r([...p,{...f?{gradient:sS}:{color:US},name:e,slug:c+(0,ec.kebabCase)(e)}]),h(!0),v(p.length)}}),y&&(!m||!a||l)&&(0,s.createElement)(DS,{icon:Mk,label:f?(0,u.__)("Gradient options"):(0,u.__)("Color options"),toggleProps:{isSmall:!0}},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(MS,{role:"menu"},!m&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{h(!0),t()},className:"components-palette-edit__menu-button"},(0,u.__)("Show details")),!a&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{v(null),h(!1),r(),t()},className:"components-palette-edit__menu-button"},f?(0,u.__)("Remove all gradients"):(0,u.__)("Remove all colors")),l&&(0,s.createElement)(id,{variant:"tertiary",onClick:()=>{v(null),r(),t()}},f?(0,u.__)("Reset gradient"):(0,u.__)("Reset colors"))))})))),y&&(0,s.createElement)(s.Fragment,null,m&&(0,s.createElement)(XS,{canOnlyChangeValues:a,elements:p,onChange:r,editingElement:g,setEditingElement:v,slugPrefix:c,isGradient:f}),!m&&null!==g&&(0,s.createElement)(YS,{isGradient:f,onClose:()=>v(null),onChange:e=>{w(p.map(((t,n)=>n===g?e:t)))},element:p[g]}),!m&&(f?(0,s.createElement)(ES,{__nextHasNoMargin:!0,gradients:t,onChange:x,clearable:!1,disableCustomGradients:!0}):(0,s.createElement)(eE,{colors:n,onChange:x,clearable:!1,disableCustomColors:!0}))),!y&&i)}const QS=e=>{let{__next36pxDefaultSize:t}=e;return!t&&Uf("height:28px;padding-left:",Xm(1),";padding-right:",Xm(1),";","")},eT=Qu(Jm,{target:"evuatpg0"})("height:34px;padding-left:",Xm(2),";padding-right:",Xm(2),";",QS,";");const tT=(0,s.forwardRef)((function(e,t){const{value:n,isExpanded:r,instanceId:o,selectedSuggestionIndex:i,className:l,onChange:u,onFocus:d,onBlur:f,...p}=e,[m,h]=(0,s.useState)(!1),g=n?n.length+1:0;return(0,s.createElement)("input",a({ref:t,id:`components-form-token-input-${o}`,type:"text"},p,{value:n||"",onChange:e=>{u&&u({value:e.target.value})},onFocus:e=>{h(!0),null==d||d(e)},onBlur:e=>{h(!1),null==f||f(e)},size:g,className:c()(l,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":m&&-1!==i&&r?`components-form-token-suggestions-${o}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`}))}));var nT=tT,rT=n(5425),oT=n.n(rT);const iT=e=>{e.preventDefault()};var aT=function(e){let{selectedIndex:t,scrollIntoView:n,match:r,onHover:o,onSelect:i,suggestions:a=[],displayTransform:l,instanceId:u,__experimentalRenderItem:f}=e;const[p,m]=(0,s.useState)(!1),h=(0,d.useRefEffect)((e=>{let r;return t>-1&&n&&e.children[t]&&(m(!0),oT()(e.children[t],e,{onlyScrollIfNeeded:!0}),r=requestAnimationFrame((()=>{m(!1)}))),()=>{void 0!==r&&cancelAnimationFrame(r)}}),[t,n]),g=e=>()=>{p||null==o||o(e)},v=e=>()=>{null==i||i(e)};return(0,s.createElement)("ul",{ref:h,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${u}`,role:"listbox"},a.map(((e,n)=>{const o=(e=>{const t=l(r).toLocaleLowerCase();if(0===t.length)return null;const n=l(e),o=n.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:n.substring(0,o),suggestionMatch:n.substring(o,o+t.length),suggestionAfterMatch:n.substring(o+t.length)}})(e),i=c()("components-form-token-field__suggestion",{"is-selected":n===t});let a;return a="function"==typeof f?f({item:e}):o?(0,s.createElement)("span",{"aria-label":l(e)},o.suggestionBeforeMatch,(0,s.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):l(e),(0,s.createElement)("li",{id:`components-form-token-suggestions-${u}-${n}`,role:"option",className:i,key:"object"==typeof e&&"value"in e?null==e?void 0:e.value:l(e),onMouseDown:iT,onClick:v(e),onMouseEnter:g(e),"aria-selected":n===t},a)})))},sT=(0,d.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,s.useState)(),o=(0,s.useCallback)((e=>r((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,s.createElement)("div",(0,d.__experimentalUseFocusOutside)(n),(0,s.createElement)(e,a({ref:o},t)))}),"withFocusOutside");const lT=()=>{},cT=sT(class extends s.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});var uT=function e(t){var n;let{__nextHasNoMarginBottom:r=!1,__next36pxDefaultSize:o,value:i,label:a,options:l,onChange:f,onFilterValueChange:p=lT,hideLabelFromVision:m,help:h,allowReset:g=!0,className:v,messages:b={selected:(0,u.__)("Item selected.")},__experimentalRenderItem:y}=t;const[w,x]=D_({value:i,onChange:f}),_=l.find((e=>e.value===w)),E=null!==(n=null==_?void 0:_.label)&&void 0!==n?n:"",C=(0,d.useInstanceId)(e,"combobox-control"),[k,S]=(0,s.useState)(_||null),[T,N]=(0,s.useState)(!1),[R,I]=(0,s.useState)(!1),[M,P]=(0,s.useState)(""),O=(0,s.useRef)(),D=(0,s.useMemo)((()=>{const e=[],t=[],n=fb(M);return l.forEach((r=>{const o=fb(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,l]),A=e=>{x(e.value),(0,ub.speak)(b.selected,"assertive"),S(e),P(""),N(!1)},L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=D.indexOf(k);let n=t+e;n<0?n=D.length-1:n>=D.length&&(n=0),S(D[n]),N(!0)};return(0,s.useEffect)((()=>{const e=D.length>0,t=D.indexOf(k)>0;e&&!t&&S(D[0])}),[D,k]),(0,s.useEffect)((()=>{const e=D.length>0;if(T){const t=e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",D.length),D.length):(0,u.__)("No results.");(0,ub.speak)(t,"polite")}}),[D,T]),(0,s.createElement)(cT,{onFocusOutside:()=>{N(!1)}},(0,s.createElement)(Rv,{__nextHasNoMarginBottom:r,className:c()(v,"components-combobox-control"),tabIndex:"-1",label:a,id:`components-form-token-input-${C}`,hideLabelFromVision:m,help:h},(0,s.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.code){case"Enter":k&&(A(k),t=!0);break;case"ArrowUp":L(-1),t=!0;break;case"ArrowDown":L(1),t=!0;break;case"Escape":N(!1),S(null),t=!0}t&&e.preventDefault()}}},(0,s.createElement)(eT,{__next36pxDefaultSize:o},(0,s.createElement)($m,null,(0,s.createElement)(nT,{className:"components-combobox-control__input",instanceId:C,ref:O,value:T?M:E,onFocus:()=>{I(!0),N(!0),p(""),P("")},onBlur:()=>{I(!1)},isExpanded:T,selectedSuggestionIndex:D.indexOf(k),onChange:e=>{const t=e.value;P(t),p(t),R&&N(!0)}})),g&&(0,s.createElement)(Wm,null,(0,s.createElement)(id,{className:"components-combobox-control__reset",icon:Ib,disabled:!w,onClick:()=>{x(null),O.current.focus()},label:(0,u.__)("Reset")}))),T&&(0,s.createElement)(aT,{instanceId:C,match:{label:M},displayTransform:e=>e.label,suggestions:D,selectedIndex:D.indexOf(k),onHover:S,onSelect:A,scrollIntoView:!0,__experimentalRenderItem:y}))))};const dT=new Set(["alert","status","log","marquee","timer"]);let fT=[],pT=!1;function mT(e){if(pT)return;Array.from(document.body.children).forEach((t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&dT.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),fT.push(t))})),pT=!0}let hT=0;const gT=(0,s.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:r="dialog",title:o=null,focusOnMount:i=!0,shouldCloseOnEsc:l=!0,shouldCloseOnClickOutside:f=!0,isDismissible:p=!0,aria:m={labelledby:void 0,describedby:void 0},onRequestClose:h,icon:g,closeButtonLabel:v,children:b,style:y,overlayClassName:w,className:x,contentLabel:_,onKeyDown:E,isFullScreen:C=!1,__experimentalHideHeader:k=!1}=e,S=(0,s.useRef)(),T=(0,d.useInstanceId)(gT),N=o?`components-modal-header-${T}`:m.labelledby,R=(0,d.useFocusOnMount)(i),I=(0,d.useConstrainedTabbing)(),M=(0,d.useFocusReturn)(),P=(0,d.__experimentalUseFocusOutside)(h),[O,D]=(0,s.useState)(!1);(0,s.useEffect)((()=>(hT++,1===hT&&(mT(S.current),document.body.classList.add(n)),()=>{hT--,0===hT&&(document.body.classList.remove(n),pT&&(fT.forEach((e=>{e.removeAttribute("aria-hidden")})),fT=[],pT=!1))})),[n]);const A=(0,s.useCallback)((e=>{var t,n;const r=null!==(t=null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.scrollTop)&&void 0!==t?t:-1;!O&&r>0?D(!0):O&&r<=0&&D(!1)}),[O]);return(0,s.createPortal)((0,s.createElement)("div",{ref:(0,d.useMergeRefs)([S,t]),className:c()("components-modal__screen-overlay",w),onKeyDown:function(e){e.nativeEvent.isComposing||229===e.keyCode||l&&"Escape"===e.code&&!e.defaultPrevented&&(e.preventDefault(),h&&h(e))}},(0,s.createElement)(sf,{document:document},(0,s.createElement)("div",a({className:c()("components-modal__frame",x,{"is-full-screen":C}),style:y,ref:(0,d.useMergeRefs)([I,M,R]),role:r,"aria-label":_,"aria-labelledby":_?void 0:N,"aria-describedby":m.describedby,tabIndex:-1},f?P:{},{onKeyDown:E}),(0,s.createElement)("div",{className:c()("components-modal__content",{"hide-header":k,"has-scrolled-content":O}),role:"document",onScroll:A},!k&&(0,s.createElement)("div",{className:"components-modal__header"},(0,s.createElement)("div",{className:"components-modal__header-heading-container"},g&&(0,s.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},g),o&&(0,s.createElement)("h1",{id:N,className:"components-modal__header-heading"},o)),p&&(0,s.createElement)(id,{onClick:h,icon:Yl,label:v||(0,u.__)("Close")})),b)))),document.body)}));var vT=gT;const bT={name:"7g5ii0",styles:"&&{z-index:1000001;}"};var yT=ju((function(e,t){const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:l,cancelButtonText:c,...d}=Hu(e,"ConfirmDialog"),f=Vu()(bT),[p,m]=(0,s.useState)(),[h,g]=(0,s.useState)();(0,s.useEffect)((()=>{const e=void 0!==n;m(!e||n),g(!e)}),[n]);const v=(0,s.useCallback)((e=>t=>{null==e||e(t),h&&m(!1)}),[h,m]),b=(0,s.useCallback)((e=>{"Enter"===e.key&&v(r)(e)}),[v,r]),y=null!=c?c:(0,u.__)("Cancel"),w=null!=l?l:(0,u.__)("OK");return(0,s.createElement)(s.Fragment,null,p&&(0,s.createElement)(vT,a({onRequestClose:v(o),onKeyDown:b,closeButtonLabel:y,isDismissible:!0,ref:t,overlayClassName:f,__experimentalHideHeader:!0},d),(0,s.createElement)($_,{spacing:8},(0,s.createElement)(Mh,null,i),(0,s.createElement)(Jm,{direction:"row",justify:"flex-end"},(0,s.createElement)(id,{variant:"tertiary",onClick:v(o)},y),(0,s.createElement)(id,{variant:"primary",onClick:v(r)},w)))))}),"ConfirmDialog"),wT=n(2652),xT=n.n(wT);n(2797);function _T(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function ET(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function CT(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}var ST=function(){return ST=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&C>=0&&E<=h&&_<=m&&x>=O&&E<=A&&C>=L&&_<=D)return T;var z=getComputedStyle(R),B=parseInt(z.borderLeftWidth,10),F=parseInt(z.borderTopWidth,10),V=parseInt(z.borderRightWidth,10),H=parseInt(z.borderBottomWidth,10),j=0,$=0,W="offsetWidth"in R?R.offsetWidth-R.clientWidth-B-V:0,U="offsetHeight"in R?R.offsetHeight-R.clientHeight-F-H:0,G="offsetWidth"in R?0===R.offsetWidth?0:P/R.offsetWidth:0,Y="offsetHeight"in R?0===R.offsetHeight?0:M/R.offsetHeight:0;if(d===R)j="start"===o?k:"end"===o?k-h:"nearest"===o?kT(v,v+h,h,F,H,v+k,v+k+y,y):k-h/2,$="start"===i?S:"center"===i?S-m/2:"end"===i?S-m:kT(g,g+m,m,B,V,g+S,g+S+w,w),j=Math.max(0,j+v),$=Math.max(0,$+g);else{j="start"===o?k-O-F:"end"===o?k-A+H+U:"nearest"===o?kT(O,A,M,F,H+U,k,k+y,y):k-(O+M/2)+U/2,$="start"===i?S-L-B:"center"===i?S-(L+P/2)+W/2:"end"===i?S-D+V+W:kT(L,D,P,B,V+W,S,S+w,w);var q=R.scrollLeft,K=R.scrollTop;k+=K-(j=Math.max(0,Math.min(K+j/Y,R.scrollHeight-M/Y+U))),S+=q-($=Math.max(0,Math.min(q+$/G,R.scrollWidth-P/G+W)))}T.push({el:R,top:j,left:$})}return T}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function IT(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function MT(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a{n=null,e(...i)}),t)}return o.cancel=r,o}function PT(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function OT(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function DT(){return String(TT++)}function AT(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function LT(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=zT(t,r)?t[r]:e[r],n)),{})}function zT(e,t){return void 0!==e[t]}function BT(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function FT(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=VT(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function VT(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?VT(1,0,n,r,!1):VT(-1,n-1,n,r,!1):-1}function HT(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(IT(t,e,n)||r&&IT(t,n.document.activeElement,n))))}const jT=MT((e=>{WT(e).textContent=""}),500);function $T(e,t){const n=WT(t);e&&(n.textContent=e,jT(t))}function WT(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const UT={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function GT(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a=`on${JT(e)}Change`;o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const YT=MT(((e,t)=>{$T(e(),t)}),200),qT="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b.useLayoutEffect:b.useEffect;function KT(e){let{id:t=`downshift-${DT()}`,labelId:n,menuId:r,getItemId:o,toggleButtonId:i,inputId:a}=e;const s=(0,b.useRef)({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:o||(e=>`${t}-item-${e}`),toggleButtonId:i||`${t}-toggle-button`,inputId:a||`${t}-input`});return s.current}function XT(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function ZT(e){return/^\S{1}$/.test(e)}function JT(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function QT(e){const t=(0,b.useRef)(e);return t.current=e,t}function eN(e,t,n){const r=(0,b.useRef)(),o=(0,b.useRef)(),i=(0,b.useCallback)(((t,n)=>{o.current=n,t=LT(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[a,s]=(0,b.useReducer)(i,t),l=QT(n),c=(0,b.useCallback)((e=>s({props:l.current,...e})),[l]),u=o.current;return(0,b.useEffect)((()=>{u&&r.current&&r.current!==a&>(u,LT(r.current,u.props),a),r.current=a}),[a,n,u]),[a,c]}function tN(e,t,n){const[r,o]=eN(e,t,n);return[LT(r,n),o]}const nN={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:RT,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function rN(e,t,n){void 0===n&&(n=UT);const r=e[`default${JT(t)}`];return void 0!==r?r:n[t]}function oN(e,t,n){void 0===n&&(n=UT);const r=e[t];if(void 0!==r)return r;const o=e[`initial${JT(t)}`];return void 0!==o?o:rN(e,t,n)}function iN(e){const t=oN(e,"selectedItem"),n=oN(e,"isOpen"),r=oN(e,"highlightedIndex"),o=oN(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function aN(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):FT(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function sN(e,t,n,r){const o=(0,b.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,b.useEffect)((()=>{const i=()=>{o.current.isMouseDown=!0},a=i=>{o.current.isMouseDown=!1,e&&!HT(i.target,t.map((e=>e.current)),n)&&r()},s=()=>{o.current.isTouchMove=!1},l=()=>{o.current.isTouchMove=!0},c=i=>{!e||o.current.isTouchMove||HT(i.target,t.map((e=>e.current)),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),o}let lN=()=>NT;function cN(e,t,n){let{isInitialMount:r,highlightedIndex:o,items:i,environment:a,...s}=n;(0,b.useEffect)((()=>{r||YT((()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s})),a.document)}),t)}function uN(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=(0,b.useRef)(!0);return qT((()=>{t<0||!n||!Object.keys(r.current).length||(!1===s.current?s.current=!0:a(o(t),i))}),[t]),s}let dN=NT;function fN(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:aN(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:aN(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:rN(o,"highlightedIndex"),isOpen:rN(o,"isOpen"),selectedItem:rN(o,"selectedItem"),inputValue:rN(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function pN(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s=0&&{selectedItem:r.items[a]}}}break;case 13:i={highlightedIndex:aN(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:i={highlightedIndex:aN(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:i={isOpen:rN(r,"isOpen"),highlightedIndex:rN(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case 3:i={highlightedIndex:VT(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:i={highlightedIndex:VT(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:i={isOpen:!1,highlightedIndex:-1};break;case 7:{const n=t.key,o=`${e.inputValue}${n}`,a=pN({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case 0:i={highlightedIndex:FT(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 1:i={highlightedIndex:FT(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 20:i={selectedItem:t.selectedItem};break;default:return fN(e,t,gN)}return{...e,...i}}function bN(e){void 0===e&&(e={}),hN(e,bN);const t={...mN,...e},{items:n,scrollIntoView:r,environment:o,initialIsOpen:i,defaultIsOpen:a,itemToString:s,getA11ySelectionMessage:l,getA11yStatusMessage:c}=t,u=iN(t),[d,f]=tN(vN,u,t),{isOpen:p,highlightedIndex:m,selectedItem:h,inputValue:g}=d,v=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)({}),x=(0,b.useRef)(!0),_=(0,b.useRef)(null),E=KT(t),C=(0,b.useRef)(),k=(0,b.useRef)(!0),S=QT({state:d,props:t}),T=(0,b.useCallback)((e=>w.current[E.getItemId(e)]),[E]);cN(c,[p,m,g,n],{isInitialMount:k.current,previousResultCount:C.current,items:n,environment:o,itemToString:s,...d}),cN(l,[h],{isInitialMount:k.current,previousResultCount:C.current,items:n,environment:o,itemToString:s,...d});const N=uN({menuElement:y.current,highlightedIndex:m,isOpen:p,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:T});(0,b.useEffect)((()=>(_.current=MT((e=>{e({type:21,inputValue:""})}),500),()=>{_.current.cancel()})),[]),(0,b.useEffect)((()=>{g&&_.current(f)}),[f,g]),dN({isInitialMount:k.current,props:t,state:d}),(0,b.useEffect)((()=>{k.current?(i||a||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():o.document.activeElement===y.current&&v.current&&(x.current=!1,v.current.focus())}),[p]),(0,b.useEffect)((()=>{k.current||(C.current=n.length)}));const R=sN(p,[y,v],o,(()=>{f({type:8})})),I=lN();(0,b.useEffect)((()=>{k.current=!1}),[]),(0,b.useEffect)((()=>{p||(w.current={})}),[p]);const M=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:13,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:14,getItemNodeFromIndex:T,shiftKey:e.shiftKey})}})),[f,T]),P=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:0,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:1,getItemNodeFromIndex:T,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),f({type:3,getItemNodeFromIndex:T})},End(e){e.preventDefault(),f({type:4,getItemNodeFromIndex:T})},Escape(){f({type:2})},Enter(e){e.preventDefault(),f({type:5})}," "(e){e.preventDefault(),f({type:6})}})),[f,T]),O=(0,b.useCallback)((()=>{f({type:16})}),[f]),D=(0,b.useCallback)((()=>{f({type:18})}),[f]),A=(0,b.useCallback)((()=>{f({type:17})}),[f]),L=(0,b.useCallback)((e=>{f({type:19,highlightedIndex:e})}),[f]),z=(0,b.useCallback)((e=>{f({type:20,selectedItem:e})}),[f]),B=(0,b.useCallback)((()=>{f({type:22})}),[f]),F=(0,b.useCallback)((e=>{f({type:21,inputValue:e})}),[f]),V=(0,b.useCallback)((e=>({id:E.labelId,htmlFor:E.toggleButtonId,...e})),[E]),H=(0,b.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const c=S.current.state;return I("getMenuProps",l,r,y),{[r]:OT(a,(e=>{y.current=e})),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,tabIndex:-1,...c.isOpen&&c.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(c.highlightedIndex)},onMouseLeave:PT(n,(()=>{f({type:9})})),onKeyDown:PT(o,(e=>{const t=BT(e);t&&P[t]?P[t](e):ZT(t)&&f({type:7,key:t,getItemNodeFromIndex:T})})),onBlur:PT(i,(()=>{if(!1===x.current)return void(x.current=!0);!R.current.isMouseDown&&f({type:8})})),...s}}),[f,S,P,R,I,E,T]),j=(0,b.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{f({type:12})},c=e=>{const t=BT(e);t&&M[t]?M[t](e):ZT(t)&&f({type:15,key:t,getItemNodeFromIndex:T})},u={[o]:OT(i,(e=>{v.current=e})),id:E.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":S.current.state.isOpen,"aria-labelledby":`${E.labelId} ${E.toggleButtonId}`,...a};return a.disabled||(u.onClick=PT(n,l),u.onKeyDown=PT(r,c)),I("getToggleButtonProps",s,o,v),u}),[f,S,M,I,E,T]),$=(0,b.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,disabled:s,...l}=void 0===e?{}:e;const{state:c,props:u}=S.current,d=()=>{f({type:11,index:n})},p=XT(n,t,u.items);if(p<0)throw new Error("Pass either item or item index in getItemProps!");const m={disabled:s,role:"option","aria-selected":`${p===c.highlightedIndex}`,id:E.getItemId(p),[i]:OT(a,(e=>{e&&(w.current[E.getItemId(p)]=e)})),...l};return s||(m.onClick=PT(o,d)),m.onMouseMove=PT(r,(()=>{n!==c.highlightedIndex&&(N.current=!1,f({type:10,index:n,disabled:s}))})),m}),[f,S,N,E]);return{getToggleButtonProps:j,getLabelProps:V,getMenuProps:H,getItemProps:$,toggleMenu:O,openMenu:A,closeMenu:D,setHighlightedIndex:L,selectItem:z,reset:B,setInputValue:F,highlightedIndex:m,isOpen:p,selectedItem:h,inputValue:g}}bN.stateChangeTypes=gN;xT().array.isRequired,xT().func,xT().func,xT().func,xT().bool,xT().number,xT().number,xT().number,xT().bool,xT().bool,xT().bool,xT().any,xT().any,xT().any,xT().string,xT().string,xT().string,xT().string,xT().string,xT().string,xT().func,xT().string,xT().string,xT().func,xT().func,xT().func,xT().func,xT().func,xT().func,xT().shape({addEventListener:xT().func,removeEventListener:xT().func,document:xT().shape({getElementById:xT().func,activeElement:xT().any,body:xT().any})});xT().array,xT().array,xT().array,xT().func,xT().func,xT().func,xT().number,xT().number,xT().number,xT().func,xT().func,xT().string,xT().string,xT().shape({addEventListener:xT().func,removeEventListener:xT().func,document:xT().shape({getElementById:xT().func,activeElement:xT().any,body:xT().any})});const yN=e=>e.__nextUnconstrainedWidth?"":Uf(Wh,"{min-width:130px;}",""),wN=Qu(rg,{target:"eswuck60"})(yN,";"),xN=e=>null==e?void 0:e.name,_N=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case bN.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case bN.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function EN(e){var t;const{__next36pxDefaultSize:n=!1,__nextUnconstrainedWidth:r=!1,className:o,hideLabelFromVision:i,label:l,describedBy:d,options:f,onChange:p,size:m="default",value:h,onMouseOver:g,onMouseOut:v,onFocus:b,onBlur:y,__experimentalShowSelectedHint:w=!1}=e,{getLabelProps:x,getToggleButtonProps:_,getMenuProps:E,getItemProps:C,isOpen:k,highlightedIndex:S,selectedItem:T}=bN({initialSelectedItem:f[0],items:f,itemToString:xN,onSelectedItemChange:p,...null!=h?{selectedItem:h}:void 0,stateReducer:_N}),[N,R]=(0,s.useState)(!1);r||Kl()("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const I=E({className:"components-custom-select-control__menu","aria-hidden":!k}),M=(0,s.useCallback)((e=>{var t;e.stopPropagation(),null==I||null===(t=I.onKeyDown)||void 0===t||t.call(I,e)}),[I]);return null!==(t=I["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete I["aria-activedescendant"],(0,s.createElement)("div",{className:c()("components-custom-select-control",o)},i?(0,s.createElement)(nd,a({as:"label"},x()),l):(0,s.createElement)(Cv,x({className:"components-custom-select-control__label"}),l),(0,s.createElement)(wN,{__next36pxDefaultSize:n,__nextUnconstrainedWidth:r,isFocused:k||N,__unstableInputWidth:r?void 0:"auto",labelPosition:r?void 0:"top",size:m,suffix:(0,s.createElement)(uy,null)},(0,s.createElement)(iy,a({onMouseOver:g,onMouseOut:v,as:"button",onFocus:function(e){R(!0),null==b||b(e)},onBlur:function(e){R(!1),null==y||y(e)},selectSize:m,__next36pxDefaultSize:n},_({"aria-label":l,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:d||(T?(0,u.sprintf)((0,u.__)("Currently selected: %s"),T.name):(0,u.__)("No selection"))})),xN(T),w&&T.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__hint"},T.__experimentalHint))),(0,s.createElement)("ul",a({},I,{onKeyDown:M}),k&&f.map(((e,t)=>(0,s.createElement)("li",C({item:e,index:t,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":t===S,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===T&&(0,s.createElement)(ly,{icon:H_,className:"components-custom-select-control__item-icon"}))))))}function CN(e){return(0,s.createElement)(EN,a({},e,{__experimentalShowSelectedHint:!1}))}function kN(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function SN(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function TN(e){SN(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function NN(e,t){SN(2,arguments);var n=TN(e),r=kN(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function RN(e,t){SN(2,arguments);var n=TN(e),r=kN(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var IN,MN,PN={};function ON(){return PN}function DN(e,t){var n,r,o,i,a,s,l,c;SN(1,arguments);var u=ON(),d=kN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=TN(e),p=f.getDay(),m=(p=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=TN(e),p=f.getDay(),m=6+(pr.getTime()}(e,t))&&(jN(e,n)||function(e,t){SN(2,arguments);var n=TN(e),r=TN(t);return n.getTime()-1}),[_]),k=(0,b.useCallback)((function(e,t){E(t?Array.isArray(e)?e:[e]:function(t){return t.concat(Array.isArray(e)?e:[e])})}),[]),S=(0,b.useCallback)((function(e){return E((function(t){return Array.isArray(e)?t.filter((function(t){return!e.map((function(e){return e.getTime()})).includes(t.getTime())})):t.filter((function(t){return!jN(t,e)}))}))}),[]),T=(0,b.useCallback)((function(e,t){return C(e)?S(e):k(e,t)}),[S,C,k]),N=(0,b.useCallback)((function(e,t,n){E(n?BN({start:e,end:t}):function(n){return n.concat(BN({start:e,end:t}))})}),[]),R=(0,b.useCallback)((function(e,t){E((function(n){return n.filter((function(n){return!BN({start:e,end:t}).map((function(e){return e.getTime()})).includes(n.getTime())}))}))}),[]),I=(0,b.useMemo)((function(){return function(e){SN(1,arguments);var t=e||{},n=TN(t.start),r=TN(t.end).getTime(),o=[];if(!(n.getTime()<=r))throw new RangeError("Invalid interval");var i=n;for(i.setHours(0,0,0,0),i.setDate(1);i.getTime()<=r;)o.push(TN(i)),i.setMonth(i.getMonth()+1);return o}({start:FN(d),end:zN(RN(d,c-1))}).map((function(e){return function(e,t){SN(1,arguments);var n=e||{},r=TN(n.start),o=TN(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=DN(r,t),s=DN(o,t);a.setHours(15),s.setHours(15),i=s.getTime();for(var l=[],c=a;c.getTime()<=i;)c.setHours(0),l.push(TN(c)),(c=AN(c,1)).setHours(15);return l}({start:FN(e),end:zN(e)},{weekStartsOn:r}).map((function(e){return BN({start:DN(e,{weekStartsOn:r}),end:VN(e,{weekStartsOn:r})})}))}))}),[d,r,c]);return{clearTime:GN,inRange:UN,viewing:d,setViewing:f,viewToday:p,viewMonth:m,viewPreviousMonth:h,viewNextMonth:g,viewYear:v,viewPreviousYear:y,viewNextYear:w,selected:_,setSelected:E,clearSelected:function(){return E([])},isSelected:C,select:k,deselect:S,toggle:T,selectRange:N,deselectRange:R,calendar:I}};function qN(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function KN(e){return KN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KN(e)}function XN(e){qN(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===KN(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function ZN(e){qN(1,arguments);var t=XN(e);return t.setHours(0,0,0,0),t}function JN(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function QN(e,t){qN(2,arguments);var n=XN(e),r=JN(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function eR(e,t){qN(2,arguments);var n=JN(t);return QN(e,-n)}function tR(e){return tR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tR(e)}function nR(e){return qN(1,arguments),e instanceof Date||"object"===tR(e)&&"[object Date]"===Object.prototype.toString.call(e)}function rR(e){if(qN(1,arguments),!nR(e)&&"number"!=typeof e)return!1;var t=XN(e);return!isNaN(Number(t))}function oR(e,t){qN(2,arguments);var n=XN(e).getTime(),r=JN(t);return new Date(n+r)}function iR(e,t){qN(2,arguments);var n=JN(t);return oR(e,-n)}var aR=864e5;function sR(e){qN(1,arguments);var t=1,n=XN(e),r=n.getUTCDay(),o=(r=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function cR(e){qN(1,arguments);var t=lR(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=sR(n);return r}var uR=6048e5;var dR={};function fR(){return dR}function pR(e,t){var n,r,o,i,a,s,l,c;qN(1,arguments);var u=fR(),d=JN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=XN(e),p=f.getUTCDay(),m=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var h=pR(m,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var v=pR(g,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function hR(e,t){var n,r,o,i,a,s,l,c;qN(1,arguments);var u=fR(),d=JN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=mR(e,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var m=pR(p,t);return m}var gR=6048e5;function vR(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return vR("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):vR(n+1,2)},d:function(e,t){return vR(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return vR(e.getUTCHours()%12||12,t.length)},H:function(e,t){return vR(e.getUTCHours(),t.length)},m:function(e,t){return vR(e.getUTCMinutes(),t.length)},s:function(e,t){return vR(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return vR(Math.floor(r*Math.pow(10,n-3)),t.length)}},yR=bR,wR="midnight",xR="noon",_R="morning",ER="afternoon",CR="evening",kR="night",SR={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return yR.y(e,t)},Y:function(e,t,n,r){var o=mR(e,r),i=o>0?o:1-o;return"YY"===t?vR(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):vR(i,t.length)},R:function(e,t){return vR(lR(e),t.length)},u:function(e,t){return vR(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return vR(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return vR(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return yR.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return vR(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){qN(1,arguments);var n=XN(e),r=pR(n,t).getTime()-hR(n,t).getTime();return Math.round(r/gR)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):vR(o,t.length)},I:function(e,t,n){var r=function(e){qN(1,arguments);var t=XN(e),n=sR(t).getTime()-cR(t).getTime();return Math.round(n/uR)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):vR(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):yR.d(e,t)},D:function(e,t,n){var r=function(e){qN(1,arguments);var t=XN(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/aR)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):vR(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return vR(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return vR(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return vR(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?xR:0===o?wR:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?CR:o>=12?ER:o>=4?_R:kR,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return yR.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):yR.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):vR(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):vR(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):yR.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):yR.s(e,t)},S:function(e,t){return yR.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return NR(o);case"XXXX":case"XX":return RR(o);default:return RR(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return NR(o);case"xxxx":case"xx":return RR(o);default:return RR(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+TR(o,":");default:return"GMT"+RR(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+TR(o,":");default:return"GMT"+RR(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return vR(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return vR((r._originalDate||e).getTime(),t.length)}};function TR(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+vR(i,2)}function NR(e,t){return e%60==0?(e>0?"-":"+")+vR(Math.abs(e)/60,2):RR(e,t)}function RR(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+vR(Math.floor(o/60),2)+n+vR(o%60,2)}var IR=SR,MR=function(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"})}},PR=function(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"})}},OR={p:PR,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return MR(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",MR(o,t)).replace("{{time}}",PR(i,t))}},DR=OR;function AR(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var LR=["D","DD"],zR=["YY","YYYY"];function BR(e){return-1!==LR.indexOf(e)}function FR(e){return-1!==zR.indexOf(e)}function VR(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var HR={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"}},jR=function(e,t,n){var r,o=HR[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $R(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var WR={date:$R({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$R({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:$R({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},UR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GR=function(e,t,n,r){return UR[e]};function YR(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var qR={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:YR({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:YR({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:YR({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:YR({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:YR({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"})},KR=qR;function XR(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?JR(l,(function(e){return e.test(s)})):ZR(l,(function(e){return e.test(s)}));a=e.valueCallback?e.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var u=t.slice(s.length);return{value:a,rest:u}}}function ZR(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function JR(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(QR.matchPattern);if(!n)return null;var r=n[0],o=e.match(QR.parsePattern);if(!o)return null;var i=QR.valueCallback?QR.valueCallback(o[0]):o[0];i=t.valueCallback?t.valueCallback(i):i;var a=e.slice(r.length);return{value:i,rest:a}}),era:XR({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:XR({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:function(e){return e+1}}),month:XR({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:XR({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:XR({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"})},tI={code:"en-US",formatDistance:jR,formatLong:WR,formatRelative:GR,localize:KR,match:eI,options:{weekStartsOn:0,firstWeekContainsDate:1}},nI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oI=/^'([^]*?)'?$/,iI=/''/g,aI=/[a-zA-Z]/;function sI(e,t,n){var r,o,i,a,s,l,c,u,d,f,p,m,h,g,v,b,y,w;qN(2,arguments);var x=String(t),_=fR(),E=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:_.locale)&&void 0!==r?r:tI,C=JN(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:_.firstWeekContainsDate)&&void 0!==a?a:null===(d=_.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=JN(null!==(p=null!==(m=null!==(h=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(b=v.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var S=XN(e);if(!rR(S))throw new RangeError("Invalid time value");var T=AR(S),N=iR(S,T),R={firstWeekContainsDate:C,weekStartsOn:k,locale:E,_originalDate:S},I=x.match(rI).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,DR[t])(e,E.formatLong):e})).join("").match(nI).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return lI(r);var i=IR[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!FR(r)||VR(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!BR(r)||VR(r,t,String(e)),i(N,r,E.localize,R);if(o.match(aI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return I}function lI(e){var t=e.match(oI);return t?t[1].replace(iI,"'"):e}function cI(e,t){qN(2,arguments);var n=XN(e),r=XN(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function uI(e,t){qN(2,arguments);var n=XN(e),r=XN(t);return n.getTime()===r.getTime()}function dI(e,t){qN(2,arguments);var n=ZN(e),r=ZN(t);return n.getTime()===r.getTime()}function fI(e,t){qN(2,arguments);var n=XN(e),r=JN(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function pI(e,t){qN(2,arguments);var n=JN(t),r=7*n;return fI(e,r)}var mI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var hI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})),gI=window.wp.date;const vI=Qu("div",{target:"e105ri6r5"})({name:"1khn195",styles:"box-sizing:border-box"}),bI=Qu(Yv,{target:"e105ri6r4"})("margin-bottom:",Xm(4),";"),yI=Qu(U_,{target:"e105ri6r3"})("font-size:",hh.fontSize,";font-weight:",hh.fontWeight,";strong{font-weight:",hh.fontWeightHeading,";}"),wI=Qu("div",{target:"e105ri6r2"})("column-gap:",Xm(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",Xm(2),";"),xI=Qu("div",{target:"e105ri6r1"})("color:",Tp.gray[700],";font-size:",hh.fontSize,";line-height:",hh.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),_I=Qu(id,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:100%;height:",Xm(7),";width:",Xm(7),";",(e=>e.isSelected&&`\n\t\t\tbackground: ${Tp.ui.theme};\n\t\t\tcolor: ${Tp.white};\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${Tp.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tbackground: ${e.isSelected?Tp.white:Tp.ui.theme};\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 0;\n\t\t\tcontent: " ";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t`),";");function EI(e){return"string"==typeof e?new Date(e):XN(e)}const CI="yyyy-MM-dd'T'HH:mm:ss";function kI(e){let{day:t,column:n,isSelected:r,isFocusable:o,isFocusAllowed:i,isToday:a,isInvalid:l,numEvents:c,onClick:u,onKeyDown:d}=e;const f=(0,s.useRef)();return(0,s.useEffect)((()=>{f.current&&o&&i&&f.current.focus()}),[o]),(0,s.createElement)(_I,{ref:f,className:"components-datetime__date__day",disabled:l,tabIndex:o?0:-1,"aria-label":SI(t,r,c),column:n,isSelected:r,isToday:a,hasEvents:c>0,onClick:u,onKeyDown:d},(0,gI.dateI18n)("j",t,-t.getTimezoneOffset()))}function SI(e,t,n){const{formats:r}=(0,gI.getSettings)(),o=(0,gI.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,u.sprintf)((0,u._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,u.sprintf)((0,u.__)("%1$s. Selected"),o):n>0?(0,u.sprintf)((0,u._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}var TI=function(e){let{currentDate:t,onChange:n,events:r=[],isInvalidDate:o,onMonthPreviewed:i,startOfWeek:a=0}=e;const l=t?EI(t):new Date,{calendar:c,viewing:d,setSelected:f,setViewing:p,isSelected:m,viewPreviousMonth:h,viewNextMonth:g}=YN({selected:[ZN(l)],viewing:ZN(l),weekStartsOn:a}),[v,b]=(0,s.useState)(ZN(l)),[y,w]=(0,s.useState)(!1),[x,_]=(0,s.useState)(t);return t!==x&&(_(t),f([ZN(l)]),p(ZN(l)),b(ZN(l))),(0,s.createElement)(vI,{className:"components-datetime__date",role:"application","aria-label":(0,u.__)("Calendar")},(0,s.createElement)(bI,null,(0,s.createElement)(id,{icon:(0,u.isRTL)()?mI:hI,variant:"tertiary","aria-label":(0,u.__)("View previous month"),onClick:()=>{h(),b(eR(v,1)),null==i||i(sI(eR(d,1),CI))}}),(0,s.createElement)(yI,{level:3},(0,s.createElement)("strong",null,(0,gI.dateI18n)("F",d,-d.getTimezoneOffset()))," ",(0,gI.dateI18n)("Y",d,-d.getTimezoneOffset())),(0,s.createElement)(id,{icon:(0,u.isRTL)()?hI:mI,variant:"tertiary","aria-label":(0,u.__)("View next month"),onClick:()=>{g(),b(QN(v,1)),null==i||i(sI(QN(d,1),CI))}})),(0,s.createElement)(wI,{onFocus:()=>w(!0),onBlur:()=>w(!1)},c[0][0].map((e=>(0,s.createElement)(xI,{key:e.toString()},(0,gI.dateI18n)("D",e,-e.getTimezoneOffset())))),c[0].map((e=>e.map(((e,t)=>cI(e,d)?(0,s.createElement)(kI,{key:e.toString(),day:e,column:t+1,isSelected:m(e),isFocusable:uI(e,v),isFocusAllowed:y,isToday:dI(e,new Date),isInvalid:!!o&&o(e),numEvents:r.filter((t=>dI(t.date,e))).length,onClick:()=>{f([e]),b(e),null==n||n(sI(new Date(e.getFullYear(),e.getMonth(),e.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),CI))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=fI(e,(0,u.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=fI(e,(0,u.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=function(e,t){qN(2,arguments);var n=JN(t);return pI(e,-n)}(e,1)),"ArrowDown"===t.key&&(n=pI(e,1)),"PageUp"===t.key&&(n=eR(e,1)),"PageDown"===t.key&&(n=QN(e,1)),"Home"===t.key&&(n=function(e,t){var n,r,o,i,a,s,l,c;qN(1,arguments);var u=fR(),d=JN(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=XN(e),p=f.getDay(),m=(p=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=XN(e),p=f.getDay(),m=6+(p{const{timezone:e}=(0,gI.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",r=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offset}`,o="UTC"===e.string?(0,u.__)("Coordinated Universal Time"):`(${r}) ${e.string.replace("_"," ")}`;return(0,s.createElement)(Ff,{position:"top center",text:o},(0,s.createElement)($I,{className:"components-datetime__timezone"},r))};function UI(e,t){return t?(e%12+12)%24:e%12}function GI(e){return(t,n)=>{const r={...t};return n.type!==rv&&n.type!==dv&&n.type!==cv||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}var YI=function(e){let{is12Hour:t,currentTime:n,onChange:r}=e;const[o,i]=(0,s.useState)((()=>n?NI(EI(n)):new Date));(0,s.useEffect)((()=>{i(n?NI(EI(n)):new Date)}),[n]);const{day:a,month:l,year:c,minutes:d,hours:f,am:p}=(0,s.useMemo)((()=>({day:sI(o,"dd"),month:sI(o,"MM"),year:sI(o,"yyyy"),minutes:sI(o,"mm"),hours:sI(o,t?"hh":"HH"),am:sI(o,"a")})),[o,t]),m=e=>(n,a)=>{let{event:s}=a;if(!(s.target instanceof HTMLInputElement))return;if(!s.target.validity.valid)return;let l=Number(n);"hours"===e&&t&&(l=UI(l,"PM"===p));const c=function(e,t){if(qN(2,arguments),"object"!==MI(t)||null===t)throw new RangeError("values parameter must be an object");var n=XN(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=II(n,t.month)),null!=t.date&&n.setDate(JN(t.date)),null!=t.hours&&n.setHours(JN(t.hours)),null!=t.minutes&&n.setMinutes(JN(t.minutes)),null!=t.seconds&&n.setSeconds(JN(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(JN(t.milliseconds)),n)}(o,{[e]:l});i(c),null==r||r(sI(c,CI))};function h(e){return()=>{if(p===e)return;const t=parseInt(f,10),n=function(e,t){qN(2,arguments);var n=XN(e),r=JN(t);return n.setHours(r),n}(o,UI(t,"PM"===e));i(n),null==r||r(sI(n,CI))}}const g=(0,s.createElement)(HI,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,u.__)("Day"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:a,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")}),v=(0,s.createElement)(FI,null,(0,s.createElement)(VI,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,u.__)("Month"),hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,value:l,options:[{value:"01",label:(0,u.__)("January")},{value:"02",label:(0,u.__)("February")},{value:"03",label:(0,u.__)("March")},{value:"04",label:(0,u.__)("April")},{value:"05",label:(0,u.__)("May")},{value:"06",label:(0,u.__)("June")},{value:"07",label:(0,u.__)("July")},{value:"08",label:(0,u.__)("August")},{value:"09",label:(0,u.__)("September")},{value:"10",label:(0,u.__)("October")},{value:"11",label:(0,u.__)("November")},{value:"12",label:(0,u.__)("December")}],onChange:e=>{const t=II(o,Number(e)-1);i(t),null==r||r(sI(t,CI))}}));return(0,s.createElement)(PI,{className:"components-datetime__time"},(0,s.createElement)(OI,null,(0,s.createElement)(Rv.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Time")),(0,s.createElement)(Yv,{className:"components-datetime__time-wrapper"},(0,s.createElement)(DI,{className:"components-datetime__time-field components-datetime__time-field-time"},(0,s.createElement)(LI,{className:"components-datetime__time-field-hours-input",label:(0,u.__)("Hours"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:f,step:1,min:t?1:0,max:t?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("hours"),__unstableStateReducer:GI(2)}),(0,s.createElement)(zI,{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,s.createElement)(BI,{className:"components-datetime__time-field-minutes-input",label:(0,u.__)("Minutes"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:d,step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("minutes"),__unstableStateReducer:GI(2)})),t&&(0,s.createElement)(IC,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,s.createElement)(id,{className:"components-datetime__time-am-button",variant:"AM"===p?"primary":"secondary",onClick:h("AM")},(0,u.__)("AM")),(0,s.createElement)(id,{className:"components-datetime__time-pm-button",variant:"PM"===p?"primary":"secondary",onClick:h("PM")},(0,u.__)("PM"))),(0,s.createElement)(Xv,null),(0,s.createElement)(WI,null))),(0,s.createElement)(OI,null,(0,s.createElement)(Rv.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Date")),(0,s.createElement)(Yv,{className:"components-datetime__time-wrapper"},t?(0,s.createElement)(s.Fragment,null,v,g):(0,s.createElement)(s.Fragment,null,g,v),(0,s.createElement)(jI,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,u.__)("Year"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:c,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:GI(4)}))))};const qI=Qu($_,{target:"e1p5onf01"})({name:"1khn195",styles:"box-sizing:border-box"}),KI=Qu("div",{target:"e1p5onf00"})({name:"l0rwn2",styles:"min-width:260px"}),XI=()=>{};const ZI=(0,s.forwardRef)((function(e,t){let{currentDate:n,is12Hour:r,isInvalidDate:o,onMonthPreviewed:i=XI,onChange:a,events:l,startOfWeek:c,__nextRemoveHelpButton:d=!1,__nextRemoveResetButton:f=!1}=e;d||Kl()("Help button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."}),f||Kl()("Reset button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."});const[p,m]=(0,s.useState)(!1);return(0,s.createElement)(qI,{ref:t,className:"components-datetime",spacing:4},!p&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(YI,{currentTime:n,onChange:a,is12Hour:r}),(0,s.createElement)(TI,{currentDate:n,onChange:a,isInvalidDate:o,events:l,onMonthPreviewed:i,startOfWeek:c})),p&&(0,s.createElement)(KI,{className:"components-datetime__calendar-help"},(0,s.createElement)(U_,{level:4},(0,u.__)("Click to Select")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,u.__)("Click the right or left arrows to select other months in the past or the future.")),(0,s.createElement)("li",null,(0,u.__)("Click the desired day to select it."))),(0,s.createElement)(U_,{level:4},(0,u.__)("Navigating with a keyboard")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u._x)("Enter","keyboard button")},"↵")," ",(0,s.createElement)("span",null,(0,u.__)("Select the date in focus."))),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Left and Right Arrows")},"←/→")," ",(0,u.__)("Move backward (left) or forward (right) by one day.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Up and Down Arrows")},"↑/↓")," ",(0,u.__)("Move backward (up) or forward (down) by one week.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Page Up and Page Down")},(0,u.__)("PgUp/PgDn"))," ",(0,u.__)("Move backward (PgUp) or forward (PgDn) by one month.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,u.__)("Home and End")},(0,u.__)("Home/End"))," ",(0,u.__)("Go to the first (Home) or last (End) day of a week.")))),(!f||!d)&&(0,s.createElement)(Yv,{className:"components-datetime__buttons"},!f&&!p&&n&&(0,s.createElement)(id,{className:"components-datetime__date-reset-button",variant:"link",onClick:()=>null==a?void 0:a(null)},(0,u.__)("Reset")),(0,s.createElement)(Xv,null),!d&&(0,s.createElement)(id,{className:"components-datetime__date-help-toggle",variant:"link",onClick:function(){m(!p)}},p?(0,u.__)("Close"):(0,u.__)("Calendar Help"))))}));var JI=ZI;var QI=[{name:(0,u._x)("None","Size of a UI element"),slug:"none"},{name:(0,u._x)("Small","Size of a UI element"),slug:"small"},{name:(0,u._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,u._x)("Large","Size of a UI element"),slug:"large"},{name:(0,u._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];var eM=function(e){const{label:t,value:n,sizes:r=QI,icon:o,onChange:i,className:a=""}=e,l=(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(Zl,{icon:o}),t);return(0,s.createElement)(py,{className:c()(a,"block-editor-dimension-control"),label:l,hideLabelFromVision:!1,value:n,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(r,e);t&&n!==t.slug?"function"==typeof i&&i(t.slug):i(void 0)},options:(e=>{const t=e.map((e=>{let{name:t,slug:n}=e;return{label:t,value:n}}));return[{label:(0,u.__)("Default"),value:""}].concat(t)})(r)})};const tM={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},nM=(0,s.createContext)(!1),{Consumer:rM,Provider:oM}=nM;function iM(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=Vu();return(0,s.createElement)(oM,{value:r},(0,s.createElement)("div",a({inert:r?"true":void 0,className:r?i(tM,t,"components-disabled"):void 0},o),n))}iM.Context=nM,iM.Consumer=rM;var aM=iM;const sM="is-dragging-components-draggable";var lM=function(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:a,transferData:l,__experimentalTransferDataType:c="text",__experimentalDragComponent:u}=e;const f=(0,s.useRef)(null),p=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>()=>{p.current()}),[]),(0,s.createElement)(s.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(c,JSON.stringify(l));const o=t.createElement("div");o.style.top="0",o.style.left="0";const s=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(s.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let u=0,m=0;if(f.current){u=e.clientX,m=e.clientY,o.style.transform=`translate( ${u}px, ${m}px )`;const n=t.createElement("div");n.innerHTML=f.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(a),n=e.getBoundingClientRect(),r=e.parentNode,i=n.top,s=n.left;o.style.width=`${n.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${a}`,u=s-0,m=i-0,o.style.transform=`translate( ${u}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),o.appendChild(l),null==r||r.appendChild(o)}let h=e.clientX,g=e.clientY;const v=(0,d.throttle)((function(e){if(h===e.clientX&&g===e.clientY)return;const t=u+e.clientX-h,n=m+e.clientY-g;o.style.transform=`translate( ${t}px, ${n}px )`,h=e.clientX,g=e.clientY,u=t,m=n,r&&r(e)}),16);let b;t.addEventListener("dragover",v),t.body.classList.add(sM),e.persist(),n&&(b=setTimeout((()=>n(e)))),p.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),s&&s.parentNode&&s.parentNode.removeChild(s),t.body.classList.remove(sM),t.removeEventListener("dragover",v),clearTimeout(b)}},onDraggableEnd:function(e){e.preventDefault(),p.current(),o&&o(e)}}),u&&(0,s.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},u))};var cM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.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"}));var uM=function(e){let{className:t,label:n,onFilesDrop:r,onHTMLDrop:o,onDrop:i,...l}=e;const[f,p]=(0,s.useState)(),[m,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),b=(0,d.__experimentalUseDropZone)({onDrop(e){var t;const n=e.dataTransfer?(0,kS.getFilesFromDataTransfer)(e.dataTransfer):[],a=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/html");a&&o?o(a):n.length&&r?r(n):i&&i(e)},onDragStart(e){var t,n;p(!0);let r="default";null!==(t=e.dataTransfer)&&void 0!==t&&t.types.includes("text/html")?r="html":(null!==(n=e.dataTransfer)&&void 0!==n&&n.types.includes("Files")||(e.dataTransfer?(0,kS.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(r="file"),v(r)},onDragEnd(){p(!1),v(void 0)},onDragEnter(){h(!0)},onDragLeave(){h(!1)}}),y=(0,d.useReducedMotion)();let w;const x={hidden:{scaleY:0,opacity:0},show:{scaleY:1,opacity:1,transition:{type:"tween",duration:.2,delay:.1,delayChildren:.2}},exit:{scaleY:1,opacity:0,transition:{duration:.3,delayChildren:0}}},_={hidden:{opacity:0,scale:.75},show:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};m&&(w=(0,s.createElement)(Gl.div,{variants:x,initial:y?"show":"hidden",animate:"show",exit:y?"show":"exit",className:"components-drop-zone__content",style:{pointerEvents:"none"}},(0,s.createElement)(Gl.div,{variants:_},(0,s.createElement)(ly,{icon:cM,className:"components-drop-zone__content-icon"}),(0,s.createElement)("span",{className:"components-drop-zone__content-text"},n||(0,u.__)("Drop files to upload")))));const E=c()("components-drop-zone",t,{"is-active":(f||m)&&("file"===g&&r||"html"===g&&o||"default"===g&&i),"is-dragging-over-document":f,"is-dragging-over-element":m,[`is-dragging-${g}`]:!!g});return(0,s.createElement)("div",a({},l,{ref:b,className:E}),y?w:(0,s.createElement)(Am,null,w))};function dM(e){let{children:t}=e;return Kl()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),t}var fM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));function pM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}wp([xp]);var mM=function(e){let{values:t}=e;return t?(0,s.createElement)(Jb,{colorValue:pM(t,"135deg")}):(0,s.createElement)(Zl,{icon:fM})};function hM(e){let{label:t,value:n,colors:r,disableCustomColors:o,enableAlpha:i,onChange:a}=e;const[l,c]=(0,s.useState)(!1);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(id,{className:"components-color-list-picker__swatch-button",onClick:()=>c((e=>!e))},(0,s.createElement)(Yv,{justify:"flex-start",spacing:2},n?(0,s.createElement)(Jb,{colorValue:n,className:"components-color-list-picker__swatch-color"}):(0,s.createElement)(Zl,{icon:fM}),(0,s.createElement)("span",null,t))),l&&(0,s.createElement)(eE,{className:"components-color-list-picker__color-picker",colors:r,value:n,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i}))}var gM=function(e){let{colors:t,labels:n,value:r=[],disableCustomColors:o,enableAlpha:i,onChange:a}=e;return(0,s.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,s.createElement)(hM,{key:n,label:e,value:r[n],colors:t,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=r.slice();t[n]=e,a(t)}}))))};const vM=["#333","#CCC"];function bM(e){let{value:t,onChange:n}=e;const r=!!t,o=r?t:vM,i=pM(o),a=(l=o).map(((e,t)=>({position:100*t/(l.length-1),color:e})));var l;return(0,s.createElement)(iS,{disableInserter:!0,background:i,hasGradient:r,value:a,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}var yM=function(e){let{clearable:t=!0,unsetable:n=!0,colorPalette:r,duotonePalette:o,disableCustomColors:i,disableCustomDuotone:a,value:l,onChange:c}=e;const[d,f]=(0,s.useMemo)((()=>{return!(e=r)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:bp(t).brightness()}})).reduce(((e,t)=>{let[n,r]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=r.brightness?t:r]}),[{brightness:1},{brightness:0}]).map((e=>{let{color:t}=e;return t}));var e}),[r]),p="unset"===l,m=(0,s.createElement)(j_.Option,{key:"unset",value:"unset",isSelected:p,tooltipText:(0,u.__)("Unset"),className:"components-duotone-picker__color-indicator",onClick:()=>{c(p?void 0:"unset")}}),h=o.map((e=>{let{colors:t,slug:n,name:r}=e;const o={background:pM(t,"135deg"),color:"transparent"},i=null!=r?r:(0,u.sprintf)((0,u.__)("Duotone code: %s"),n),a=r?(0,u.sprintf)((0,u.__)("Duotone: %s"),r):i,d=Ql()(t,l);return(0,s.createElement)(j_.Option,{key:n,value:t,isSelected:d,"aria-label":a,tooltipText:i,style:o,onClick:()=>{c(d?void 0:t)}})}));return(0,s.createElement)(j_,{options:n?[m,...h]:h,actions:!!t&&(0,s.createElement)(j_.ButtonAction,{onClick:()=>c(void 0)},(0,u.__)("Clear"))},(0,s.createElement)(Xv,{paddingTop:4},(0,s.createElement)($_,{spacing:3},!i&&!a&&(0,s.createElement)(bM,{value:p?void 0:l,onChange:c}),!a&&(0,s.createElement)(gM,{labels:[(0,u.__)("Shadows"),(0,u.__)("Highlights")],colors:r,value:p?void 0:l,disableCustomColors:i,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=d),e[1]||(e[1]=f);const t=e.length>=2?e:void 0;c(t)}}))))};var wM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const xM=Qu(ly,{target:"esh4a730"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});var _M=(0,s.forwardRef)((function(e,t){const{href:n,children:r,className:o,rel:i="",...l}=e,d=[...new Set([...i.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),f=c()("components-external-link",o),p=!(null==n||!n.startsWith("#"));return(0,s.createElement)("a",a({},l,{className:f,href:n,onClick:t=>{p&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:d,ref:t}),r,(0,s.createElement)(nd,{as:"span"},(0,u.__)("(opens in a new tab)")),(0,s.createElement)(xM,{icon:wM,className:"components-external-link__icon"}))}));const EM={width:200,height:170},CM=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function kM(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(".");return t[t.length-1]}function SM(e){return Math.round(100*e)}const TM=Qu("div",{target:"eeew7dm8"})({name:"w0nf6b",styles:"background-color:transparent;text-align:center;width:100%"}),NM=Qu("div",{target:"eeew7dm7"})({name:"megach",styles:"align-items:center;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"}),RM=Qu("div",{target:"eeew7dm6"})("background:",Tp.gray[100],";box-sizing:border-box;height:",EM.height,"px;max-width:280px;min-width:",EM.width,"px;width:100%;"),IM=Qu(gE,{target:"eeew7dm5"})({name:"1pzk433",styles:"width:100px"});var MM={name:"1mn7kwb",styles:"padding-bottom:1em"};const PM=e=>{let{__nextHasNoMarginBottom:t}=e;return t?void 0:MM};var OM={name:"1mn7kwb",styles:"padding-bottom:1em"};const DM=e=>{let{hasHelpText:t=!1}=e;return t?OM:void 0},AM=Qu(Jm,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",DM," ",PM,";"),LM=Qu("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;opacity:",(e=>{let{showOverlay:t}=e;return t?1:0}),";"),zM=Qu("div",{target:"eeew7dm2"})({name:"1d42i6k",styles:"background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )"}),BM=Qu(zM,{target:"eeew7dm1"})({name:"1qp910y",styles:"height:1px;left:0;right:0"}),FM=Qu(zM,{target:"eeew7dm0"})({name:"1oz3zka",styles:"width:1px;top:0;bottom:0"}),VM=()=>{};function HM(e){let{__nextHasNoMarginBottom:t,hasHelpText:n,onChange:r=VM,point:o={x:.5,y:.5}}=e;const i=SM(o.x),a=SM(o.y),l=(e,t)=>{if(void 0===e)return;const n=parseInt(e,10);isNaN(n)||r({...o,[t]:n/100})};return(0,s.createElement)(AM,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:t,hasHelpText:n},(0,s.createElement)(jM,{label:(0,u.__)("Left"),value:[i,"%"].join(""),onChange:e=>l(e,"x"),dragDirection:"e"}),(0,s.createElement)(jM,{label:(0,u.__)("Top"),value:[a,"%"].join(""),onChange:e=>l(e,"y"),dragDirection:"s"}))}function jM(e){return(0,s.createElement)(IM,a({className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:100,min:0,units:[{value:"%",label:"%"}]},e))}const $M=Qu("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:48px;margin:-24px 0 0 -24px;position:absolute;user-select:none;width:48px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.6 );border-radius:50%;backdrop-filter:blur( 4px );box-shadow:rgb( 0 0 0 / 20% ) 0px 0px 10px;",(e=>{let{isDragging:t}=e;return t&&"cursor: grabbing;"}),";");function WM(e){let{left:t="50%",top:n="50%",...r}=e;const o=c()("components-focal-point-picker__icon_container"),i={left:t,top:n};return(0,s.createElement)($M,a({},r,{className:o,style:i}))}function UM(e){let{bounds:t,...n}=e;return(0,s.createElement)(LM,a({},n,{className:"components-focal-point-picker__grid",style:{width:t.width,height:t.height}}),(0,s.createElement)(BM,{style:{top:"33%"}}),(0,s.createElement)(BM,{style:{top:"66%"}}),(0,s.createElement)(FM,{style:{left:"33%"}}),(0,s.createElement)(FM,{style:{left:"66%"}}))}function GM(e){let{alt:t,autoPlay:n,src:r,onLoad:o,mediaRef:i,muted:l=!0,...c}=e;if(!r)return(0,s.createElement)(RM,a({className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:i},c));const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&(e.startsWith("data:video/")||CM.includes(kM(e)))}(r);return u?(0,s.createElement)("video",a({},c,{autoPlay:n,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:l,onLoadedData:o,ref:i,src:r})):(0,s.createElement)("img",a({},c,{alt:t,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:r}))}var YM=function e(t){let{__nextHasNoMarginBottom:n,autoPlay:r=!0,className:o,help:i,label:l,onChange:f,onDrag:p,onDragEnd:m,onDragStart:h,resolvePoint:g,url:v,value:b={x:.5,y:.5},...y}=t;const[w,x]=(0,s.useState)(b),[_,E]=(0,s.useState)(!1),{startDrag:C,endDrag:k,isDragging:S}=(0,d.__experimentalUseDragging)({onDragStart:e=>{var t;null===(t=R.current)||void 0===t||t.focus();const n=O(e);n&&(null==h||h(n,e),x(n))},onDragMove:e=>{e.preventDefault();const t=O(e);t&&(null==p||p(t,e),x(t))},onDragEnd:()=>{null==m||m(),null==f||f(w)}}),{x:T,y:N}=S?w:b,R=(0,s.useRef)(null),[I,M]=(0,s.useState)(EM),P=(0,s.useRef)((()=>{if(!R.current)return;const{clientWidth:e,clientHeight:t}=R.current;M(e>0&&t>0?{width:e,height:t}:{...EM})}));(0,s.useEffect)((()=>{const e=P.current;if(!R.current)return;const{defaultView:t}=R.current.ownerDocument;return null==t||t.addEventListener("resize",e),()=>null==t?void 0:t.removeEventListener("resize",e)}),[]),(0,d.useIsomorphicLayoutEffect)((()=>{P.current()}),[]);const O=e=>{let{clientX:t,clientY:n,shiftKey:r}=e;if(!R.current)return;const{top:o,left:i}=R.current.getBoundingClientRect();let a=(t-i)/I.width,s=(n-o)/I.height;return r&&(a=.1*Math.round(a/.1),s=.1*Math.round(s/.1)),D({x:a,y:s})},D=e=>{var t;const n=null!==(t=null==g?void 0:g(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},A={left:T*I.width,top:N*I.height},L=c()("components-focal-point-picker-control",o),z=`inspector-focal-point-picker-control-${(0,d.useInstanceId)(e)}`;return tc((()=>{E(!0);const e=window.setTimeout((()=>{E(!1)}),600);return()=>window.clearTimeout(e)}),[T,N]),(0,s.createElement)(Rv,a({},y,{__nextHasNoMarginBottom:n,label:l,id:z,help:i,className:L}),(0,s.createElement)(TM,{className:"components-focal-point-picker-wrapper"},(0,s.createElement)(NM,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:T,y:N},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,a="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[a]=r[a]+i,null==f||f(D(r))},onMouseDown:C,onBlur:()=>{S&&k()},ref:R,role:"button",tabIndex:-1},(0,s.createElement)(UM,{bounds:I,showOverlay:_}),(0,s.createElement)(GM,{alt:(0,u.__)("Media preview"),autoPlay:r,onLoad:P.current,src:v}),(0,s.createElement)(WM,a({},A,{isDragging:S})))),(0,s.createElement)(HM,{__nextHasNoMarginBottom:n,hasHelpText:!!i,point:{x:T,y:N},onChange:e=>{null==f||f(D(e))}}))};function qM(e){let{iframeRef:t,...n}=e;const r=(0,d.useMergeRefs)([t,(0,d.useFocusableIframe)()]);return Kl()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,s.createElement)("iframe",a({ref:r},n))}var KM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));function XM(e){const[t,...n]=e;if(!t)return null;const[,r]=lE(t.size);return n.every((e=>{const[,t]=lE(e.size);return t===r}))?r:null}const ZM=Qu("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),JM=Qu(Rv.VisualLabel,{target:"e8tqeku3"})("display:flex;gap:",Xm(1),";justify-content:flex-start;margin-bottom:0;"),QM=Qu("span",{target:"e8tqeku2"})("color:",Tp.gray[700],";"),eP=Qu("div",{target:"e8tqeku1"})((e=>!e.__nextHasNoMarginBottom&&`margin-bottom: ${Xm(6)};`),";"),tP=Qu(id,{target:"e8tqeku0"})("&&&{height:",(e=>"__unstable-large"===e.size?"40px":"30px"),";}"),nP={key:"default",name:(0,u.__)("Default"),value:void 0},rP={key:"custom",name:(0,u.__)("Custom")};var oP=e=>{var t;const{fontSizes:n,value:r,disableCustomFontSizes:o,size:i,onChange:a,onSelectCustom:l}=e,c=!!XM(n),d=[nP,...n.map((e=>{let t;if(c){const[n]=lE(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,__experimentalHint:t}})),...o?[]:[rP]],f=r?null!==(t=d.find((e=>e.value===r)))&&void 0!==t?t:rP:nP;return(0,s.createElement)(EN,{__nextUnconstrainedWidth:!0,className:"components-font-size-picker__select",label:(0,u.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,u.sprintf)((0,u.__)("Currently selected font size: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;t===rP?l():a(t.value)},size:i})};const iP=e=>{const t=Uf("border-color:",Tp.ui.border,";","");return Uf(e&&t," &:hover{border-color:",Tp.ui.borderHover,";}&:focus-within{border-color:",Tp.ui.borderFocus,";box-shadow:",hh.controlBoxShadowFocus,";outline:none;z-index:1;}","")},aP=e=>Uf("min-height:",{default:"36px","__unstable-large":"40px"}[e],";",""),sP={name:"7whenc",styles:"display:flex;width:100%"},lP=Qu("div",{target:"eakva831"})("background:",Tp.gray[900],";border-radius:",hh.controlBorderRadius,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",hh.transitionDurationFast," ease;",Np("transition")," z-index:1;"),cP=Qu("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function uP(e){void 0===e&&(e={});var t=zp(e),n=t.state,r=t.loop,o=void 0===r||r,i=h(t,["state","loop"]),a=(0,b.useState)(n),s=a[0],l=a[1],c=im(m(m({},i),{},{loop:o}));return m(m({},c),{},{state:s,setState:l})}var dP=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],fP=[].concat(dP,["value","checked","unstable_checkOnFocus"]),pP=z({as:"div",useHook:F({name:"RadioGroup",compose:pm,keys:dP,useProps:function(e,t){return m({role:"radiogroup"},t)}}),useCreateElement:function(e,t,n){return N(e,t,n)}});var mP=(0,s.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,a]=(0,s.useState)(0),[l,c]=(0,s.useState)(0),[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const r=window.setTimeout((()=>{const{width:t,x:r}=n.getBoundingClientRect(),{x:o}=e.getBoundingClientRect();a(r-o-1),c(t)}),100);let i;return u||(i=window.requestAnimationFrame((()=>{d(!0)}))),()=>{window.clearTimeout(r),window.cancelAnimationFrame(i)}}),[u,t,n,o,r]),f?(0,s.createElement)(lP,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:u?void 0:"none",width:l}}):null}));const hP=(0,s.createContext)({});var gP=hP;const vP=(0,s.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:c,...u}=e;const f=(0,s.useRef)(),[p,m]=(0,d.useResizeObserver)(),h=uP({baseId:(0,d.useInstanceId)(vP,"toggle-group-control-as-radio-group").toString(),state:c}),g=(0,d.usePrevious)(c);return tc((()=>{g!==h.state&&i(h.state)}),[h.state]),tc((()=>{c!==h.state&&h.setState(c)}),[c]),(0,s.createElement)(gP.Provider,{value:{...h,isBlock:!r,size:l}},(0,s.createElement)(pP,a({},h,{"aria-label":o,as:td},u,{ref:(0,d.useMergeRefs)([f,t])}),p,(0,s.createElement)(mP,{state:h.state,containerRef:f,containerWidth:m.width,isAdaptiveWidth:r}),n))}));const bP=(0,s.forwardRef)((function(e,t){let{children:n,isAdaptiveWidth:r,label:o,onChange:i,size:l,value:c,...u}=e;const f=(0,s.useRef)(),[p,m]=(0,d.useResizeObserver)(),h=(0,d.useInstanceId)(bP,"toggle-group-control-as-button-group").toString(),[g,v]=(0,s.useState)(c),b={baseId:h,state:g,setState:v},y=(0,d.usePrevious)(c);return tc((()=>{y!==b.state&&i(b.state)}),[b.state]),tc((()=>{c!==b.state&&b.setState(c)}),[c]),(0,s.createElement)(gP.Provider,{value:{...b,isBlock:!r,isDeselectable:!0,size:l}},(0,s.createElement)(td,a({"aria-label":o},u,{ref:(0,d.useMergeRefs)([f,t]),role:"group"}),p,(0,s.createElement)(mP,{state:b.state,containerRef:f,containerWidth:m.width,isAdaptiveWidth:r}),n))})),yP=()=>{};const wP=ju((function(e,t){const{__nextHasNoMarginBottom:n=!1,className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,isDeselectable:l=!1,label:c,hideLabelFromVision:u=!1,help:d,onChange:f=yP,size:p="default",value:m,children:h,...g}=Hu(e,"ToggleGroupControl"),v=Vu(),b=(0,s.useMemo)((()=>v((e=>{let{isBlock:t,isDeselectable:n,size:r}=e;return Uf("background:",Tp.ui.background,";border:1px solid transparent;border-radius:",hh.controlBorderRadius,";display:inline-flex;min-width:0;padding:2px;position:relative;transition:transform ",hh.transitionDurationFastest," linear;",Np("transition")," ",aP(r)," ",!n&&iP(t),";","")})({isBlock:i,isDeselectable:l,size:p}),i&&sP,r)),[r,v,i,l,p]),y=l?bP:vP;return(0,s.createElement)(Rv,{help:d,__nextHasNoMarginBottom:n},!u&&(0,s.createElement)(cP,null,(0,s.createElement)(Rv.VisualLabel,null,c)),(0,s.createElement)(y,a({},g,{children:h,className:b,isAdaptiveWidth:o,label:c,onChange:f,ref:t,size:p,value:m})))}),"ToggleGroupControl");var xP=wP;function _P(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function EP(e,t){var n=_e(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var CP=F({name:"Radio",compose:ke,keys:fP,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,a=void 0!==i&&i,s=e.unstable_checkOnFocus,l=void 0===s||s,c=h(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return m(m({checked:o,unstable_clickOnEnter:a,unstable_checkOnFocus:l},c),{},{value:null!=(n=c.value)?n:r})},useProps:function(e,t){var n=t.ref,r=t.onChange,o=t.onClick,i=h(t,["ref","onChange","onClick"]),a=(0,b.useRef)(null),s=(0,b.useState)(!0),l=s[0],c=s[1],u=_P(e),d=G(e.currentId===e.id),f=G(r),p=G(o);!function(e){var t=(0,b.useState)((function(){return _P(e)}))[0],n=(0,b.useState)(e.currentId)[0],r=e.id,o=e.setCurrentId;(0,b.useEffect)((function(){t&&r&&n!==r&&(null==o||o(r))}),[t,r,o,n])}(e),(0,b.useEffect)((function(){var e=a.current;e&&("INPUT"===e.tagName&&"radio"===e.type||c(!1))}),[]);var g=(0,b.useCallback)((function(t){var n,r;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),v=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),e.defaultPrevented||l||EP(e.currentTarget,g)}),[g,l]);return(0,b.useEffect)((function(){var t=a.current;t&&e.unstable_moves&&d.current&&e.unstable_checkOnFocus&&EP(t,g)}),[e.unstable_moves,e.unstable_checkOnFocus,g]),m({ref:H(a,n),role:l?void 0:"radio",type:l?"radio":void 0,value:l?e.value:void 0,name:l?e.baseId:void 0,"aria-checked":u,checked:u,onChange:g,onClick:v},i)}}),kP=z({as:"input",memo:!0,useHook:CP});const SP=Qu("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),TP={name:"82a6rk",styles:"flex:1"},NP=e=>{let{isDeselectable:t,isIcon:n,isPressed:r,size:o}=e;return Uf("align-items:center;appearance:none;background:transparent;border:none;border-radius:",hh.controlBorderRadius,";color:",Tp.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",hh.transitionDurationFast," linear,color ",hh.transitionDurationFast," linear,font-weight 60ms linear;",Np("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",hh.toggleGroupControlBackgroundColor,";}",t&&IP," ",n&&PP({size:o})," ",r&&RP,";","")},RP=Uf("color:",Tp.white,";&:active{background:transparent;}",""),IP=Uf("color:",Tp.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",Tp.white,",0 0 0 ",hh.borderWidthFocus," ",Tp.ui.theme,";outline:2px solid transparent;}",""),MP=Qu("div",{target:"et6ln9s0"})("display:flex;font-size:",hh.fontSize,";line-height:1;"),PP=e=>{let{size:t="default"}=e;return Uf("color:",Tp.gray[900],";width:",{default:"30px","__unstable-large":"34px"}[t],";padding-left:0;padding-right:0;","")},{ButtonContentView:OP,LabelView:DP}=o,AP=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,s.createElement)(Ff,{text:n,position:"top center"},r):(0,s.createElement)(s.Fragment,null,r)};const LP=ju((function e(t,n){const r=(0,s.useContext)(hP),o=Hu({...t,id:(0,d.useInstanceId)(e,r.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:i=!1,isDeselectable:l=!1,size:c="default",...u}=r,{className:f,isIcon:p=!1,value:m,children:h,showTooltip:g=!1,...v}=o,b=u.state===m,y=Vu(),w=y(i&&TP),x=y(NP({isDeselectable:l,isIcon:p,isPressed:b,size:c}),f),_={...v,className:x,"data-value":m,ref:n};return(0,s.createElement)(DP,{className:w},(0,s.createElement)(AP,{showTooltip:g,text:v["aria-label"]},l?(0,s.createElement)("button",a({},_,{"aria-pressed":b,type:"button",onClick:()=>{l&&b?u.setState(void 0):u.setState(m)}}),(0,s.createElement)(OP,null,h)):(0,s.createElement)(kP,a({},_,u,{as:"button",value:m}),(0,s.createElement)(OP,null,h))))}),"ToggleGroupControlOptionBase");var zP=LP;var BP=(0,s.forwardRef)((function(e,t){const{label:n,...r}=e,o=r["aria-label"]||n;return(0,s.createElement)(zP,a({},r,{"aria-label":o,ref:t}),n)}));const FP=[(0,u.__)("S"),(0,u.__)("M"),(0,u.__)("L"),(0,u.__)("XL"),(0,u.__)("XXL")],VP=[(0,u.__)("Small"),(0,u.__)("Medium"),(0,u.__)("Large"),(0,u.__)("Extra Large"),(0,u.__)("Extra Extra Large")];var HP=e=>{const{fontSizes:t,value:n,__nextHasNoMarginBottom:r,size:o,onChange:i}=e;return(0,s.createElement)(xP,{__nextHasNoMarginBottom:r,label:(0,u.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:i,isBlock:!0,size:o},t.map(((e,t)=>(0,s.createElement)(BP,{key:e.slug,value:e.size,label:FP[t],"aria-label":e.name||VP[t],showTooltip:!0}))))};const jP=(0,s.forwardRef)(((e,t)=>{var n;const{__nextHasNoMarginBottom:r=!1,fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:a=!1,onChange:l,size:c="default",value:d,withSlider:f=!1,withReset:p=!0}=e;r||Kl()("Bottom margin styles for wp.components.FontSizePicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const m=uE({availableUnits:["px","em","rem"]}),h=i.length>5,g=i.find((e=>e.size===d)),v=!!d&&!g,[b,y]=(0,s.useState)(!a&&v),w=(0,s.useMemo)((()=>{if(b)return(0,u.__)("Custom");if(!h)return g?g.name||VP[i.indexOf(g)]:"";const e=XM(i);return e?`(${e})`:""}),[b,h,g,i]);if(0===i.length&&a)return null;const x="string"==typeof d||"string"==typeof(null===(n=i[0])||void 0===n?void 0:n.size),[_,E]=lE(d,m),C=!!E&&["em","rem"].includes(E);return(0,s.createElement)(ZM,{ref:t,className:"components-font-size-picker"},(0,s.createElement)(nd,{as:"legend"},(0,u.__)("Font size")),(0,s.createElement)(Xv,null,(0,s.createElement)(Yv,{className:"components-font-size-picker__header"},(0,s.createElement)(JM,{"aria-label":`${(0,u.__)("Size")} ${w||""}`},(0,u.__)("Size"),w&&(0,s.createElement)(QM,{className:"components-font-size-picker__header__hint"},w)),!a&&(0,s.createElement)(id,{label:b?(0,u.__)("Use size preset"):(0,u.__)("Set custom size"),icon:KM,onClick:()=>{y(!b)},isPressed:b,isSmall:!0}))),(0,s.createElement)(eP,{className:"components-font-size-picker__controls",__nextHasNoMarginBottom:r},!!i.length&&h&&!b&&(0,s.createElement)(oP,{fontSizes:i,value:d,disableCustomFontSizes:a,size:c,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:Number(e),i.find((t=>t.size===e)))},onSelectCustom:()=>y(!0)}),!h&&!b&&(0,s.createElement)(HP,{fontSizes:i,value:d,__nextHasNoMarginBottom:r,size:c,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:Number(e),i.find((t=>t.size===e)))}}),!a&&b&&(0,s.createElement)(Jm,{className:"components-font-size-picker__custom-size-control"},(0,s.createElement)(Wm,{isBlock:!0},(0,s.createElement)(gE,{label:(0,u.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(x?e:parseInt(e,10))},size:c,units:x?m:[],min:0})),f&&(0,s.createElement)(Wm,{isBlock:!0},(0,s.createElement)(Xv,{marginX:2,marginBottom:0},(0,s.createElement)(Wy,{__nextHasNoMarginBottom:r,className:"components-font-size-picker__custom-input",label:(0,u.__)("Custom Size"),hideLabelFromVision:!0,value:_,initialPosition:o,withInputField:!1,onChange:e=>{void 0===e?null==l||l(void 0):x?null==l||l(e+(null!=E?E:"px")):null==l||l(e)},min:0,max:C?10:100,step:C?.1:1}))),p&&(0,s.createElement)(Wm,null,(0,s.createElement)(tP,{disabled:void 0===d,onClick:()=>{null==l||l(void 0)},isSmall:!0,variant:"secondary",size:c},(0,u.__)("Reset"))))))}));var $P=jP;var WP=function(e){let{accept:t,children:n,multiple:r=!1,onChange:o,onClick:i,render:l,...c}=e;const u=(0,s.useRef)(null),d=()=>{var e;null===(e=u.current)||void 0===e||e.click()},f=l?l({openFileDialog:d}):(0,s.createElement)(id,a({onClick:d},c),n);return(0,s.createElement)("div",{className:"components-form-file-upload"},f,(0,s.createElement)("input",{type:"file",ref:u,multiple:r,style:{display:"none"},accept:t,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))};const UP=()=>{};var GP=function(e){const{className:t,checked:n,id:r,disabled:o,onChange:i=UP,...l}=e,u=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":o});return(0,s.createElement)("span",{className:u},(0,s.createElement)("input",a({className:"components-form-toggle__input",id:r,type:"checkbox",checked:n,onChange:i,disabled:o},l)),(0,s.createElement)("span",{className:"components-form-toggle__track"}),(0,s.createElement)("span",{className:"components-form-toggle__thumb"}))};const YP=()=>{};function qP(e){let{value:t,status:n,title:r,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:l=YP,onMouseEnter:f,onMouseLeave:p,messages:m,termPosition:h,termsCount:g}=e;const v=(0,d.useInstanceId)(qP),b=c()("components-form-token-field__token",{"is-error":"error"===n,"is-success":"success"===n,"is-validating":"validating"===n,"is-borderless":i,"is-disabled":a}),y=o(t),w=(0,u.sprintf)((0,u.__)("%1$s (%2$s of %3$s)"),y,h,g);return(0,s.createElement)("span",{className:b,onMouseEnter:f,onMouseLeave:p,title:r},(0,s.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${v}`},(0,s.createElement)(nd,{as:"span"},w),(0,s.createElement)("span",{"aria-hidden":"true"},y)),(0,s.createElement)(id,{className:"components-form-token-field__remove-token",icon:Ib,onClick:a?void 0:()=>l({value:t}),label:m.remove,"aria-describedby":`components-form-token-field__token-text-${v}`}))}const KP=e=>{let{__next36pxDefaultSize:t,hasTokens:n}=e;return!t&&Uf("padding-top:",Xm(n?1:.5),";padding-bottom:",Xm(n?1:.5),";","")},XP=Qu(Jm,{target:"ehq8nmi0"})("padding:5px ",Xm(1),";",KP,";"),ZP=e=>e;var JP=function e(t){const{autoCapitalize:n,autoComplete:r,maxLength:o,placeholder:i,label:l=(0,u.__)("Add item"),className:f,suggestions:p=[],maxSuggestions:m=100,value:h=[],displayTransform:g=ZP,saveTransform:v=(e=>e.trim()),onChange:b=(()=>{}),onInputChange:y=(()=>{}),onFocus:w,isBorderless:x=!1,disabled:_=!1,tokenizeOnSpace:E=!1,messages:C={added:(0,u.__)("Item added."),removed:(0,u.__)("Item removed."),remove:(0,u.__)("Remove item"),__experimentalInvalid:(0,u.__)("Invalid item")},__experimentalRenderItem:k,__experimentalExpandOnFocus:S=!1,__experimentalValidateInput:T=(()=>!0),__experimentalShowHowTo:N=!0,__next36pxDefaultSize:R=!1,__experimentalAutoSelectFirstMatch:I=!1}=t,M=(0,d.useInstanceId)(e),[P,O]=(0,s.useState)(""),[D,A]=(0,s.useState)(0),[L,z]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[V,H]=(0,s.useState)(-1),[j,$]=(0,s.useState)(!1),W=(0,d.usePrevious)(p),U=(0,d.usePrevious)(h),G=(0,s.useRef)(null),Y=(0,s.useRef)(null),q=(0,d.useDebounce)(ub.speak,500);function K(){var e;null===(e=G.current)||void 0===e||e.focus()}function X(){var e;return G.current===(null===(e=G.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function Z(){fe()?z(!1):(O(""),A(0),z(!1),F(!1),H(-1),$(!1))}function J(e){e.target===Y.current&&L&&e.preventDefault()}function Q(e){se(e.value),K()}function ee(e){const t=e.value,n=E?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&ie(r.slice(0,-1)),O(o),y(o)}function te(e){let t=!1;return X()&&de()&&(e(),t=!0),t}function ne(){const e=ue()-1;e>-1&&se(h[e])}function re(){const e=ue();e!function(e){return h.some((t=>le(e)===le(t)))}(e))))];if(t.length>0){const e=[...h];e.splice(ue(),0,...t),b(e)}}function ae(e){T(e)?(ie([e]),(0,ub.speak)(C.added,"assertive"),O(""),H(-1),$(!1),F(!S),L&&K()):(0,ub.speak)(C.__experimentalInvalid,"assertive")}function se(e){const t=h.filter((t=>le(t)!==le(e)));b(t),(0,ub.speak)(C.removed,"assertive")}function le(e){return"object"==typeof e?e.value:e}function ce(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:v,i=o(e);const a=[],s=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?a.push(e):t>0&&s.push(e))})),t=a.concat(s)),t.slice(0,r)}function ue(){return h.length-D}function de(){return 0===P.length}function fe(){return v(P).length>0}function pe(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=P.trim().length>1,n=ce(P),r=n.length>0,o=X()&&S;if(F(o||t&&r),e&&(I&&t&&r?(H(0),$(!0)):(H(-1),$(!1))),t){const e=r?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,u.__)("No results.");q(e,"assertive")}}function me(e,t,n){const r=le(e),o="string"!=typeof e?e.status:void 0,i=t+1,a=n.length;return(0,s.createElement)(Wm,{key:"token-"+r},(0,s.createElement)(qP,{value:r,status:o,title:"string"!=typeof e?e.title:void 0,displayTransform:g,onClickRemove:Q,isBorderless:"string"!=typeof e&&e.isBorderless||x,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==o&&_,messages:C,termsCount:a,termPosition:i}))}(0,s.useEffect)((()=>{L&&!X()&&K()}),[L]),(0,s.useEffect)((()=>{const e=!ff()(p,W||[]);(e||h!==U)&&pe(e)}),[p,W,h,U]),(0,s.useEffect)((()=>{pe()}),[P]),(0,s.useEffect)((()=>{pe()}),[I]),_&&L&&(z(!1),O(""));const he=c()(f,"components-form-token-field__input-container",{"is-active":L,"is-disabled":_});let ge={className:"components-form-token-field",tabIndex:-1};const ve=ce();return _||(ge=Object.assign({},ge,{onKeyDown:function(e){let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.key){case"Backspace":t=te(ne);break;case"Enter":t=oe();break;case"ArrowLeft":t=function(){let e=!1;return de()&&(A((e=>Math.min(e+1,h.length))),e=!0),e}();break;case"ArrowUp":H((e=>(0===e?ce(P,p,h,m,v).length:e)-1)),$(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return de()&&(A((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":H((e=>(e+1)%ce(P,p,h,m,v).length)),$(!0),t=!0;break;case"Delete":t=te(re);break;case"Space":E&&(t=oe());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(O(e.target.value),F(!1),H(-1),$(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){let t=!1;","===e.key&&(fe()&&ae(P),t=!0);t&&e.preventDefault()},onFocus:function(e){X()||e.target===Y.current?(z(!0),F(S||B)):z(!1),"function"==typeof w&&w(e)}})),(0,s.createElement)("div",ge,(0,s.createElement)(Cv,{htmlFor:`components-form-token-input-${M}`,className:"components-form-token-field__label"},l),(0,s.createElement)("div",{ref:Y,className:he,tabIndex:-1,onMouseDown:J,onTouchStart:J},(0,s.createElement)(XP,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next36pxDefaultSize:R,hasTokens:!!h.length},function(){const e=h.map(me);return e.splice(ue(),0,function(){const e={instanceId:M,autoCapitalize:n,autoComplete:r,placeholder:0===h.length?i:"",key:"input",disabled:_,value:P,onBlur:Z,isExpanded:B,selectedSuggestionIndex:V};return(0,s.createElement)(nT,a({},e,{onChange:o&&h.length>=o?void 0:ee,ref:G}))}()),e}()),B&&(0,s.createElement)(aT,{instanceId:M,match:v(P),displayTransform:g,suggestions:ve,selectedIndex:V,scrollIntoView:j,onHover:function(e){const t=ce().indexOf(e);t>=0&&(H(t),$(!1))},onSelect:function(e){ae(e)},__experimentalRenderItem:k})),N&&(0,s.createElement)("p",{id:`components-form-token-suggestions-howto-${M}`,className:"components-form-token-field__help"},E?(0,u.__)("Separate with commas, spaces, or the Enter key."):(0,u.__)("Separate with commas or the Enter key.")))};const QP=e=>{let{isSelected:t}=e;return(0,s.createElement)(i.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Circle,{cx:"4",cy:"4",r:"4",fill:t?"#419ECD":"#E1E3E6"}))};function eO(e){let{currentPage:t,numberOfPages:n,setCurrentPage:r}=e;return(0,s.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,u.__)("Guide controls")},Array.from({length:n}).map(((e,o)=>(0,s.createElement)("li",{key:o,"aria-current":o===t?"step":void 0},(0,s.createElement)(id,{key:o,icon:(0,s.createElement)(QP,{isSelected:o===t}),"aria-label":(0,u.sprintf)((0,u.__)("Page %1$d of %2$d"),o+1,n),onClick:()=>r(o)})))))}function tO(e){let{children:t,className:n,contentLabel:r,finishButtonText:o,onFinish:i,pages:a=[]}=e;const l=(0,s.useRef)(),[d,f]=(0,s.useState)(0);(0,s.useEffect)((()=>{s.Children.count(t)&&Kl()("Passing children to ",{since:"5.5",alternative:"the `pages` prop"})}),[t]),(0,s.useEffect)((()=>{var e,t;l.current&&(null===(e=kS.focus.tabbable.find(l.current))||void 0===e||null===(t=e[0])||void 0===t||t.focus())}),[d]),s.Children.count(t)&&(a=s.Children.map(t,(e=>({content:e}))));const p=d>0,m=d{p&&f(d-1)},g=()=>{m&&f(d+1)};return 0===a.length?null:(0,s.createElement)(vT,{className:c()("components-guide",n),contentLabel:r,onRequestClose:i,onKeyDown:e=>{"ArrowLeft"===e.code?(h(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:l},(0,s.createElement)("div",{className:"components-guide__container"},(0,s.createElement)("div",{className:"components-guide__page"},a[d].image,a.length>1&&(0,s.createElement)(eO,{currentPage:d,numberOfPages:a.length,setCurrentPage:f}),a[d].content),(0,s.createElement)("div",{className:"components-guide__footer"},p&&(0,s.createElement)(id,{className:"components-guide__back-button",onClick:h},(0,u.__)("Previous")),m&&(0,s.createElement)(id,{className:"components-guide__forward-button",onClick:g},(0,u.__)("Next")),!m&&(0,s.createElement)(id,{className:"components-guide__finish-button",onClick:i},o||(0,u.__)("Finish")))))}function nO(e){return(0,s.useEffect)((()=>{Kl()("",{since:"5.5",alternative:"the `pages` prop in "})}),[]),(0,s.createElement)("div",e)}var rO=(0,s.forwardRef)((function(e,t){let{label:n,labelPosition:r,size:o,tooltip:i,...l}=e;return Kl()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,s.createElement)(id,a({},l,{ref:t,tooltipPosition:r,iconSize:o,showTooltip:void 0!==i?!!i:void 0,label:i||n}))}));var oO=ju((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=Hu(e,"Item"),{spacedAround:l,size:c}=Gk(),u=i||c,d=t||(void 0!==r?"button":"div"),f=Vu(),p=(0,s.useMemo)((()=>f("button"===d&&Pk,Wk[u]||Wk.medium,Dk,l&&Bk,n)),[d,n,f,u,l]),m=f(Ok);return{as:d,className:p,onClick:r,wrapperClassName:m,role:o,...a}}(e);return(0,s.createElement)("div",{role:n,className:r},(0,s.createElement)(td,a({},o,{ref:t})))}),"Item");var iO=ju((function(e,t){const n=Hu(e,"InputControlPrefixWrapper");return(0,s.createElement)(Xv,a({marginBottom:0},n,{ref:t}))}),"InputControlPrefixWrapper");function aO(e){let{target:t,callback:n,shortcut:r,bindGlobal:o,eventName:i}=e;return(0,d.useKeyboardShortcut)(r,n,{bindGlobal:o,target:t,eventName:i}),null}var sO=function(e){let{children:t,shortcuts:n,bindGlobal:r,eventName:o}=e;const i=(0,s.useRef)(null),a=Object.entries(null!=n?n:{}).map((e=>{let[t,n]=e;return(0,s.createElement)(aO,{key:t,shortcut:t,callback:n,bindGlobal:r,eventName:o,target:i})}));return s.Children.count(t)?(0,s.createElement)("div",{ref:i},a,t):(0,s.createElement)(s.Fragment,null,a)};var lO=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,d.useInstanceId)(e);if(!s.Children.count(n))return null;const l=`components-menu-group-label-${a}`,u=c()(r,"components-menu-group",{"has-hidden-separator":i});return(0,s.createElement)("div",{className:u},o&&(0,s.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},o),(0,s.createElement)("div",{role:"group","aria-labelledby":o?l:void 0},n))};var cO=(0,s.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:l="right",shortcut:u,isSelected:d,role:f="menuitem",suffix:p,...m}=e;return o=c()("components-menu-item__button",o),r&&(n=(0,s.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)("span",{className:"components-menu-item__info"},r))),i&&"string"!=typeof i&&(i=(0,s.cloneElement)(i,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===l})})),(0,s.createElement)(id,a({ref:t,"aria-checked":"menuitemcheckbox"===f||"menuitemradio"===f?d:void 0,role:f,icon:"left"===l?i:void 0,className:o},m),(0,s.createElement)("span",{className:"components-menu-item__item"},n),!p&&(0,s.createElement)(Of,{className:"components-menu-item__shortcut",shortcut:u}),!p&&i&&"right"===l&&(0,s.createElement)(Zl,{icon:i}),p)}));const uO=()=>{};function dO(e){let{choices:t=[],onHover:n=uO,onSelect:r,value:o}=e;return t.map((e=>{const t=o===e.value;return(0,s.createElement)(cO,{key:e.value,role:"menuitemradio",icon:t&&H_,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||r(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)}))}var fO=(0,s.forwardRef)((function(e,t){let{eventToOffset:n,...r}=e;return(0,s.createElement)(IS,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:e=>{const{code:t,shiftKey:r}=e;return"Tab"===t?r?-1:1:n?n(e):void 0}},r))}));const pO="root",mO=()=>{},hO=(0,s.createContext)({activeItem:void 0,activeMenu:pO,setActiveMenu:mO,isMenuEmpty:mO,navigationTree:{items:{},getItem:mO,addItem:mO,removeItem:mO,menus:{},getMenu:mO,addMenu:mO,removeMenu:mO,childMenu:{},traverseMenu:mO,isMenuEmpty:mO}}),gO=()=>(0,s.useContext)(hO);var vO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));const bO=(0,s.forwardRef)((function(e,t){let{__nextHasNoMarginBottom:n,className:r,onChange:o,onKeyDown:i,value:l,label:f,placeholder:p=(0,u.__)("Search"),hideLabelFromVision:m=!0,help:h,onClose:g,...v}=e;const b=(0,s.useRef)(),y=`components-search-control-${(0,d.useInstanceId)(bO)}`;return(0,s.createElement)(Rv,{__nextHasNoMarginBottom:n,label:f,id:y,hideLabelFromVision:m,help:h,className:c()(r,"components-search-control")},(0,s.createElement)("div",{className:"components-search-control__input-wrapper"},(0,s.createElement)("input",a({},v,{ref:(0,d.useMergeRefs)([b,t]),className:"components-search-control__input",id:y,type:"search",placeholder:p,onChange:e=>o(e.target.value),onKeyDown:i,autoComplete:"off",value:l||""})),(0,s.createElement)("div",{className:"components-search-control__icon"},g?(0,s.createElement)(id,{icon:Ib,label:(0,u.__)("Close search"),onClick:g}):l?(0,s.createElement)(id,{icon:Ib,label:(0,u.__)("Reset search"),onClick:()=>{var e;o(""),null===(e=b.current)||void 0===e||e.focus()}}):(0,s.createElement)(ly,{icon:vO}))))}));var yO=bO;const wO=Qu("div",{target:"ejwewyf11"})("width:100%;box-sizing:border-box;padding:0 ",Xm(4),";overflow:hidden;"),xO=Qu("div",{target:"ejwewyf10"})("margin-top:",Xm(6),";margin-bottom:",Xm(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",Xm(6),";}.components-navigation__group+.components-navigation__group{margin-top:",Xm(6),";}"),_O=Qu(id,{target:"ejwewyf9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),EO=Qu("div",{target:"ejwewyf8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),CO=Qu("span",{target:"ejwewyf7"})("height:",Xm(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",Xm(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),kO=Qu(yO,{target:"ejwewyf6"})({name:"za3n3e",styles:"input[type='search'].components-search-control__input{margin:0;background:#303030;color:#fff;&:focus{background:#434343;color:#fff;}&::placeholder{color:rgba( 255, 255, 255, 0.6 );}}svg{fill:white;}.components-button.has-icon{padding:0;min-width:auto;}"}),SO=Qu(U_,{target:"ejwewyf5"})("min-height:",Xm(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",Xm(2),";padding:",(()=>(0,u.isRTL)()?`${Xm(1)} ${Xm(4)} ${Xm(1)} ${Xm(2)}`:`${Xm(1)} ${Xm(2)} ${Xm(1)} ${Xm(4)}`),";"),TO=Qu("li",{target:"ejwewyf4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",Xm(2)," ",Xm(4),";",Fh({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",Tp.ui.theme,";color:",Tp.white,";>button,>a{color:",Tp.white,";opacity:1;}}>svg path{color:",Tp.gray[600],";}"),NO=Qu("div",{target:"ejwewyf3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",Xm(1.5)," ",Xm(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),RO=Qu("span",{target:"ejwewyf2"})("display:flex;margin-right:",Xm(2),";"),IO=Qu("span",{target:"ejwewyf1"})("margin-left:",(()=>(0,u.isRTL)()?"0":Xm(2)),";margin-right:",(()=>(0,u.isRTL)()?Xm(2):"0"),";display:inline-flex;padding:",Xm(1)," ",Xm(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",Np("animation"),";"),MO=Qu(Mh,{target:"ejwewyf0"})((()=>(0,u.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;"),PO=()=>{const[e,t]=(0,s.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}},OO=()=>{};function DO(e){let{activeItem:t,activeMenu:n=pO,children:r,className:o,onActivateMenu:i=OO}=e;const[a,l]=(0,s.useState)(n),[d,f]=(0,s.useState)(),p=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=PO(),{nodes:o,getNode:i,addNode:a,removeNode:l}=PO(),[c,u]=(0,s.useState)({}),d=e=>c[e]||[],f=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{u((n=>{const r={...n};return r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r})),a(e,t)},removeMenu:l,childMenu:c,traverseMenu:f,isMenuEmpty:e=>{let t=!0;return f(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,u.isRTL)()?"right":"left",h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;p.getMenu(e)&&(f(t),l(e),i(e))},g=(0,s.useRef)(!1);(0,s.useEffect)((()=>{g.current||(g.current=!0)}),[]),(0,s.useEffect)((()=>{n!==a&&h(n)}),[n]);const v={activeItem:t,activeMenu:a,setActiveMenu:h,navigationTree:p},b=c()("components-navigation",o),y=Tm({type:"slide-in",origin:d});return(0,s.createElement)(wO,{className:b},(0,s.createElement)("div",{key:a,className:c()({[y]:g.current&&d})},(0,s.createElement)(hO.Provider,{value:v},r)))}var AO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var LO=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var zO=(0,s.forwardRef)((function(e,t){var n;let{backButtonLabel:r,className:o,href:i,onClick:a,parentMenu:l}=e;const{setActiveMenu:d,navigationTree:f}=gO(),p=c()("components-navigation__back-button",o),m=null===(n=f.getMenu(l))||void 0===n?void 0:n.title,h=(0,u.isRTL)()?AO:LO;return(0,s.createElement)(_O,{className:p,href:i,variant:"tertiary",ref:t,onClick:e=>{"function"==typeof a&&a(e);const t=(0,u.isRTL)()?"left":"right";l&&!e.defaultPrevented&&d(l,t)}},(0,s.createElement)(ly,{icon:h}),r||m||(0,u.__)("Back"))}));const BO=(0,s.createContext)({group:void 0});let FO=0;function VO(e){let{children:t,className:n,title:r}=e;const[o]=(0,s.useState)("group-"+ ++FO),{navigationTree:{items:i}}=gO(),a={group:o};if(!Object.values(i).some((e=>e.group===o&&e._isVisible)))return(0,s.createElement)(BO.Provider,{value:a},t);const l=`components-navigation__group-title-${o}`,u=c()("components-navigation__group",n);return(0,s.createElement)(BO.Provider,{value:a},(0,s.createElement)("li",{className:u},r&&(0,s.createElement)(SO,{className:"components-navigation__group-title",id:l,level:3},r),(0,s.createElement)("ul",{"aria-labelledby":l,role:"group"},t)))}function HO(e){const{badge:t,title:n}=e;return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(MO,{className:"components-navigation__item-title",variant:"body.small",as:"span"},n),t&&(0,s.createElement)(IO,{className:"components-navigation__item-badge"},t))}const jO=(0,s.createContext)({menu:void 0,search:""}),$O=()=>(0,s.useContext)(jO),WO=e=>lb()(e).replace(/^\//,"").toLowerCase(),UO=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=gO(),{group:i}=(0,s.useContext)(BO),{menu:a,search:l}=$O();(0,s.useEffect)((()=>{const s=n===a,c=!l||((e,t)=>-1!==WO(e).indexOf(WO(t)))(t.title,l);return r(e,{...t,group:i,menu:a,_isVisible:s&&c}),()=>{o(e)}}),[n,l])};let GO=0;function YO(e){var t;const{children:n,className:r,title:o,href:i,...l}=e,[u]=(0,s.useState)("item-"+ ++GO);UO(u,e);const{navigationTree:d}=gO();if(null===(t=d.getItem(u))||void 0===t||!t._isVisible)return null;const f=c()("components-navigation__item",r);return(0,s.createElement)(TO,a({className:f},l),n)}const qO=()=>{};function KO(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:l,onClick:d=qO,title:f,icon:p,hideIfTargetMenuEmpty:m,isText:h,...g}=e,{activeItem:v,setActiveMenu:b,navigationTree:{isMenuEmpty:y}}=gO();if(m&&l&&y(l))return null;const w=i&&v===i,x=c()(r,{"is-active":w}),_=(0,u.isRTL)()?LO:AO,E=n?e:{...e,onClick:void 0},C=h?g:{as:id,href:o,onClick:e=>{l&&b(l),d(e)},"aria-current":w?"page":void 0,...g};return(0,s.createElement)(YO,a({},E,{className:x}),n||(0,s.createElement)(NO,C,p&&(0,s.createElement)(RO,null,(0,s.createElement)(ly,{icon:p})),(0,s.createElement)(HO,{title:f,badge:t}),l&&(0,s.createElement)(ly,{icon:_})))}var XO=(0,d.createHigherOrderComponent)((e=>t=>(0,s.createElement)(e,a({},t,{speak:ub.speak,debouncedSpeak:(0,d.useDebounce)(ub.speak,500)}))),"withSpokenMessages");var ZO=XO((function(e){let{debouncedSpeak:t,onCloseSearch:n,onSearch:r,search:o,title:i}=e;const{navigationTree:{items:a}}=gO(),{menu:l}=$O(),c=(0,s.useRef)();(0,s.useEffect)((()=>{const e=setTimeout((()=>{c.current.focus()}),100);return()=>{clearTimeout(e)}}),[]),(0,s.useEffect)((()=>{if(!o)return;const e=Object.values(a).filter((e=>e._isVisible)).length,n=(0,u.sprintf)((0,u._n)("%d result found.","%d results found.",e),e);t(n)}),[a,o]);const d=()=>{r(""),n()},f=`components-navigation__menu-title-search-${l}`,p=(0,u.sprintf)((0,u.__)("Search %s"),null==i?void 0:i.toLowerCase()).trim();return(0,s.createElement)("div",{className:"components-navigation__menu-title-search"},(0,s.createElement)(kO,{autoComplete:"off",className:"components-navigation__menu-search-input",id:f,onChange:e=>r(e),onKeyDown:function(e){"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),d())},placeholder:p,onClose:d,ref:c,type:"search",value:o}))}));function JO(e){let{hasSearch:t,onSearch:n,search:r,title:o,titleAction:i}=e;const[a,l]=(0,s.useState)(!1),{menu:c}=$O(),d=(0,s.useRef)();if(!o)return null;const f=`components-navigation__menu-title-${c}`,p=(0,u.sprintf)((0,u.__)("Search in %s"),o);return(0,s.createElement)(EO,{className:"components-navigation__menu-title"},!a&&(0,s.createElement)(SO,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,s.createElement)("span",{id:f},o),(t||i)&&(0,s.createElement)(CO,null,i,t&&(0,s.createElement)(id,{isSmall:!0,variant:"tertiary",label:p,onClick:()=>l(!0),ref:d},(0,s.createElement)(ly,{icon:vO})))),a&&(0,s.createElement)("div",{className:Tm({type:"slide-in",origin:"left"})},(0,s.createElement)(ZO,{onCloseSearch:()=>{l(!1),setTimeout((()=>{d.current.focus()}),100)},onSearch:n,search:r,title:o})))}function QO(e){let{search:t}=e;const{navigationTree:{items:n}}=gO(),r=Object.values(n).filter((e=>e._isVisible)).length;return!t||r?null:(0,s.createElement)(TO,null,(0,s.createElement)(NO,null,(0,u.__)("No results found.")," "))}function eD(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=pO,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:p,titleAction:m}=e,[h,g]=(0,s.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=gO(),r=e.menu||pO;(0,s.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=gO(),b={menu:i,search:h};if(v!==i)return(0,s.createElement)(jO.Provider,{value:b},n);const y=!!l,w=y?d:h,x=y?l:g,_=`components-navigation__menu-title-${i}`,E=c()("components-navigation__menu",r);return(0,s.createElement)(jO.Provider,{value:b},(0,s.createElement)(xO,{className:E},(u||a)&&(0,s.createElement)(zO,{backButtonLabel:t,parentMenu:u,onClick:a}),p&&(0,s.createElement)(JO,{hasSearch:o,onSearch:x,search:w,title:p,titleAction:m}),(0,s.createElement)(MS,null,(0,s.createElement)("ul",{"aria-labelledby":_},n,w&&!f&&(0,s.createElement)(QO,{search:w})))))}const tD=(0,s.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});function nD(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(oD(t.delimiter||"/#?"),"]+?"),a=[],s=0,l=0,c="",u=function(e){if(l-1:void 0===E;o||(g+="(?:".concat(h,"(?=").concat(m,"))?")),C||(g+="(?=".concat(h,"|").concat(m,")"))}return new RegExp(g,iD(n))}(nD(e,n),t,n)}function sD(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return sD(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),iD(n))}(e,t,n):aD(e,t,n)}function lD(e,t){return rD(t,{decode:decodeURIComponent})(e)}function cD(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"add":return[...e,t.screen];case"remove":return e.filter((e=>e.id!==t.screen.id))}return e}var uD={name:"15bx5k",styles:"overflow-x:hidden"};const dD=ju((function(e,t){const{initialPath:n,children:r,className:o,...i}=Hu(e,"NavigatorProvider"),[l,c]=(0,s.useState)([{path:n}]),u=(0,s.useRef)([]),[d,f]=(0,s.useReducer)(cD,[]),p=(0,s.useRef)([]);(0,s.useEffect)((()=>{p.current=d}),[d]),(0,s.useEffect)((()=>{u.current=l}),[l]);const m=(0,s.useRef)(),h=(0,s.useMemo)((()=>{let e;if(0===l.length||void 0===(e=l[l.length-1].path))return void(m.current=void 0);const t=(e=>{const t=function(e,t){for(const n of t){const t=lD(e,n.path);if(t)return{params:t.params,id:n.id}}}(e,d);return m.current&&t&&ff()(t.params,m.current.params)&&t.id===m.current.id?m.current:t})(e);return m.current=t,t}),[d,l]),g=(0,s.useCallback)((e=>f({type:"add",screen:e})),[]),v=(0,s.useCallback)((e=>f({type:"remove",screen:e})),[]),b=(0,s.useCallback)((()=>{c((e=>e.length<=1?e:[...e.slice(0,-2),{...e[e.length-2],isBack:!0,hasRestoredFocus:!1}]))}),[]),y=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{focusTargetSelector:n,isBack:r=!1,...o}=t,i=r&&u.current.length>1&&u.current[u.current.length-2].path===e;i?b():c((t=>{const i={...o,path:e,isBack:r,hasRestoredFocus:!1};return t.length<1?[i]:[...t.slice(t.length>49?1:0,-1),{...t[t.length-1],focusTargetSelector:n},i]}))}),[b]),w=(0,s.useCallback)((()=>{const e=u.current[u.current.length-1].path;if(void 0===e)return;const t=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==lD(e,t.path)))&&(r=e)}return r}(e,p.current);void 0!==t&&y(t,{isBack:!0})}),[y]),x=(0,s.useMemo)((()=>({location:{...l[l.length-1],isInitial:1===l.length},params:h?h.params:{},match:h?h.id:void 0,goTo:y,goBack:b,goToParent:w,addScreen:g,removeScreen:v})),[l,h,y,b,w,g,v]),_=Vu(),E=(0,s.useMemo)((()=>_(uD,o)),[o,_]);return(0,s.createElement)(td,a({ref:t,className:E},i),(0,s.createElement)(tD.Provider,{value:x},r))}),"NavigatorProvider");var fD=dD,pD=window.wp.escapeHtml;var mD={name:"14x3t6z",styles:"overflow-x:auto;max-height:100%"};const hD=ju((function(e,t){const n=(0,s.useId)(),{children:r,className:o,path:i,...l}=Hu(e,"NavigatorScreen"),c=(0,d.useReducedMotion)(),{location:f,match:p,addScreen:m,removeScreen:h}=(0,s.useContext)(tD),g=p===n,v=(0,s.useRef)(null);(0,s.useEffect)((()=>{const e={id:n,path:(0,pD.escapeAttribute)(i)};return m(e),()=>h(e)}),[n,i,m,h]);const b=Vu(),y=(0,s.useMemo)((()=>b(mD,o)),[o,b]),w=(0,s.useRef)(f);(0,s.useEffect)((()=>{w.current=f}),[f]);const x=f.isInitial&&!f.isBack;(0,s.useEffect)((()=>{if(x||!g||!v.current||w.current.hasRestoredFocus)return;const e=v.current.ownerDocument.activeElement;if(v.current.contains(e))return;let t=null;if(f.isBack&&null!=f&&f.focusTargetSelector&&(t=v.current.querySelector(f.focusTargetSelector)),!t){const e=kS.focus.tabbable.find(v.current)[0];t=null!=e?e:v.current}w.current.hasRestoredFocus=!0,t.focus()}),[x,g,f.isBack,f.focusTargetSelector]);const _=(0,d.useMergeRefs)([t,v]);if(!g)return null;if(c)return(0,s.createElement)(td,a({ref:_,className:y},l),r);const E={opacity:1,transition:{delay:0,duration:.14,ease:"easeInOut"},x:0},C={opacity:0,x:(0,u.isRTL)()&&f.isBack||!(0,u.isRTL)()&&!f.isBack?50:-50},k={animate:E,exit:{delay:0,opacity:0,x:!(0,u.isRTL)()&&f.isBack||(0,u.isRTL)()&&!f.isBack?50:-50,transition:{duration:.14,ease:"easeInOut"}},initial:C};return(0,s.createElement)(Gl.div,a({ref:_,className:y},l,k),r)}),"NavigatorScreen");var gD=hD;var vD=function(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,s.useContext)(tD);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}};var bD=ju((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=id,attributeName:o="id",...i}=Hu(e,"NavigatorButton"),a=(0,pD.escapeAttribute)(t),{goTo:l}=vD();return{as:r,onClick:(0,s.useCallback)((e=>{var t,r;e.preventDefault(),l(a,{focusTargetSelector:(t=o,r=a,`[${t}="${r}"]`)}),null==n||n(e)}),[l,n,o,a]),...i,[o]:a}}(e);return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorButton");function yD(e){const{onClick:t,as:n=id,goToParent:r=!1,...o}=Hu(e,"NavigatorBackButton"),{goBack:i,goToParent:a}=vD();return{as:n,onClick:(0,s.useCallback)((e=>{e.preventDefault(),r?a():i(),null==t||t(e)}),[r,a,i,t]),...o}}var wD=ju((function(e,t){const n=yD(e);return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorBackButton");var xD=ju((function(e,t){const n=yD({...e,goToParent:!0});return(0,s.createElement)(td,a({ref:t},n))}),"NavigatorToParentButton");const _D=()=>{};function ED(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}var CD=function(e){let{className:t,status:n="info",children:r,spokenMessage:o=r,onRemove:i=_D,isDismissible:a=!0,actions:l=[],politeness:d=ED(n),__unstableHTML:f,onDismiss:p=_D}=e;!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,ub.speak)(n,t)}),[n,t])}(o,d);const m=c()(t,"components-notice","is-"+n,{"is-dismissible":a});return f&&"string"==typeof r&&(r=(0,s.createElement)(s.RawHTML,null,r)),(0,s.createElement)("div",{className:m},(0,s.createElement)("div",{className:"components-notice__content"},r,(0,s.createElement)("div",{className:"components-notice__actions"},l.map(((e,t)=>{let{className:n,label:r,isPrimary:o,variant:i,noDefaultClasses:a=!1,onClick:l,url:u}=e,d=i;return"primary"===i||a||(d=u?"link":"secondary"),void 0===d&&o&&(d="primary"),(0,s.createElement)(id,{key:t,href:u,variant:d,onClick:u?void 0:l,className:c()("components-notice__action",n)},r)})))),a&&(0,s.createElement)(id,{className:"components-notice__dismiss",icon:Yl,label:(0,u.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),p(),i()},showTooltip:!1}))};const kD=()=>{};var SD=function(e){let{notices:t,onRemove:n=kD,className:r,children:o}=e;const i=e=>()=>n(e);return r=c()("components-notice-list",r),(0,s.createElement)("div",{className:r},o,[...t].reverse().map((e=>{const{content:t,...n}=e;return(0,s.createElement)(CD,a({},n,{key:e.id,onRemove:i(e.id)}),e.content)})))};var TD=function(e){let{label:t,children:n}=e;return(0,s.createElement)("div",{className:"components-panel__header"},t&&(0,s.createElement)("h2",null,t),n)};var ND=(0,s.forwardRef)((function(e,t){let{header:n,className:r,children:o}=e;const i=c()(r,"components-panel");return(0,s.createElement)("div",{className:i,ref:t},n&&(0,s.createElement)(TD,{label:n}),o)}));var RD=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));const ID=()=>{};const MD=(0,s.forwardRef)(((e,t)=>{let{isOpened:n,icon:r,title:o,...i}=e;return o?(0,s.createElement)("h2",{className:"components-panel__body-title"},(0,s.createElement)(id,a({className:"components-panel__body-toggle","aria-expanded":n,ref:t},i),(0,s.createElement)("span",{"aria-hidden":"true"},(0,s.createElement)(Zl,{className:"components-panel__arrow",icon:n?RD:cy})),o,r&&(0,s.createElement)(Zl,{icon:r,className:"components-panel__icon",size:20}))):null})),PD=(0,s.forwardRef)((function(e,t){let{buttonProps:n={},children:r,className:o,icon:i,initialOpen:l,onToggle:u=ID,opened:f,title:p,scrollAfterOpen:m=!0}=e;const[h,g]=hy(f,{initial:void 0===l||l}),v=(0,s.useRef)(),b=(0,d.useReducedMotion)()?"auto":"smooth",y=(0,s.useRef)();y.current=m,tc((()=>{var e;h&&y.current&&null!==(e=v.current)&&void 0!==e&&e.scrollIntoView&&v.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:b})}),[h,b]);const w=c()("components-panel__body",o,{"is-opened":h});return(0,s.createElement)("div",{className:w,ref:(0,d.useMergeRefs)([v,t])},(0,s.createElement)(MD,a({icon:i,isOpened:h,onClick:e=>{e.preventDefault();const t=!h;g(t),u(t)},title:p},n)),"function"==typeof r?r({opened:h}):h&&r)}));PD.displayName="PanelBody";var OD=PD;var DD=(0,s.forwardRef)(((e,t)=>{let{className:n,children:r}=e;return(0,s.createElement)("div",{className:c()("components-panel__row",n),ref:t},r)}));const AD=(0,s.createElement)(i.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none"},(0,s.createElement)(i.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"}));var LD=function(e){const{icon:t,children:n,label:r,instructions:o,className:i,notices:l,preview:u,isColumnLayout:f,withIllustration:p,...m}=e,[h,{width:g}]=(0,d.useResizeObserver)();let v;"number"==typeof g&&(v={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const b=c()("components-placeholder",i,v,p?"has-illustration":null),y=c()("components-placeholder__fieldset",{"is-column-layout":f});return(0,s.createElement)("div",a({},m,{className:b}),p?AD:null,h,l,u&&(0,s.createElement)("div",{className:"components-placeholder__preview"},u),(0,s.createElement)("div",{className:"components-placeholder__label"},(0,s.createElement)(Zl,{icon:t}),r),(0,s.createElement)("fieldset",{className:y},!!o&&(0,s.createElement)("legend",{className:"components-placeholder__instructions"},o),n))};function zD(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)}))),n=(0,ec.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}var BD=window.wp.htmlEntities;function FD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,BD.decodeEntities)(e.name)},...FD(e.children||[],t+1)]))}var VD=function(e){let{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i=[],...l}=e;const c=(0,s.useMemo)((()=>[n&&{value:"",label:n},...FD(i)].filter((e=>!!e))),[n,i]);return(0,s.createElement)(fy,a({label:t,options:c,onChange:r,value:o},l))};function HD(e){let{label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}=e;if(!r)return null;const a=zD(r);return(0,s.createElement)(VD,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:void 0!==o?String(o):void 0})}function jD(e){let{label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...l}=e;const c=(0,s.useMemo)((()=>zD(r)),[r]);return(0,s.createElement)(VD,a({label:t,noOptionLabel:n,onChange:i,tree:c,selectedId:void 0!==o?String(o):void 0},l))}const $D=1,WD=100;function UD(e){return"categoriesList"in e}function GD(e){return"categorySuggestions"in e}var YD=function(e){let{authorList:t,selectedAuthorId:n,numberOfItems:r,order:o,orderBy:i,maxItems:a=WD,minItems:l=$D,onAuthorChange:c,onNumberOfItemsChange:d,onOrderChange:f,onOrderByChange:p,...m}=e;return(0,s.createElement)(s.Fragment,null,[f&&p&&(0,s.createElement)(py,{__nextHasNoMarginBottom:!0,key:"query-controls-order-select",label:(0,u.__)("Order by"),value:`${i}/${o}`,options:[{label:(0,u.__)("Newest to oldest"),value:"date/desc"},{label:(0,u.__)("Oldest to newest"),value:"date/asc"},{label:(0,u.__)("A → Z"),value:"title/asc"},{label:(0,u.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==o&&f(n),t!==i&&p(t)}}),UD(m)&&m.categoriesList&&m.onCategoryChange&&(0,s.createElement)(jD,{key:"query-controls-category-select",categoriesList:m.categoriesList,label:(0,u.__)("Category"),noOptionLabel:(0,u.__)("All"),selectedCategoryId:m.selectedCategoryId,onChange:m.onCategoryChange}),GD(m)&&m.categorySuggestions&&m.onCategoryChange&&(0,s.createElement)(JP,{key:"query-controls-categories-select",label:(0,u.__)("Categories"),value:m.selectedCategories&&m.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(m.categorySuggestions),onChange:m.onCategoryChange,maxSuggestions:20}),c&&(0,s.createElement)(HD,{key:"query-controls-author-select",authorList:t,label:(0,u.__)("Author"),noOptionLabel:(0,u.__)("All"),selectedAuthorId:n,onChange:c}),d&&(0,s.createElement)(Wy,{__nextHasNoMarginBottom:!0,key:"query-controls-range-control",label:(0,u.__)("Number of items"),value:r,onChange:d,min:l,max:a,required:!0})])};var qD=(0,s.createContext)({state:null,setState:()=>{}});var KD=(0,s.forwardRef)((function(e,t){let{children:n,value:r,...o}=e;const i=(0,s.useContext)(qD),l=i.state===r;return(0,s.createElement)(kP,a({ref:t,as:id,variant:l?"primary":"secondary",value:r},i,o),n||r)}));var XD=(0,s.forwardRef)((function(e,t){let{label:n,checked:r,defaultChecked:o,disabled:i,onChange:l,...c}=e;const u=uP({state:o,baseId:c.id}),d={...u,disabled:i,state:null!=r?r:u.state,setState:null!=l?l:u.setState};return(0,s.createElement)(qD.Provider,{value:d},(0,s.createElement)(pP,a({ref:t,as:IC,"aria-label":n},u,c)))}));var ZD=function e(t){const{label:n,className:r,selected:o,help:i,onChange:l,hideLabelFromVision:u,options:f=[],...p}=t,m=`inspector-radio-control-${(0,d.useInstanceId)(e)}`,h=e=>l(e.target.value);return null!=f&&f.length?(0,s.createElement)(Rv,{__nextHasNoMarginBottom:!0,label:n,id:m,hideLabelFromVision:u,help:i,className:c()(r,"components-radio-control")},(0,s.createElement)($_,{spacing:1},f.map(((e,t)=>(0,s.createElement)("div",{key:`${m}-${t}`,className:"components-radio-control__option"},(0,s.createElement)("input",a({id:`${m}-${t}`,className:"components-radio-control__input",type:"radio",name:m,value:e.value,onChange:h,checked:e.value===o,"aria-describedby":i?`${m}__help`:void 0},p)),(0,s.createElement)("label",{htmlFor:`${m}-${t}`},e.label)))))):null},JD=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),QD=function(){return QD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{},yA={bottom:"bottom",corner:"corner"};function wA(e){let{axis:t,fadeTimeout:n=180,onResize:r=bA,position:o=yA.bottom,showPx:i=!1}=e;const[a,l]=(0,d.useResizeObserver)(),c=!!t,[u,f]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!1),{width:h,height:g}=l,v=(0,s.useRef)(g),b=(0,s.useRef)(h),y=(0,s.useRef)(),w=(0,s.useCallback)((()=>{y.current&&window.clearTimeout(y.current),y.current=window.setTimeout((()=>{c||(f(!1),m(!1))}),n)}),[n,c]);(0,s.useEffect)((()=>{if(!(null!==h||null!==g))return;const e=h!==b.current,t=g!==v.current;if(e||t){if(h&&!b.current&&g&&!v.current)return b.current=h,void(v.current=g);e&&(f(!0),b.current=h),t&&(m(!0),v.current=g),r({width:h,height:g}),w()}}),[h,g,r,w]);const x=function(e){let{axis:t,height:n,moveX:r=!1,moveY:o=!1,position:i=yA.bottom,showPx:a=!1,width:s}=e;if(!r&&!o)return;if(i===yA.corner)return`${s} x ${n}`;const l=a?" px":"";if(t){if("x"===t&&r)return`${s}${l}`;if("y"===t&&o)return`${n}${l}`}if(r&&o)return`${s} x ${n}`;if(r)return`${s}${l}`;if(o)return`${n}${l}`;return}({axis:t,height:g,moveX:u,moveY:p,position:o,showPx:i,width:h});return{label:x,resizeListener:a}}const xA=Qu("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),_A=Qu("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),EA=Qu("div",{target:"ekdag501"})("background:",Tp.gray[900],";border-radius:2px;box-sizing:border-box;font-size:12px;color:",Tp.ui.textDark,";padding:4px 8px;position:relative;"),CA=Qu(Mh,{target:"ekdag500"})("&&&{color:",Tp.ui.textDark,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const kA=(0,s.forwardRef)((function(e,t){let{label:n,position:r=yA.corner,zIndex:o=1e3,...i}=e;const l=!!n,c=r===yA.bottom,d=r===yA.corner;if(!l)return null;let f={opacity:l?1:void 0,zIndex:o},p={};return c&&(f={...f,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},p={transform:"translate(0, 100%)"}),d&&(f={...f,position:"absolute",top:4,right:(0,u.isRTL)()?void 0:4,left:(0,u.isRTL)()?4:void 0}),(0,s.createElement)(_A,a({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:f},i),(0,s.createElement)(EA,{className:"components-resizable-tooltip__tooltip",style:p},(0,s.createElement)(CA,{as:"span"},n)))}));var SA=kA;const TA=()=>{};const NA=(0,s.forwardRef)((function(e,t){let{axis:n,className:r,fadeTimeout:o=180,isVisible:i=!0,labelRef:l,onResize:u=TA,position:d=yA.bottom,showPx:f=!0,zIndex:p=1e3,...m}=e;const{label:h,resizeListener:g}=wA({axis:n,fadeTimeout:o,onResize:u,showPx:f,position:d});if(!i)return null;const v=c()("components-resize-tooltip",r);return(0,s.createElement)(xA,a({"aria-hidden":"true",className:v,ref:t},m),g,(0,s.createElement)(SA,{"aria-hidden":m["aria-hidden"],label:h,position:d,ref:l,zIndex:p}))}));var RA=NA;const IA="components-resizable-box__handle",MA="components-resizable-box__side-handle",PA="components-resizable-box__corner-handle",OA={top:c()(IA,MA,"components-resizable-box__handle-top"),right:c()(IA,MA,"components-resizable-box__handle-right"),bottom:c()(IA,MA,"components-resizable-box__handle-bottom"),left:c()(IA,MA,"components-resizable-box__handle-left"),topLeft:c()(IA,PA,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(IA,PA,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(IA,PA,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(IA,PA,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},DA={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},AA={top:DA,right:DA,bottom:DA,left:DA,topLeft:DA,topRight:DA,bottomRight:DA,bottomLeft:DA};const LA=(0,s.forwardRef)((function(e,t){let{className:n,children:r,showHandle:o=!0,__experimentalShowTooltip:i=!1,__experimentalTooltipProps:l={},...u}=e;return(0,s.createElement)(vA,a({className:c()("components-resizable-box__container",o&&"has-show-handle",n),handleClasses:OA,handleStyles:AA,ref:t},u),r,i&&(0,s.createElement)(RA,l))}));var zA=LA;var BA=function(e){let{naturalWidth:t,naturalHeight:n,children:r,isInline:o=!1}=e;const[i,{width:a}]=(0,d.useResizeObserver)();if(1!==s.Children.count(r))return null;const l={paddingBottom:t<(null!=a?a:0)?n:n/t*100+"%"},u=o?"span":"div";return(0,s.createElement)(u,{className:"components-responsive-wrapper"},i,(0,s.createElement)(u,{style:l}),(0,s.cloneElement)(r,{className:c()("components-responsive-wrapper__content",r.props.className)}))};const FA=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vmin|vmax|vh|vw)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)},VA="\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n";var HA=function(e){let{html:t="",title:n="",type:r,styles:o=[],scripts:i=[],onFocus:a}=e;const l=(0,s.useRef)(),[c,u]=(0,s.useState)(0),[f,p]=(0,s.useState)(0);function m(){try{var e,t;return!(null===(e=l.current)||void 0===e||null===(t=e.contentDocument)||void 0===t||!t.body)}catch(e){return!1}}function h(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!m())return;const{contentDocument:a,ownerDocument:c}=l.current;if(!e&&null!==(null==a?void 0:a.body.getAttribute("data-resizable-iframe-connected")))return;const u=(0,s.createElement)("html",{lang:c.documentElement.lang,className:r},(0,s.createElement)("head",null,(0,s.createElement)("title",null,n),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:VA}}),o.map(((e,t)=>(0,s.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,s.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:r},(0,s.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,s.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${FA.toString()})();`}}),i.map((e=>(0,s.createElement)("script",{key:e,src:e})))));a.open(),a.write(""+(0,s.renderToString)(u)),a.close()}return(0,s.useEffect)((()=>{var e;function t(){h(!1)}function n(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(u(n.width),p(n.height))}h();const r=l.current,o=null==r||null===(e=r.ownerDocument)||void 0===e?void 0:e.defaultView;return null==r||r.addEventListener("load",t,!1),null==o||o.addEventListener("message",n),()=>{null==r||r.removeEventListener("load",t,!1),null==o||o.addEventListener("message",n)}}),[]),(0,s.useEffect)((()=>{h()}),[n,o,i]),(0,s.useEffect)((()=>{h(!0)}),[t,r]),(0,s.createElement)("iframe",{ref:(0,d.useMergeRefs)([l,(0,d.useFocusableIframe)()]),title:n,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(c),height:Math.ceil(f)})};const jA=(0,s.forwardRef)((function(e,t){let{className:n,children:r,spokenMessage:o=r,politeness:i="polite",actions:a=[],onRemove:l,icon:d=null,explicitDismiss:f=!1,onDismiss:p,listRef:m}=e;function h(e){var t;e&&e.preventDefault&&e.preventDefault(),null==m||null===(t=m.current)||void 0===t||t.focus(),null==p||p(),null==l||l()}!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,ub.speak)(n,t)}),[n,t])}(o,i),(0,s.useEffect)((()=>{const e=setTimeout((()=>{f||(null==p||p(),null==l||l())}),1e4);return()=>clearTimeout(e)}),[p,l,f]);const g=c()(n,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});a&&a.length>1&&("undefined"!=typeof process&&process.env,a=[a[0]]);const v=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!d});return(0,s.createElement)("div",{ref:t,className:g,onClick:f?void 0:h,tabIndex:0,role:f?"":"button",onKeyPress:f?void 0:h,"aria-label":f?"":(0,u.__)("Dismiss this notice")},(0,s.createElement)("div",{className:v},d&&(0,s.createElement)("div",{className:"components-snackbar__icon"},d),r,a.map(((e,t)=>{let{label:n,onClick:r,url:o}=e;return(0,s.createElement)(id,{key:t,href:o,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),null==l||l(),t&&t(e)}(e,r),className:"components-snackbar__action"},n)})),f&&(0,s.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:0,className:"components-snackbar__dismiss-button",onClick:h,onKeyPress:h},"✕")))}));var $A=jA;const WA={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{stiffness:1e3,velocity:-100}}},exit:{opacity:0,transition:{duration:.5}}};var UA=function(e){let{notices:t,className:n,children:r,onRemove:o}=e;const i=(0,s.useRef)(null),l=(0,d.useReducedMotion)();n=c()("components-snackbar-list",n);const u=e=>()=>null==o?void 0:o(e.id);return(0,s.createElement)("div",{className:n,tabIndex:-1,ref:i},r,(0,s.createElement)(Am,null,t.map((e=>{const{content:t,...n}=e;return(0,s.createElement)(Gl.div,{layout:!l,initial:"init",animate:"open",exit:"exit",key:e.id,variants:l?void 0:WA},(0,s.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,s.createElement)($A,a({},n,{onRemove:u(e),listRef:i}),e.content)))}))))};const GA=(function(){var e=Uf.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})` from { transform: rotate(0deg); } to { transform: rotate(360deg); } - `,UA=Qu("svg",{target:"ea4tfvq2"})("width:",ph.spinnerSize,"px;height:",ph.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",kp.ui.theme,";overflow:visible;"),GA={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},YA=Qu("circle",{target:"ea4tfvq1"})(GA,";stroke:",kp.gray[300],";"),qA=Qu("path",{target:"ea4tfvq0"})(GA,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",WA,";");const KA=(0,s.forwardRef)((function(e,t){let{className:n,...r}=e;return(0,s.createElement)(UA,a({className:c()("components-spinner",n),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false"},r,{ref:t}),(0,s.createElement)(YA,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,s.createElement)(qA,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"}))}));var XA=KA;var ZA=ju((function(e,t){const n=ak(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Surface");const JA=e=>{let{tabId:t,children:n,selected:r,...o}=e;return(0,s.createElement)(id,a({role:"tab",tabIndex:r?void 0:-1,"aria-selected":r,id:t,__experimentalIsFocusable:!0},o),n)};var QA=function e(t){var n;let{className:r,children:o,tabs:i,selectOnMove:a=!0,initialTabName:l,orientation:u="horizontal",activeClass:f="is-active",onSelect:p}=t;const m=(0,d.useInstanceId)(e,"tab-panel"),[h,g]=(0,s.useState)(),v=(0,s.useCallback)((e=>{g(e),null==p||p(e)}),[p]),b=i.find((e=>{let{name:t}=e;return t===h})),y=`${m}-${null!==(n=null==b?void 0:b.name)&&void 0!==n?n:"none"}`;return(0,s.useEffect)((()=>{if(b)return;const e=i.find((e=>e.name===l));if(!l||e)if(e&&!e.disabled)v(e.name);else{const e=i.find((e=>!e.disabled));e&&v(e.name)}}),[i,b,l,v]),(0,s.useEffect)((()=>{if(null==b||!b.disabled)return;const e=i.find((e=>!e.disabled));e&&v(e.name)}),[i,null==b?void 0:b.disabled,v]),(0,s.createElement)("div",{className:r},(0,s.createElement)(RS,{role:"tablist",orientation:u,onNavigate:a?(e,t)=>{t.click()}:void 0,className:"components-tab-panel__tabs"},i.map((e=>(0,s.createElement)(JA,{className:c()("components-tab-panel__tabs-item",e.className,{[f]:e.name===h}),tabId:`${m}-${e.name}`,"aria-controls":`${m}-${e.name}-view`,selected:e.name===h,key:e.name,onClick:()=>v(e.name),disabled:e.disabled,label:e.icon&&e.title,icon:e.icon,showTooltip:!!e.icon},!e.icon&&e.title)))),b&&(0,s.createElement)("div",{key:y,"aria-labelledby":y,role:"tabpanel",id:`${y}-view`,className:"components-tab-panel__tab-content"},o(b)))};const eL=(0,s.forwardRef)((function(e,t){const{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,value:i,help:l,className:c,onChange:u,type:f="text",...p}=e,m=`inspector-text-control-${(0,d.useInstanceId)(eL)}`;return(0,s.createElement)(Tv,{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,id:m,help:l,className:c},(0,s.createElement)("input",a({className:"components-text-control__input",type:f,id:m,value:i,onChange:e=>u(e.target.value),"aria-describedby":l?m+"__help":void 0,ref:t},p)))}));var tL=eL;const nL=$f("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",ph.radiusBlockUi,";border:",ph.borderWidth," solid ",kp.ui.border,";",""),rL=$f("border-color:",kp.ui.theme,";box-shadow:0 0 0 calc( ",ph.borderWidthFocus," - ",ph.borderWidth," ) ",kp.ui.theme,";outline:2px solid transparent;","");var oL={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"};const iL=$f("font-family:",vv("default.fontFamily"),";padding:6px 8px;",nL,";font-size:",vv("mobileTextMinFontSize"),";line-height:normal;",`@media (min-width: ${oL["small"]})`,"{font-size:",vv("default.fontSize"),";line-height:normal;}&:focus{",rL,";}&::-webkit-input-placeholder{color:",kp.ui.darkGrayPlaceholder,";}&::-moz-placeholder{opacity:1;color:",kp.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",kp.ui.darkGrayPlaceholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",kp.ui.lightGrayPlaceholder,";}&::-moz-placeholder{opacity:1;color:",kp.ui.lightGrayPlaceholder,";}&:-ms-input-placeholder{color:",kp.ui.lightGrayPlaceholder,";}}","");const aL=Qu("textarea",{target:"e1w5nnrk0"})("width:100%;",iL,";");var sL=function e(t){const{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,value:i,help:l,onChange:c,rows:u=4,className:f,...p}=t,m=`inspector-textarea-control-${(0,d.useInstanceId)(e)}`;return(0,s.createElement)(Tv,{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,id:m,help:l,className:f},(0,s.createElement)(aL,a({className:"components-textarea-control__input",id:m,rows:u,onChange:e=>c(e.target.value),"aria-describedby":l?m+"__help":void 0,value:i},p)))};var lL=e=>{const{text:t="",highlight:n=""}=e,r=n.trim();if(!r)return(0,s.createElement)(s.Fragment,null,t);const o=new RegExp(`(${db(r)})`,"gi");return(0,s.createInterpolateElement)(t.replace(o,"$&"),{mark:(0,s.createElement)("mark",null)})};var cL=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}));var uL=function(e){const{children:t}=e;return(0,s.createElement)("div",{className:"components-tip"},(0,s.createElement)(ay,{icon:cL}),(0,s.createElement)("p",null,t))};var dL=function e(t){let{__nextHasNoMarginBottom:n,label:r,checked:o,help:i,className:a,onChange:l,disabled:c}=t;const u=`inspector-toggle-control-${(0,d.useInstanceId)(e)}`,f=Vu()("components-toggle-control",a,!n&&$f({marginBottom:qm(3)},"",""));let p,m;return i&&("function"==typeof i?void 0!==o&&(m=i(o)):m=i,m&&(p=u+"__help")),(0,s.createElement)(Tv,{id:u,help:m,className:f,__nextHasNoMarginBottom:!0},(0,s.createElement)(Uv,{justify:"flex-start",spacing:3},(0,s.createElement)(WP,{id:u,checked:o,onChange:function(e){l(e.target.checked)},"aria-describedby":p,disabled:c}),(0,s.createElement)(Hm,{as:"label",htmlFor:u,className:"components-toggle-control__label"},r)))};const fL=(0,s.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,s.createElement)(AP,a({},o,{isIcon:!0,"aria-label":r,showTooltip:!0,ref:t}),(0,s.createElement)(Zl,{icon:n}))}));var pL=fL,mL=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],hL=mL,gL=z({as:"button",memo:!0,useHook:F({name:"ToolbarItem",compose:ke,keys:hL})});var vL=(0,s.createContext)();var bL=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useContext)(vL);if("function"!=typeof n&&!r)return"undefined"!=typeof process&&process.env,null;const l={...o,ref:t,"data-toolbar-item":!0};return i?(0,s.createElement)(gL,a({},i,l,{as:r}),n):r?(0,s.createElement)(r,l,n):n(l)}));var yL=e=>(0,s.createElement)("div",{className:e.className},e.children);var wL=(0,s.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:l,isActive:u,isDisabled:d,...f}=e;return(0,s.useContext)(vL)?(0,s.createElement)(bL,a({className:c()("components-toolbar-button",r)},o,f,{ref:t}),(e=>(0,s.createElement)(id,a({label:l,isPressed:u,disabled:d},e),i))):(0,s.createElement)(yL,{className:n},(0,s.createElement)(id,a({ref:t,icon:f.icon,label:l,shortcut:f.shortcut,"data-subscript":f.subscript,onClick:e=>{e.stopPropagation(),f.onClick&&f.onClick(e)},className:c()("components-toolbar__control",r),isPressed:u,disabled:d,"data-toolbar-item":!0},o,f),i))}));var xL=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)("div",a({className:t},r),n)};var _L=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,s.createElement)(PS,a({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,s.useContext)(vL)?(0,s.createElement)(bL,n,o):o(n)};var EL=function(e){var t;let{controls:n=[],children:r,className:o,isCollapsed:i,title:l,...u}=e;const d=(0,s.useContext)(vL);if(!(n&&n.length||r))return null;const f=c()(d?"components-toolbar-group":"components-toolbar",o);let p=n;return Array.isArray(p[0])||(p=[p]),i?(0,s.createElement)(_L,a({label:l,controls:p,className:f,children:r},u)):(0,s.createElement)(xL,a({className:f},u),null===(t=p)||void 0===t?void 0:t.flatMap(((e,t)=>e.map(((e,n)=>(0,s.createElement)(wL,a({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),r)};var CL=F({name:"Toolbar",compose:dm,keys:mL,useProps:function(e,t){return m({role:"toolbar","aria-orientation":e.orientation},t)}}),kL=z({as:"div",useHook:CL,useCreateElement:function(e,t,n){return N(e,t,n)}});var SL=(0,s.forwardRef)((function(e,t){let{label:n,...r}=e;const o=function(e){void 0===e&&(e={});var t=Ap(e),n=t.orientation;return rm(m({orientation:void 0===n?"horizontal":n},h(t,["orientation"])))}({loop:!0,baseId:r.id,rtl:(0,u.isRTL)()});return(0,s.createElement)(vL.Provider,{value:o},(0,s.createElement)(kL,a({ref:t,"aria-label":n},o,r)))}));var TL=(0,s.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return Kl()("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,s.createElement)(EL,a({},o,{className:n}));const i=c()("components-accessible-toolbar",n);return(0,s.createElement)(SL,a({className:i,label:r,ref:t},o))}));var NL=(0,s.forwardRef)((function(e,t){return(0,s.useContext)(vL)?(0,s.createElement)(bL,a({ref:t},e.toggleProps),(t=>(0,s.createElement)(PS,a({},e,{popoverProps:{variant:"toolbar",...e.popoverProps},toggleProps:t})))):(0,s.createElement)(PS,e)}));const RL={columns:e=>$f("grid-template-columns:",`repeat( ${e}, minmax(0, 1fr) )`,";",""),spacing:$f("column-gap:",qm(2),";row-gap:",qm(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},IL={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},ML=$f(RL.item.fullWidth," gap:",qm(2),";.components-dropdown-menu{margin:",qm(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",qm(6),";}",""),PL={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},OL=$f(RL.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",yv,"{margin-bottom:0;",wv,":last-child{margin-bottom:0;}}",Cv,"{margin-bottom:0;}&& ",Yh,"{label{line-height:1.4em;}}",""),DL={name:"eivff4",styles:"display:none"},AL={name:"16gsvie",styles:"min-width:200px"},LL=Qu("span",{target:"ews648u0"})("color:",kp.ui.themeDark10,";font-size:11px;font-weight:500;line-height:1.4;",zh({marginLeft:qm(3)})," text-transform:uppercase;"),zL=$f("color:",kp.gray[900],";&&[aria-disabled='true']{color:",kp.gray[700],";opacity:1;&:hover{color:",kp.gray[700],";}",LL,"{opacity:0.3;}}",""),BL=()=>{},FL=(0,s.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:BL,deregisterPanelItem:BL,flagItemCustomization:BL,areAllOptionalControlsHidden:!0}),VL=()=>(0,s.useContext)(FL);const HL=e=>{let{itemClassName:t,items:n,toggleItem:r}=e;if(!n.length)return null;const o=(0,s.createElement)(LL,{"aria-hidden":!0},(0,u.__)("Reset"));return(0,s.createElement)(aO,{label:(0,u.__)("Defaults")},n.map((e=>{let[n,i]=e;return i?(0,s.createElement)(sO,{key:n,className:t,role:"menuitem",label:(0,u.sprintf)((0,u.__)("Reset %s"),n),onClick:()=>{r(n),(0,lb.speak)((0,u.sprintf)((0,u.__)("%s reset to default"),n),"assertive")},suffix:o},n):(0,s.createElement)(sO,{key:n,className:t,role:"menuitemcheckbox",isSelected:!0,"aria-disabled":!0},n)})))},jL=e=>{let{items:t,toggleItem:n}=e;return t.length?(0,s.createElement)(aO,{label:(0,u.__)("Tools")},t.map((e=>{let[t,r]=e;const o=r?(0,u.sprintf)((0,u.__)("Hide and reset %s"),t):(0,u.sprintf)((0,u.__)("Show %s"),t);return(0,s.createElement)(sO,{key:t,icon:r&&F_,isSelected:r,label:o,onClick:()=>{r?(0,lb.speak)((0,u.sprintf)((0,u.__)("%s hidden and reset to default"),t),"assertive"):(0,lb.speak)((0,u.sprintf)((0,u.__)("%s is now visible"),t),"assertive"),n(t)},role:"menuitemcheckbox"},t)}))):null};var $L=ju(((e,t)=>{const{areAllOptionalControlsHidden:n,defaultControlsItemClassName:r,dropdownMenuClassName:o,hasMenuItems:i,headingClassName:l,label:c,menuItems:d,resetAll:f,toggleItem:p,...m}=function(e){const{className:t,...n}=Hu(e,"ToolsPanelHeader"),r=Vu(),o=(0,s.useMemo)((()=>r(ML,t)),[t,r]),i=(0,s.useMemo)((()=>r(AL)),[r]),a=(0,s.useMemo)((()=>r(PL)),[r]),l=(0,s.useMemo)((()=>r(zL)),[r]),{menuItems:c,hasMenuItems:u,areAllOptionalControlsHidden:d}=VL();return{...n,areAllOptionalControlsHidden:d,defaultControlsItemClassName:l,dropdownMenuClassName:i,hasMenuItems:u,headingClassName:a,menuItems:c,className:o}}(e);if(!c)return null;const h=Object.entries((null==d?void 0:d.default)||{}),g=Object.entries((null==d?void 0:d.optional)||{}),v=n?$m:Rk,b=(0,u.sprintf)((0,u._x)("%s options","Button label to reveal tool panel options"),c),y=n?(0,u.__)("All options are currently hidden"):void 0,w=[...h,...g].some((e=>{let[,t]=e;return t}));return(0,s.createElement)(Uv,a({},m,{ref:t}),(0,s.createElement)($_,{level:2,className:l},c),i&&(0,s.createElement)(PS,{icon:v,label:b,menuProps:{className:o},toggleProps:{isSmall:!0,describedBy:y}},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(HL,{items:h,toggleItem:p,itemClassName:r}),(0,s.createElement)(jL,{items:g,toggleItem:p}),(0,s.createElement)(aO,null,(0,s.createElement)(sO,{"aria-disabled":!w,variant:"tertiary",onClick:()=>{w&&(f(),(0,lb.speak)((0,u.__)("All options reset"),"assertive"))}},(0,u.__)("Reset all")))))))}),"ToolsPanelHeader");const WL=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:a,label:s}=e;const l=a?"default":"optional",c=null==r||null===(t=r[l])||void 0===t?void 0:t[s],u=c||i();o[l][s]=!n&&u})),o},UL=e=>e&&0===Object.keys(e).length;function GL(e){const{className:t,resetAll:n,panelId:r,hasInnerWrapper:o,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l,...c}=Hu(e,"ToolsPanel"),u=(0,s.useRef)(!1),d=u.current;(0,s.useEffect)((()=>{d&&(u.current=!1)}),[d]);const[f,p]=(0,s.useState)([]),m=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))}),[p]),h=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))}),[p]),[g,v]=(0,s.useState)({default:{},optional:{}});(0,s.useEffect)((()=>{v((e=>WL({panelItems:f,shouldReset:!1,currentMenuItems:e})))}),[f,v]);const b=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";v((n=>({...n,[t]:{...n[t],[e]:!0}})))}),[v]),[y,w]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(UL(null==g?void 0:g.default)&&!UL(null==g?void 0:g.optional)){const e=!Object.entries(g.optional).some((e=>{let[,t]=e;return t}));w(e)}}),[g,w]);const x=Vu(),_=(0,s.useMemo)((()=>{const e=o&&$f(">div:not( :first-of-type ){display:grid;",RL.columns(2)," ",RL.spacing," ",RL.item.fullWidth,";}","");const n=UL(null==g?void 0:g.default)&&y&&IL;return x((e=>$f(RL.columns(e)," ",RL.spacing," border-top:",ph.borderWidth," solid ",kp.gray[300],";margin-top:-1px;padding:",qm(4),";",""))(2),e,n,t)}),[y,t,x,o,g]),E=(0,s.useCallback)((e=>{const t=f.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...g,[n]:{...g[n],[e]:!g[n][e]}};v(r)}),[g,f,v]),C=(0,s.useCallback)((()=>{if("function"==typeof n){u.current=!0;const e=[];f.forEach((t=>{t.resetAllFilter&&e.push(t.resetAllFilter)})),n(e)}const e=WL({panelItems:f,shouldReset:!0});v(e)}),[f,n,v]),k=e=>{const t=g.optional||{},n=e.find((e=>e.isShownByDefault||!!t[e.label]));return null==n?void 0:n.label},S=k(f),T=k([...f].reverse());return{...c,panelContext:(0,s.useMemo)((()=>({areAllOptionalControlsHidden:y,deregisterPanelItem:h,firstDisplayedItem:S,flagItemCustomization:b,hasMenuItems:!!f.length,isResetting:u.current,lastDisplayedItem:T,menuItems:g,panelId:r,registerPanelItem:m,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l})),[y,h,S,b,T,g,r,f,m,i,a,l]),resetAllItems:C,toggleItem:E,className:_}}var YL=ju(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:l,...c}=GL(e);return(0,s.createElement)(xE,a({},c,{columns:2,ref:t}),(0,s.createElement)(FL.Provider,{value:o},(0,s.createElement)($L,{label:r,resetAll:i,toggleItem:l}),n))}),"ToolsPanel");var qL=ju(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n,r;const{className:o,hasValue:i,isShownByDefault:a,label:l,panelId:c,resetAllFilter:u,onDeselect:f,onSelect:p,...m}=Hu(e,"ToolsPanelItem"),{panelId:h,menuItems:g,registerPanelItem:v,deregisterPanelItem:b,flagItemCustomization:y,isResetting:w,shouldRenderPlaceholderItems:x,firstDisplayedItem:_,lastDisplayedItem:E,__experimentalFirstVisibleItemClass:C,__experimentalLastVisibleItemClass:k}=VL(),S=(0,s.useCallback)(i,[c,i]),T=(0,s.useCallback)(u,[c,u]),N=(0,d.usePrevious)(h),R=h===c||null===h;(0,s.useEffect)((()=>(R&&null!==N&&v({hasValue:S,isShownByDefault:a,label:l,resetAllFilter:T,panelId:c}),()=>{(null===N&&h||h===c)&&b(l)})),[h,R,a,l,S,c,N,T,v,b]);const I=a?"default":"optional",M=null==g||null===(t=g[I])||void 0===t?void 0:t[l],P=(0,d.usePrevious)(M),O=void 0!==(null==g||null===(n=g[I])||void 0===n?void 0:n[l]),D=i(),A=(0,d.usePrevious)(D),L=D&&!A;(0,s.useEffect)((()=>{L&&(a||null===h)&&y(l,I)}),[h,L,a,I,l,y]),(0,s.useEffect)((()=>{O&&!w&&R&&(!M||D||P||null==p||p(),!M&&P&&(null==f||f()))}),[R,M,O,w,D,P,p,f]);const z=a?void 0!==(null==g||null===(r=g[I])||void 0===r?void 0:r[l]):M,B=Vu(),F=(0,s.useMemo)((()=>B(OL,x&&!z&&DL,o,_===l&&C,E===l&&k)),[z,x,o,B,_,E,C,k,l]);return{...m,isShown:z,shouldRenderPlaceholder:x,className:F}}(e);return r?(0,s.createElement)(td,a({},i,{ref:t}),n):o?(0,s.createElement)(td,a({},i,{ref:t})):null}),"ToolsPanelItem"),KL=window.wp.keycodes;const XL=(0,s.createContext)(),ZL=XL.Provider;function JL(e){let{children:t}=e;const[n,r]=(0,s.useState)(),o=(0,s.useMemo)((()=>({lastFocusedElement:n,setLastFocusedElement:r})),[n]);return(0,s.createElement)(ZL,{value:o},t)}function QL(e){const t=ES.focus.focusable.find(e,{sequential:!0});if(t&&t.length)return t.filter((t=>t.closest('[role="row"]')===e))}var ez=(0,s.forwardRef)((function(e,t){let{children:n,onExpandRow:r=(()=>{}),onCollapseRow:o=(()=>{}),onFocusRow:i=(()=>{}),applicationAriaLabel:l,...c}=e;const u=(0,s.useCallback)((e=>{const{keyCode:t,metaKey:n,ctrlKey:a,altKey:s}=e;if(n||a||s||![KL.UP,KL.DOWN,KL.LEFT,KL.RIGHT,KL.HOME,KL.END].includes(t))return;e.stopPropagation();const{activeElement:l}=document,{currentTarget:c}=e;if(!c.contains(l))return;const u=l.closest('[role="row"]'),d=QL(u),f=d.indexOf(l),p=0===f,m=p&&"false"===u.getAttribute("aria-expanded")&&t===KL.RIGHT;if([KL.LEFT,KL.RIGHT].includes(t)){let n;if(n=t===KL.LEFT?Math.max(0,f-1):Math.min(f+1,d.length-1),p){if(t===KL.LEFT){var h,g,v;if("true"===u.getAttribute("aria-expanded"))return o(u),void e.preventDefault();const t=Math.max(parseInt(null!==(h=null==u?void 0:u.getAttribute("aria-level"))&&void 0!==h?h:1,10)-1,1),n=Array.from(c.querySelectorAll('[role="row"]'));let r=u;for(let e=n.indexOf(u);e>=0;e--)if(parseInt(n[e].getAttribute("aria-level"),10)===t){r=n[e];break}null===(g=QL(r))||void 0===g||null===(v=g[0])||void 0===v||v.focus()}if(t===KL.RIGHT){if("false"===u.getAttribute("aria-expanded"))return r(u),void e.preventDefault();const t=QL(u);var b;if(t.length>0)null===(b=t[n])||void 0===b||b.focus()}return void e.preventDefault()}if(m)return;d[n].focus(),e.preventDefault()}else if([KL.UP,KL.DOWN].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(u);let o;if(o=t===KL.UP?Math.max(0,r-1):Math.min(r+1,n.length-1),o===r)return void e.preventDefault();const a=QL(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(f,a.length-1)].focus(),i(e,u,n[o]),e.preventDefault()}else if([KL.HOME,KL.END].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(u);let o;if(o=t===KL.HOME?0:n.length-1,o===r)return void e.preventDefault();const a=QL(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(f,a.length-1)].focus(),i(e,u,n[o]),e.preventDefault()}}),[r,o,i]);return(0,s.createElement)(JL,null,(0,s.createElement)("div",{role:"application","aria-label":l},(0,s.createElement)("table",a({},c,{role:"treegrid",onKeyDown:u,ref:t}),(0,s.createElement)("tbody",null,n))))}));var tz=(0,s.forwardRef)((function(e,t){let{children:n,level:r,positionInSet:o,setSize:i,isExpanded:l,...c}=e;return(0,s.createElement)("tr",a({},c,{ref:t,role:"row","aria-level":r,"aria-posinset":o,"aria-setsize":i,"aria-expanded":l}),n)})),nz=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useRef)(),a=t||i,{lastFocusedElement:l,setLastFocusedElement:c}=(0,s.useContext)(XL);let u;l&&(u=l===a.current?0:-1);const d={ref:a,tabIndex:u,onFocus:e=>c(e.target),...o};return"function"==typeof n?n(d):(0,s.createElement)(r,d,n)})),rz=(0,s.forwardRef)((function(e,t){let{children:n,...r}=e;return(0,s.createElement)(nz,a({ref:t},r),n)})),oz=(0,s.forwardRef)((function(e,t){let{children:n,withoutGridItem:r=!1,...o}=e;return(0,s.createElement)("td",a({},o,{role:"gridcell"}),r?n:(0,s.createElement)(rz,{ref:t},n))}));function iz(e){e.stopPropagation()}var az=(0,s.forwardRef)(((e,t)=>(Kl()("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,s.createElement)("div",a({},e,{ref:t,onMouseDown:iz})))));function sz(e){return Ld((0,s.useContext)(Bd).fills,{sync:!0}).get(e)}const lz=Qu("div",{target:"ebn2ljm1"})({name:"5ob2ly",styles:"display:flex;position:relative"}),cz=Qu("div",{target:"ebn2ljm0"})((e=>{let{isLayered:t,offsetAmount:n}=e;return $f(t?zh({marginLeft:n})():zh({right:-1*n})(),"","")})," ",(e=>{let{isLayered:t}=e;return t?uz:dz})," ",(e=>{let{zIndex:t}=e;return $f({zIndex:t},"","")}),";"),uz={name:"a4hmbt",styles:"position:absolute"},dz={name:"bjn8wh",styles:"position:relative"};const fz=ju((function(e,t){const{children:n,className:r,isLayered:o=!0,isReversed:i=!1,offset:l=0,...c}=Hu(e,"ZStack"),u=$v(n),d=u.length-1,f=u.map(((e,t)=>{const n=i?d-t:t,r=l*t,a=(0,s.isValidElement)(e)?e.key:t;return(0,s.createElement)(cz,{isLayered:o,offsetAmount:r,zIndex:n,key:a},e)}));return(0,s.createElement)(lz,a({},c,{className:r,ref:t}),f)}),"ZStack");var pz=fz;const mz={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"ctrlShift",character:"~"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function hz(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mz;const t=(0,s.useRef)(),[n,r]=(0,s.useState)(!1);function o(e){const n=Array.from(t.current.querySelectorAll('[role="region"][tabindex="-1"]'));if(!n.length)return;let o=n[0];const i=n.indexOf(t.current.ownerDocument.activeElement.closest('[role="region"][tabindex="-1"]'));if(-1!==i){let t=i+e;t=-1===t?n.length-1:t,t=t===n.length?0:t,o=n[t]}o.focus(),r(!0)}const i=(0,d.useRefEffect)((e=>{function t(){r(!1)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[r]);return{ref:(0,d.useMergeRefs)([t,i]),className:n?"is-focusing-regions":"",onKeyDown(t){e.previous.some((e=>{let{modifier:n,character:r}=e;return KL.isKeyboardEvent[n](t,r)}))?o(-1):e.next.some((e=>{let{modifier:n,character:r}=e;return KL.isKeyboardEvent[n](t,r)}))&&o(1)}}}var gz=(0,d.createHigherOrderComponent)((e=>t=>{let{shortcuts:n,...r}=t;return(0,s.createElement)("div",hz(n),(0,s.createElement)(e,r))}),"navigateRegions");var vz=(0,d.createHigherOrderComponent)((e=>function(t){const n=(0,d.useConstrainedTabbing)();return(0,s.createElement)("div",{ref:n,tabIndex:-1},(0,s.createElement)(e,t))}),"withConstrainedTabbing"),bz=e=>(0,d.createHigherOrderComponent)((t=>class extends s.Component{constructor(){super(...arguments),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:t,fallbackStyles:n}=this.state;if(this.nodeRef&&!t){const t=e(this.nodeRef,this.props);Ql()(t,n)||this.setState({fallbackStyles:t,grabStylesCompleted:Object.values(t).every(Boolean)})}}render(){const e=(0,s.createElement)(t,a({},this.props,this.state.fallbackStyles));return this.props.node?e:(0,s.createElement)("div",{ref:this.bindRef}," ",e," ")}}),"withFallbackStyles"),yz=window.wp.hooks;function wz(e){return(0,d.createHigherOrderComponent)((t=>{const n="core/with-filters/"+e;let r;class o extends s.Component{constructor(){super(...arguments),void 0===r&&(r=(0,yz.applyFilters)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,yz.addAction)("hookRemoved",n,a),(0,yz.addAction)("hookAdded",n,a))}componentWillUnmount(){o.instances=o.instances.filter((e=>e!==this)),0===o.instances.length&&((0,yz.removeAction)("hookRemoved",n),(0,yz.removeAction)("hookAdded",n))}render(){return(0,s.createElement)(r,this.props)}}o.instances=[];const i=(0,d.debounce)((()=>{r=(0,yz.applyFilters)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}var xz=(0,d.createHigherOrderComponent)((e=>{const t=function(){let{onFocusReturn:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>n=>{const r=(0,d.useFocusReturn)(e);return(0,s.createElement)("div",{ref:r},(0,s.createElement)(t,n))}};if((n=e)instanceof s.Component||"function"==typeof n){const n=e;return t()(n)}var n;return t(e)}),"withFocusReturn");const _z=e=>{let{children:t}=e;return Kl()("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),t};var Ez=(0,d.createHigherOrderComponent)((e=>{function t(t,r){const[o,i]=(0,s.useState)([]),l=(0,s.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:tf()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),c={...t,noticeList:o,noticeOperations:l,noticeUI:o.length>0&&(0,s.createElement)(CD,{className:"components-with-notices-ui",notices:o,onRemove:l.removeNotice})};return n?(0,s.createElement)(e,a({},c,{ref:r})):(0,s.createElement)(e,c)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,s.forwardRef)(t)):t})),Cz=window.wp.privateApis;const{lock:kz,unlock:Sz}=(0,Cz.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/components"),Tz={};kz(Tz,{CustomSelectControl:xN,__experimentalPopoverLegacyPositionToPlacement:bf})}(),(window.wp=window.wp||{}).components=r}(); \ No newline at end of file + `,YA=Qu("svg",{target:"ea4tfvq2"})("width:",hh.spinnerSize,"px;height:",hh.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",Tp.ui.theme,";overflow:visible;"),qA={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},KA=Qu("circle",{target:"ea4tfvq1"})(qA,";stroke:",Tp.gray[300],";"),XA=Qu("path",{target:"ea4tfvq0"})(qA,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",GA,";");const ZA=(0,s.forwardRef)((function(e,t){let{className:n,...r}=e;return(0,s.createElement)(YA,a({className:c()("components-spinner",n),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false"},r,{ref:t}),(0,s.createElement)(KA,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,s.createElement)(XA,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"}))}));var JA=ZA;var QA=ju((function(e,t){const n=lk(e);return(0,s.createElement)(td,a({},n,{ref:t}))}),"Surface");const eL=e=>{let{tabId:t,children:n,selected:r,...o}=e;return(0,s.createElement)(id,a({role:"tab",tabIndex:r?void 0:-1,"aria-selected":r,id:t,__experimentalIsFocusable:!0},o),n)};var tL=function e(t){var n;let{className:r,children:o,tabs:i,selectOnMove:a=!0,initialTabName:l,orientation:u="horizontal",activeClass:f="is-active",onSelect:p}=t;const m=(0,d.useInstanceId)(e,"tab-panel"),[h,g]=(0,s.useState)(),v=(0,s.useCallback)((e=>{g(e),null==p||p(e)}),[p]),b=i.find((e=>{let{name:t}=e;return t===h})),y=`${m}-${null!==(n=null==b?void 0:b.name)&&void 0!==n?n:"none"}`;return(0,s.useEffect)((()=>{if(b)return;const e=i.find((e=>e.name===l));if(!l||e)if(e&&!e.disabled)v(e.name);else{const e=i.find((e=>!e.disabled));e&&v(e.name)}}),[i,b,l,v]),(0,s.useEffect)((()=>{if(null==b||!b.disabled)return;const e=i.find((e=>!e.disabled));e&&v(e.name)}),[i,null==b?void 0:b.disabled,v]),(0,s.createElement)("div",{className:r},(0,s.createElement)(MS,{role:"tablist",orientation:u,onNavigate:a?(e,t)=>{t.click()}:void 0,className:"components-tab-panel__tabs"},i.map((e=>(0,s.createElement)(eL,{className:c()("components-tab-panel__tabs-item",e.className,{[f]:e.name===h}),tabId:`${m}-${e.name}`,"aria-controls":`${m}-${e.name}-view`,selected:e.name===h,key:e.name,onClick:()=>v(e.name),disabled:e.disabled,label:e.icon&&e.title,icon:e.icon,showTooltip:!!e.icon},!e.icon&&e.title)))),b&&(0,s.createElement)("div",{key:y,"aria-labelledby":y,role:"tabpanel",id:`${y}-view`,className:"components-tab-panel__tab-content"},o(b)))};const nL=(0,s.forwardRef)((function(e,t){const{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,value:i,help:l,className:c,onChange:u,type:f="text",...p}=e,m=`inspector-text-control-${(0,d.useInstanceId)(nL)}`;return(0,s.createElement)(Rv,{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,id:m,help:l,className:c},(0,s.createElement)("input",a({className:"components-text-control__input",type:f,id:m,value:i,onChange:e=>u(e.target.value),"aria-describedby":l?m+"__help":void 0,ref:t},p)))}));var rL=nL;const oL=Uf("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",hh.radiusBlockUi,";border:",hh.borderWidth," solid ",Tp.ui.border,";",""),iL=Uf("border-color:",Tp.ui.theme,";box-shadow:0 0 0 calc( ",hh.borderWidthFocus," - ",hh.borderWidth," ) ",Tp.ui.theme,";outline:2px solid transparent;","");var aL={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"};const sL=Uf("font-family:",yv("default.fontFamily"),";padding:6px 8px;",oL,";font-size:",yv("mobileTextMinFontSize"),";line-height:normal;",`@media (min-width: ${aL["small"]})`,"{font-size:",yv("default.fontSize"),";line-height:normal;}&:focus{",iL,";}&::-webkit-input-placeholder{color:",Tp.ui.darkGrayPlaceholder,";}&::-moz-placeholder{opacity:1;color:",Tp.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",Tp.ui.darkGrayPlaceholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",Tp.ui.lightGrayPlaceholder,";}&::-moz-placeholder{opacity:1;color:",Tp.ui.lightGrayPlaceholder,";}&:-ms-input-placeholder{color:",Tp.ui.lightGrayPlaceholder,";}}","");const lL=Qu("textarea",{target:"e1w5nnrk0"})("width:100%;",sL,";");var cL=function e(t){const{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,value:i,help:l,onChange:c,rows:u=4,className:f,...p}=t,m=`inspector-textarea-control-${(0,d.useInstanceId)(e)}`;return(0,s.createElement)(Rv,{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,id:m,help:l,className:f},(0,s.createElement)(lL,a({className:"components-textarea-control__input",id:m,rows:u,onChange:e=>c(e.target.value),"aria-describedby":l?m+"__help":void 0,value:i},p)))};var uL=e=>{const{text:t="",highlight:n=""}=e,r=n.trim();if(!r)return(0,s.createElement)(s.Fragment,null,t);const o=new RegExp(`(${pb(r)})`,"gi");return(0,s.createInterpolateElement)(t.replace(o,"$&"),{mark:(0,s.createElement)("mark",null)})};var dL=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}));var fL=function(e){const{children:t}=e;return(0,s.createElement)("div",{className:"components-tip"},(0,s.createElement)(ly,{icon:dL}),(0,s.createElement)("p",null,t))};var pL=function e(t){let{__nextHasNoMarginBottom:n,label:r,checked:o,help:i,className:a,onChange:l,disabled:c}=t;const u=`inspector-toggle-control-${(0,d.useInstanceId)(e)}`,f=Vu()("components-toggle-control",a,!n&&Uf({marginBottom:Xm(3)},"",""));let p,m;return i&&("function"==typeof i?void 0!==o&&(m=i(o)):m=i,m&&(p=u+"__help")),(0,s.createElement)(Rv,{id:u,help:m,className:f,__nextHasNoMarginBottom:!0},(0,s.createElement)(Yv,{justify:"flex-start",spacing:3},(0,s.createElement)(GP,{id:u,checked:o,onChange:function(e){l(e.target.checked)},"aria-describedby":p,disabled:c}),(0,s.createElement)($m,{as:"label",htmlFor:u,className:"components-toggle-control__label"},r)))};const mL=(0,s.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,s.createElement)(zP,a({},o,{isIcon:!0,"aria-label":r,showTooltip:!0,ref:t}),(0,s.createElement)(Zl,{icon:n}))}));var hL=mL,gL=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],vL=gL,bL=z({as:"button",memo:!0,useHook:F({name:"ToolbarItem",compose:ke,keys:vL})});var yL=(0,s.createContext)();var wL=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useContext)(yL);if("function"!=typeof n&&!r)return"undefined"!=typeof process&&process.env,null;const l={...o,ref:t,"data-toolbar-item":!0};return i?(0,s.createElement)(bL,a({},i,l,{as:r}),n):r?(0,s.createElement)(r,l,n):n(l)}));var xL=e=>(0,s.createElement)("div",{className:e.className},e.children);var _L=(0,s.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:l,isActive:u,isDisabled:d,...f}=e;return(0,s.useContext)(yL)?(0,s.createElement)(wL,a({className:c()("components-toolbar-button",r)},o,f,{ref:t}),(e=>(0,s.createElement)(id,a({label:l,isPressed:u,disabled:d},e),i))):(0,s.createElement)(xL,{className:n},(0,s.createElement)(id,a({ref:t,icon:f.icon,label:l,shortcut:f.shortcut,"data-subscript":f.subscript,onClick:e=>{e.stopPropagation(),f.onClick&&f.onClick(e)},className:c()("components-toolbar__control",r),isPressed:u,disabled:d,"data-toolbar-item":!0},o,f),i))}));var EL=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)("div",a({className:t},r),n)};var CL=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,s.createElement)(DS,a({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,s.useContext)(yL)?(0,s.createElement)(wL,n,o):o(n)};var kL=function(e){var t;let{controls:n=[],children:r,className:o,isCollapsed:i,title:l,...u}=e;const d=(0,s.useContext)(yL);if(!(n&&n.length||r))return null;const f=c()(d?"components-toolbar-group":"components-toolbar",o);let p=n;return Array.isArray(p[0])||(p=[p]),i?(0,s.createElement)(CL,a({label:l,controls:p,className:f,children:r},u)):(0,s.createElement)(EL,a({className:f},u),null===(t=p)||void 0===t?void 0:t.flatMap(((e,t)=>e.map(((e,n)=>(0,s.createElement)(_L,a({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),r)};var SL=F({name:"Toolbar",compose:pm,keys:gL,useProps:function(e,t){return m({role:"toolbar","aria-orientation":e.orientation},t)}}),TL=z({as:"div",useHook:SL,useCreateElement:function(e,t,n){return N(e,t,n)}});var NL=(0,s.forwardRef)((function(e,t){let{label:n,...r}=e;const o=function(e){void 0===e&&(e={});var t=zp(e),n=t.orientation;return im(m({orientation:void 0===n?"horizontal":n},h(t,["orientation"])))}({loop:!0,baseId:r.id,rtl:(0,u.isRTL)()});return(0,s.createElement)(yL.Provider,{value:o},(0,s.createElement)(TL,a({ref:t,"aria-label":n},o,r)))}));var RL=(0,s.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return Kl()("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,s.createElement)(kL,a({},o,{className:n}));const i=c()("components-accessible-toolbar",n);return(0,s.createElement)(NL,a({className:i,label:r,ref:t},o))}));var IL=(0,s.forwardRef)((function(e,t){return(0,s.useContext)(yL)?(0,s.createElement)(wL,a({ref:t},e.toggleProps),(t=>(0,s.createElement)(DS,a({},e,{popoverProps:{variant:"toolbar",...e.popoverProps},toggleProps:t})))):(0,s.createElement)(DS,e)}));const ML={columns:e=>Uf("grid-template-columns:",`repeat( ${e}, minmax(0, 1fr) )`,";",""),spacing:Uf("column-gap:",Xm(2),";row-gap:",Xm(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},PL={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},OL=Uf(ML.item.fullWidth," gap:",Xm(2),";.components-dropdown-menu{margin:",Xm(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",Xm(6),";}",""),DL={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},AL=Uf(ML.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",xv,"{margin-bottom:0;",_v,":last-child{margin-bottom:0;}}",Sv,"{margin-bottom:0;}&& ",Kh,"{label{line-height:1.4em;}}",""),LL={name:"eivff4",styles:"display:none"},zL={name:"16gsvie",styles:"min-width:200px"},BL=Qu("span",{target:"ews648u0"})("color:",Tp.ui.themeDark10,";font-size:11px;font-weight:500;line-height:1.4;",Fh({marginLeft:Xm(3)})," text-transform:uppercase;"),FL=Uf("color:",Tp.gray[900],";&&[aria-disabled='true']{color:",Tp.gray[700],";opacity:1;&:hover{color:",Tp.gray[700],";}",BL,"{opacity:0.3;}}",""),VL=()=>{},HL=(0,s.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:VL,deregisterPanelItem:VL,flagItemCustomization:VL,areAllOptionalControlsHidden:!0}),jL=()=>(0,s.useContext)(HL);const $L=e=>{let{itemClassName:t,items:n,toggleItem:r}=e;if(!n.length)return null;const o=(0,s.createElement)(BL,{"aria-hidden":!0},(0,u.__)("Reset"));return(0,s.createElement)(lO,{label:(0,u.__)("Defaults")},n.map((e=>{let[n,i]=e;return i?(0,s.createElement)(cO,{key:n,className:t,role:"menuitem",label:(0,u.sprintf)((0,u.__)("Reset %s"),n),onClick:()=>{r(n),(0,ub.speak)((0,u.sprintf)((0,u.__)("%s reset to default"),n),"assertive")},suffix:o},n):(0,s.createElement)(cO,{key:n,className:t,role:"menuitemcheckbox",isSelected:!0,"aria-disabled":!0},n)})))},WL=e=>{let{items:t,toggleItem:n}=e;return t.length?(0,s.createElement)(lO,{label:(0,u.__)("Tools")},t.map((e=>{let[t,r]=e;const o=r?(0,u.sprintf)((0,u.__)("Hide and reset %s"),t):(0,u.sprintf)((0,u.__)("Show %s"),t);return(0,s.createElement)(cO,{key:t,icon:r&&H_,isSelected:r,label:o,onClick:()=>{r?(0,ub.speak)((0,u.sprintf)((0,u.__)("%s hidden and reset to default"),t),"assertive"):(0,ub.speak)((0,u.sprintf)((0,u.__)("%s is now visible"),t),"assertive"),n(t)},role:"menuitemcheckbox"},t)}))):null};var UL=ju(((e,t)=>{const{areAllOptionalControlsHidden:n,defaultControlsItemClassName:r,dropdownMenuClassName:o,hasMenuItems:i,headingClassName:l,label:c,menuItems:d,resetAll:f,toggleItem:p,...m}=function(e){const{className:t,...n}=Hu(e,"ToolsPanelHeader"),r=Vu(),o=(0,s.useMemo)((()=>r(OL,t)),[t,r]),i=(0,s.useMemo)((()=>r(zL)),[r]),a=(0,s.useMemo)((()=>r(DL)),[r]),l=(0,s.useMemo)((()=>r(FL)),[r]),{menuItems:c,hasMenuItems:u,areAllOptionalControlsHidden:d}=jL();return{...n,areAllOptionalControlsHidden:d,defaultControlsItemClassName:l,dropdownMenuClassName:i,hasMenuItems:u,headingClassName:a,menuItems:c,className:o}}(e);if(!c)return null;const h=Object.entries((null==d?void 0:d.default)||{}),g=Object.entries((null==d?void 0:d.optional)||{}),v=n?Um:Mk,b=(0,u.sprintf)((0,u._x)("%s options","Button label to reveal tool panel options"),c),y=n?(0,u.__)("All options are currently hidden"):void 0,w=[...h,...g].some((e=>{let[,t]=e;return t}));return(0,s.createElement)(Yv,a({},m,{ref:t}),(0,s.createElement)(U_,{level:2,className:l},c),i&&(0,s.createElement)(DS,{icon:v,label:b,menuProps:{className:o},toggleProps:{isSmall:!0,describedBy:y}},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)($L,{items:h,toggleItem:p,itemClassName:r}),(0,s.createElement)(WL,{items:g,toggleItem:p}),(0,s.createElement)(lO,null,(0,s.createElement)(cO,{"aria-disabled":!w,variant:"tertiary",onClick:()=>{w&&(f(),(0,ub.speak)((0,u.__)("All options reset"),"assertive"))}},(0,u.__)("Reset all")))))))}),"ToolsPanelHeader");const GL=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:a,label:s}=e;const l=a?"default":"optional",c=null==r||null===(t=r[l])||void 0===t?void 0:t[s],u=c||i();o[l][s]=!n&&u})),o},YL=e=>e&&0===Object.keys(e).length;function qL(e){const{className:t,resetAll:n,panelId:r,hasInnerWrapper:o,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l,...c}=Hu(e,"ToolsPanel"),u=(0,s.useRef)(!1),d=u.current;(0,s.useEffect)((()=>{d&&(u.current=!1)}),[d]);const[f,p]=(0,s.useState)([]),m=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))}),[p]),h=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))}),[p]),[g,v]=(0,s.useState)({default:{},optional:{}});(0,s.useEffect)((()=>{v((e=>GL({panelItems:f,shouldReset:!1,currentMenuItems:e})))}),[f,v]);const b=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";v((n=>({...n,[t]:{...n[t],[e]:!0}})))}),[v]),[y,w]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(YL(null==g?void 0:g.default)&&!YL(null==g?void 0:g.optional)){const e=!Object.entries(g.optional).some((e=>{let[,t]=e;return t}));w(e)}}),[g,w]);const x=Vu(),_=(0,s.useMemo)((()=>{const e=o&&Uf(">div:not( :first-of-type ){display:grid;",ML.columns(2)," ",ML.spacing," ",ML.item.fullWidth,";}","");const n=YL(null==g?void 0:g.default)&&y&&PL;return x((e=>Uf(ML.columns(e)," ",ML.spacing," border-top:",hh.borderWidth," solid ",Tp.gray[300],";margin-top:-1px;padding:",Xm(4),";",""))(2),e,n,t)}),[y,t,x,o,g]),E=(0,s.useCallback)((e=>{const t=f.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...g,[n]:{...g[n],[e]:!g[n][e]}};v(r)}),[g,f,v]),C=(0,s.useCallback)((()=>{if("function"==typeof n){u.current=!0;const e=[];f.forEach((t=>{t.resetAllFilter&&e.push(t.resetAllFilter)})),n(e)}const e=GL({panelItems:f,shouldReset:!0});v(e)}),[f,n,v]),k=e=>{const t=g.optional||{},n=e.find((e=>e.isShownByDefault||!!t[e.label]));return null==n?void 0:n.label},S=k(f),T=k([...f].reverse());return{...c,panelContext:(0,s.useMemo)((()=>({areAllOptionalControlsHidden:y,deregisterPanelItem:h,firstDisplayedItem:S,flagItemCustomization:b,hasMenuItems:!!f.length,isResetting:u.current,lastDisplayedItem:T,menuItems:g,panelId:r,registerPanelItem:m,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l})),[y,h,S,b,T,g,r,f,m,i,a,l]),resetAllItems:C,toggleItem:E,className:_}}var KL=ju(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:l,...c}=qL(e);return(0,s.createElement)(EE,a({},c,{columns:2,ref:t}),(0,s.createElement)(HL.Provider,{value:o},(0,s.createElement)(UL,{label:r,resetAll:i,toggleItem:l}),n))}),"ToolsPanel");var XL=ju(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n,r;const{className:o,hasValue:i,isShownByDefault:a,label:l,panelId:c,resetAllFilter:u,onDeselect:f,onSelect:p,...m}=Hu(e,"ToolsPanelItem"),{panelId:h,menuItems:g,registerPanelItem:v,deregisterPanelItem:b,flagItemCustomization:y,isResetting:w,shouldRenderPlaceholderItems:x,firstDisplayedItem:_,lastDisplayedItem:E,__experimentalFirstVisibleItemClass:C,__experimentalLastVisibleItemClass:k}=jL(),S=(0,s.useCallback)(i,[c,i]),T=(0,s.useCallback)(u,[c,u]),N=(0,d.usePrevious)(h),R=h===c||null===h;(0,s.useEffect)((()=>(R&&null!==N&&v({hasValue:S,isShownByDefault:a,label:l,resetAllFilter:T,panelId:c}),()=>{(null===N&&h||h===c)&&b(l)})),[h,R,a,l,S,c,N,T,v,b]);const I=a?"default":"optional",M=null==g||null===(t=g[I])||void 0===t?void 0:t[l],P=(0,d.usePrevious)(M),O=void 0!==(null==g||null===(n=g[I])||void 0===n?void 0:n[l]),D=i(),A=(0,d.usePrevious)(D),L=D&&!A;(0,s.useEffect)((()=>{L&&(a||null===h)&&y(l,I)}),[h,L,a,I,l,y]),(0,s.useEffect)((()=>{O&&!w&&R&&(!M||D||P||null==p||p(),!M&&P&&(null==f||f()))}),[R,M,O,w,D,P,p,f]);const z=a?void 0!==(null==g||null===(r=g[I])||void 0===r?void 0:r[l]):M,B=Vu(),F=(0,s.useMemo)((()=>B(AL,x&&!z&&LL,o,_===l&&C,E===l&&k)),[z,x,o,B,_,E,C,k,l]);return{...m,isShown:z,shouldRenderPlaceholder:x,className:F}}(e);return r?(0,s.createElement)(td,a({},i,{ref:t}),n):o?(0,s.createElement)(td,a({},i,{ref:t})):null}),"ToolsPanelItem"),ZL=window.wp.keycodes;const JL=(0,s.createContext)(),QL=JL.Provider;function ez(e){let{children:t}=e;const[n,r]=(0,s.useState)(),o=(0,s.useMemo)((()=>({lastFocusedElement:n,setLastFocusedElement:r})),[n]);return(0,s.createElement)(QL,{value:o},t)}function tz(e){const t=kS.focus.focusable.find(e,{sequential:!0});if(t&&t.length)return t.filter((t=>t.closest('[role="row"]')===e))}var nz=(0,s.forwardRef)((function(e,t){let{children:n,onExpandRow:r=(()=>{}),onCollapseRow:o=(()=>{}),onFocusRow:i=(()=>{}),applicationAriaLabel:l,...c}=e;const u=(0,s.useCallback)((e=>{const{keyCode:t,metaKey:n,ctrlKey:a,altKey:s}=e;if(n||a||s||![ZL.UP,ZL.DOWN,ZL.LEFT,ZL.RIGHT,ZL.HOME,ZL.END].includes(t))return;e.stopPropagation();const{activeElement:l}=document,{currentTarget:c}=e;if(!c.contains(l))return;const u=l.closest('[role="row"]'),d=tz(u),f=d.indexOf(l),p=0===f,m=p&&"false"===u.getAttribute("aria-expanded")&&t===ZL.RIGHT;if([ZL.LEFT,ZL.RIGHT].includes(t)){let n;if(n=t===ZL.LEFT?Math.max(0,f-1):Math.min(f+1,d.length-1),p){if(t===ZL.LEFT){var h,g,v;if("true"===u.getAttribute("aria-expanded"))return o(u),void e.preventDefault();const t=Math.max(parseInt(null!==(h=null==u?void 0:u.getAttribute("aria-level"))&&void 0!==h?h:1,10)-1,1),n=Array.from(c.querySelectorAll('[role="row"]'));let r=u;for(let e=n.indexOf(u);e>=0;e--)if(parseInt(n[e].getAttribute("aria-level"),10)===t){r=n[e];break}null===(g=tz(r))||void 0===g||null===(v=g[0])||void 0===v||v.focus()}if(t===ZL.RIGHT){if("false"===u.getAttribute("aria-expanded"))return r(u),void e.preventDefault();const t=tz(u);var b;if(t.length>0)null===(b=t[n])||void 0===b||b.focus()}return void e.preventDefault()}if(m)return;d[n].focus(),e.preventDefault()}else if([ZL.UP,ZL.DOWN].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(u);let o;if(o=t===ZL.UP?Math.max(0,r-1):Math.min(r+1,n.length-1),o===r)return void e.preventDefault();const a=tz(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(f,a.length-1)].focus(),i(e,u,n[o]),e.preventDefault()}else if([ZL.HOME,ZL.END].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(u);let o;if(o=t===ZL.HOME?0:n.length-1,o===r)return void e.preventDefault();const a=tz(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(f,a.length-1)].focus(),i(e,u,n[o]),e.preventDefault()}}),[r,o,i]);return(0,s.createElement)(ez,null,(0,s.createElement)("div",{role:"application","aria-label":l},(0,s.createElement)("table",a({},c,{role:"treegrid",onKeyDown:u,ref:t}),(0,s.createElement)("tbody",null,n))))}));var rz=(0,s.forwardRef)((function(e,t){let{children:n,level:r,positionInSet:o,setSize:i,isExpanded:l,...c}=e;return(0,s.createElement)("tr",a({},c,{ref:t,role:"row","aria-level":r,"aria-posinset":o,"aria-setsize":i,"aria-expanded":l}),n)})),oz=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useRef)(),a=t||i,{lastFocusedElement:l,setLastFocusedElement:c}=(0,s.useContext)(JL);let u;l&&(u=l===a.current?0:-1);const d={ref:a,tabIndex:u,onFocus:e=>c(e.target),...o};return"function"==typeof n?n(d):(0,s.createElement)(r,d,n)})),iz=(0,s.forwardRef)((function(e,t){let{children:n,...r}=e;return(0,s.createElement)(oz,a({ref:t},r),n)})),az=(0,s.forwardRef)((function(e,t){let{children:n,withoutGridItem:r=!1,...o}=e;return(0,s.createElement)("td",a({},o,{role:"gridcell"}),r?n:(0,s.createElement)(iz,{ref:t},n))}));function sz(e){e.stopPropagation()}var lz=(0,s.forwardRef)(((e,t)=>(Kl()("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,s.createElement)("div",a({},e,{ref:t,onMouseDown:sz})))));function cz(e){return Bd((0,s.useContext)(Vd).fills,{sync:!0}).get(e)}const uz=Qu("div",{target:"ebn2ljm1"})({name:"5ob2ly",styles:"display:flex;position:relative"}),dz=Qu("div",{target:"ebn2ljm0"})((e=>{let{isLayered:t,offsetAmount:n}=e;return Uf(t?Fh({marginLeft:n})():Fh({right:-1*n})(),"","")})," ",(e=>{let{isLayered:t}=e;return t?fz:pz})," ",(e=>{let{zIndex:t}=e;return Uf({zIndex:t},"","")}),";"),fz={name:"a4hmbt",styles:"position:absolute"},pz={name:"bjn8wh",styles:"position:relative"};const mz=ju((function(e,t){const{children:n,className:r,isLayered:o=!0,isReversed:i=!1,offset:l=0,...c}=Hu(e,"ZStack"),u=Uv(n),d=u.length-1,f=u.map(((e,t)=>{const n=i?d-t:t,r=l*t,a=(0,s.isValidElement)(e)?e.key:t;return(0,s.createElement)(dz,{isLayered:o,offsetAmount:r,zIndex:n,key:a},e)}));return(0,s.createElement)(uz,a({},c,{className:r,ref:t}),f)}),"ZStack");var hz=mz;const gz={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"ctrlShift",character:"~"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function vz(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gz;const t=(0,s.useRef)(),[n,r]=(0,s.useState)(!1);function o(e){const n=Array.from(t.current.querySelectorAll('[role="region"][tabindex="-1"]'));if(!n.length)return;let o=n[0];const i=n.indexOf(t.current.ownerDocument.activeElement.closest('[role="region"][tabindex="-1"]'));if(-1!==i){let t=i+e;t=-1===t?n.length-1:t,t=t===n.length?0:t,o=n[t]}o.focus(),r(!0)}const i=(0,d.useRefEffect)((e=>{function t(){r(!1)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[r]);return{ref:(0,d.useMergeRefs)([t,i]),className:n?"is-focusing-regions":"",onKeyDown(t){e.previous.some((e=>{let{modifier:n,character:r}=e;return ZL.isKeyboardEvent[n](t,r)}))?o(-1):e.next.some((e=>{let{modifier:n,character:r}=e;return ZL.isKeyboardEvent[n](t,r)}))&&o(1)}}}var bz=(0,d.createHigherOrderComponent)((e=>t=>{let{shortcuts:n,...r}=t;return(0,s.createElement)("div",vz(n),(0,s.createElement)(e,r))}),"navigateRegions");var yz=(0,d.createHigherOrderComponent)((e=>function(t){const n=(0,d.useConstrainedTabbing)();return(0,s.createElement)("div",{ref:n,tabIndex:-1},(0,s.createElement)(e,t))}),"withConstrainedTabbing"),wz=e=>(0,d.createHigherOrderComponent)((t=>class extends s.Component{constructor(){super(...arguments),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:t,fallbackStyles:n}=this.state;if(this.nodeRef&&!t){const t=e(this.nodeRef,this.props);Ql()(t,n)||this.setState({fallbackStyles:t,grabStylesCompleted:Object.values(t).every(Boolean)})}}render(){const e=(0,s.createElement)(t,a({},this.props,this.state.fallbackStyles));return this.props.node?e:(0,s.createElement)("div",{ref:this.bindRef}," ",e," ")}}),"withFallbackStyles"),xz=window.wp.hooks;function _z(e){return(0,d.createHigherOrderComponent)((t=>{const n="core/with-filters/"+e;let r;class o extends s.Component{constructor(){super(...arguments),void 0===r&&(r=(0,xz.applyFilters)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,xz.addAction)("hookRemoved",n,a),(0,xz.addAction)("hookAdded",n,a))}componentWillUnmount(){o.instances=o.instances.filter((e=>e!==this)),0===o.instances.length&&((0,xz.removeAction)("hookRemoved",n),(0,xz.removeAction)("hookAdded",n))}render(){return(0,s.createElement)(r,this.props)}}o.instances=[];const i=(0,d.debounce)((()=>{r=(0,xz.applyFilters)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}var Ez=(0,d.createHigherOrderComponent)((e=>{const t=function(){let{onFocusReturn:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>n=>{const r=(0,d.useFocusReturn)(e);return(0,s.createElement)("div",{ref:r},(0,s.createElement)(t,n))}};if((n=e)instanceof s.Component||"function"==typeof n){const n=e;return t()(n)}var n;return t(e)}),"withFocusReturn");const Cz=e=>{let{children:t}=e;return Kl()("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),t};var kz=(0,d.createHigherOrderComponent)((e=>{function t(t,r){const[o,i]=(0,s.useState)([]),l=(0,s.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:rf()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),c={...t,noticeList:o,noticeOperations:l,noticeUI:o.length>0&&(0,s.createElement)(SD,{className:"components-with-notices-ui",notices:o,onRemove:l.removeNotice})};return n?(0,s.createElement)(e,a({},c,{ref:r})):(0,s.createElement)(e,c)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,s.forwardRef)(t)):t})),Sz=window.wp.privateApis;const{lock:Tz,unlock:Nz}=(0,Sz.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/components"),Rz={};Tz(Rz,{CustomSelectControl:EN,__experimentalPopoverLegacyPositionToPlacement:wf})}(),(window.wp=window.wp||{}).components=r}(); \ No newline at end of file diff --git a/wp-includes/js/dist/experiments.js b/wp-includes/js/dist/experiments.js deleted file mode 100644 index 7c6d9c8779..0000000000 --- a/wp-includes/js/dist/experiments.js +++ /dev/null @@ -1,217 +0,0 @@ -/******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ // The require scope -/******/ var __webpack_require__ = {}; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "__dangerousOptInToUnstableAPIsOnlyForCoreModules": function() { return /* reexport */ __dangerousOptInToUnstableAPIsOnlyForCoreModules; } -}); - -;// CONCATENATED MODULE: ./node_modules/@wordpress/experiments/build-module/implementation.js -/** - * wordpress/experimental – the utilities to enable private cross-package - * exports of experimental APIs. - * - * This "implementation.js" file is needed for the sake of the unit tests. It - * exports more than the public API of the package to aid in testing. - */ - -/** - * The list of core modules allowed to opt-in to the experimental APIs. - */ -const CORE_MODULES_USING_EXPERIMENTS = ['@wordpress/data', '@wordpress/editor', '@wordpress/blocks', '@wordpress/block-editor', '@wordpress/customize-widgets', '@wordpress/edit-site', '@wordpress/edit-post', '@wordpress/edit-widgets', '@wordpress/block-library']; -/** - * A list of core modules that already opted-in to - * the experiments package. - */ - -const registeredExperiments = []; -/* - * Warning for theme and plugin developers. - * - * The use of experimental developer APIs is intended for use by WordPress Core - * and the Gutenberg plugin exclusively. - * - * Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore, - * the WordPress Core philosophy to strive to maintain backward compatibility - * for third-party developers DOES NOT APPLY to experimental APIs. - * - * THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND - * WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A - * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE. - */ - -const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; -const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => { - if (!CORE_MODULES_USING_EXPERIMENTS.includes(moduleName)) { - throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.'); - } - - if (registeredExperiments.includes(moduleName)) { - throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.'); - } - - if (consent !== requiredConsent) { - throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.'); - } - - registeredExperiments.push(moduleName); - return { - lock, - unlock - }; -}; -/** - * Binds private data to an object. - * It does not alter the passed object in any way, only - * registers it in an internal map of private data. - * - * The private data can't be accessed by any other means - * than the `unlock` function. - * - * @example - * ```js - * const object = {}; - * const privateData = { a: 1 }; - * lock( object, privateData ); - * - * object - * // {} - * - * unlock( object ); - * // { a: 1 } - * ``` - * - * @param {Object|Function} object The object to bind the private data to. - * @param {any} privateData The private data to bind to the object. - */ - -function lock(object, privateData) { - if (!object) { - throw new Error('Cannot lock an undefined object.'); - } - - if (!(__experiment in object)) { - object[__experiment] = {}; - } - - lockedData.set(object[__experiment], privateData); -} -/** - * Unlocks the private data bound to an object. - * - * It does not alter the passed object in any way, only - * returns the private data paired with it using the `lock()` - * function. - * - * @example - * ```js - * const object = {}; - * const privateData = { a: 1 }; - * lock( object, privateData ); - * - * object - * // {} - * - * unlock( object ); - * // { a: 1 } - * ``` - * - * @param {any} object The object to unlock the private data from. - * @return {any} The private data bound to the object. - */ - - -function unlock(object) { - if (!object) { - throw new Error('Cannot unlock an undefined object.'); - } - - if (!(__experiment in object)) { - throw new Error('Cannot unlock an object that was not locked before. '); - } - - return lockedData.get(object[__experiment]); -} - -const lockedData = new WeakMap(); -/** - * Used by lock() and unlock() to uniquely identify the private data - * related to a containing object. - */ - -const __experiment = Symbol('Experiment ID'); // Unit tests utilities: - -/** - * Private function to allow the unit tests to allow - * a mock module to access the experimental APIs. - * - * @param {string} name The name of the module. - */ - - -function allowCoreModule(name) { - CORE_MODULES_USING_EXPERIMENTS.push(name); -} -/** - * Private function to allow the unit tests to set - * a custom list of allowed modules. - */ - -function resetAllowedCoreModules() { - while (CORE_MODULES_USING_EXPERIMENTS.length) { - CORE_MODULES_USING_EXPERIMENTS.pop(); - } -} -/** - * Private function to allow the unit tests to reset - * the list of registered experiments. - */ - -function resetRegisteredExperiments() { - while (registeredExperiments.length) { - registeredExperiments.pop(); - } -} - -;// CONCATENATED MODULE: ./node_modules/@wordpress/experiments/build-module/index.js - - -(window.wp = window.wp || {}).experiments = __webpack_exports__; -/******/ })() -; \ No newline at end of file diff --git a/wp-includes/js/dist/experiments.min.js b/wp-includes/js/dist/experiments.min.js deleted file mode 100644 index 7d60e1fdd6..0000000000 --- a/wp-includes/js/dist/experiments.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! This file is auto-generated */ -!function(){"use strict";var e={d:function(o,r){for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{__dangerousOptInToUnstableAPIsOnlyForCoreModules:function(){return n}});const r=["@wordpress/data","@wordpress/editor","@wordpress/blocks","@wordpress/block-editor","@wordpress/customize-widgets","@wordpress/edit-site","@wordpress/edit-post","@wordpress/edit-widgets","@wordpress/block-library"],t=[],n=(e,o)=>{if(!r.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(t.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release."!==e)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return t.push(o),{lock:s,unlock:i}};function s(e,o){if(!e)throw new Error("Cannot lock an undefined object.");d in e||(e[d]={}),a.set(e[d],o)}function i(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(d in e))throw new Error("Cannot unlock an object that was not locked before. ");return a.get(e[d])}const a=new WeakMap,d=Symbol("Experiment ID");(window.wp=window.wp||{}).experiments=o}(); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 1b947a5537..bbbdd43b67 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta2-55365'; +$wp_version = '6.2-beta2-55366'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.