diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php index c19e1d3a50..2fb330ba5c 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-blob', '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' => '43e40e04f77d598ede94'), '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' => 'b631508caf67c44285c4'), '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' => 'db4d7166612dd5d7c55f'), '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' => '9aa404c724aba5c98810'), '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' => '7d5916e3b2ef0ea01400'), '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' => 'dea2a7e8125ca5342671'), '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' => 'd098b8ee5bdffa238c03'), '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' => 'fcf81e803ab1af60d4f8'), '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' => 'd683d5fc75e655fdf974'), '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' => '1fb5fcf129627da4939e'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b3bda690cfc516378771'), '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' => '6ba78be26d660b6af113'), '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' => '9307ec04c67d79b6e813'), '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' => '040ac8be5e0cfc4b52df'), '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-blob', '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' => '7e87c7eac7ce74210f6b'), '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' => 'cb9908eec52e0738fb8b'), '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' => 'db4d7166612dd5d7c55f'), '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' => '1cc3f22544ddc4f33398'), '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' => '7d5916e3b2ef0ea01400'), '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' => 'd349266a512043b44d45'), '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' => 'bea61b540e751202b72b'), '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' => 'b49d8d73e4d1439f54c6'), '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' => '979fbbc4193328107591'), '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' => '812e218289a72978cf08'), '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' => 'a449dc89cfd5d1992ccf'), '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' => 'b8f865aaa9ea6fb409a4'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b3bda690cfc516378771'), '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' => '6ba78be26d660b6af113'), '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' => '0d09a26d73a3168867f7'), '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' => 'bc3e989c53f7707d8c31'), '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' => '9307ec04c67d79b6e813'), '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' => 'ab0988b60557e62d52b1'), '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 5ac43180fb..2f9a37d245 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-blob', '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' => '9cab0a54be77c672ab85'), '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' => '9510d2703445be55a009'), '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' => '6691fd6bf3441568cfb5'), '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' => 'e0820cedc2b55b686c54'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '931b797529818d5ec638'), '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' => '5aeb436c03a123765948'), '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' => 'ba790c72fd5d464293ef'), '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' => '8d52dae6937ea57c9af0'), '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' => '8de599fa2b9fa2fbef7a'), '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' => 'ccf0538dc0da3fd9fbe5'), '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' => 'ac54f934b6984e6a5eee'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '0cad38f6457224436f2c'), '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' => '1f2da3834fe510c12e67'), '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' => '3a2ed21adf680fa0a881'), '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' => '61dd42dc2aa437d40f2b'), '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-blob', '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' => '656a37f6e5e88863405a'), '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' => 'd4b4469173b25871a6db'), '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' => '6691fd6bf3441568cfb5'), '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' => '66181ec0b40a7b6cfae7'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '931b797529818d5ec638'), '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' => '0d5e999c633b18150b49'), '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' => 'e20538c005aae6958a33'), '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' => '979f2f6cd48deabfe6fc'), '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' => '81bed7a8a7e5c0f06863'), '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' => '8f9fe72ec7e6422ffb61'), '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' => 'd95b48d7df6f8d365aad'), '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' => '1dceeacb1da222dd0c7c'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '0cad38f6457224436f2c'), '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' => '1f2da3834fe510c12e67'), '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' => '1ea1a5ed229b34eccaa0'), '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' => '726e7becac7ccbe45a51'), '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' => '3a2ed21adf680fa0a881'), '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' => 'a2e3a11191d864ad6f2c'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); diff --git a/wp-includes/blocks/avatar.php b/wp-includes/blocks/avatar.php index 25f3ad88dc..2c2f2d233c 100644 --- a/wp-includes/blocks/avatar.php +++ b/wp-includes/blocks/avatar.php @@ -97,7 +97,7 @@ function render_block_core_avatar( $attributes, $content, $block ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Author name. - $label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"'; + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"'; } // translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '%4$s', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); @@ -124,7 +124,7 @@ function render_block_core_avatar( $attributes, $content, $block ) { $label = ''; if ( '_blank' === $attributes['linkTarget'] ) { // translators: %s is the Comment Author name. - $label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"'; + $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"'; } // translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image. $avatar_block = sprintf( '%4$s', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block ); diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 36da330e1d..b2e7e307ed 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -1,6 +1,637 @@ /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ 480: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(5304); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = __webpack_require__(4602); + +/** @type {import('.')} */ +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property + + +/***/ }), + +/***/ 5304: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3803); + +var callBind = __webpack_require__(6427); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 6427: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7870); +var GetIntrinsic = __webpack_require__(3803); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 3303: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7870: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3303); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3803: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8040)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7870); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8040: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9063); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9063: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + /***/ 6411: /***/ (function(module, exports) { @@ -288,72 +919,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ module.exports = exports['default']; }); -/***/ }), - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - var nativeCodeString = '[native code]'; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - classes.push(arg.toString()); - continue; - } - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - /***/ }), /***/ 4827: @@ -388,6 +953,70 @@ var computedStyle = function (el, prop, getComputedStyle) { module.exports = computedStyle; +/***/ }), + +/***/ 2656: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var gopd = __webpack_require__(3828); + +/** @type {import('.')} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + + /***/ }), /***/ 1198: @@ -1336,6 +1965,772 @@ module.exports = _extends({ viewportHeight: 0 }, domUtils); +/***/ }), + +/***/ 8918: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(292); + +/** @type {import('.')} */ +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 3592: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5903: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3592); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 292: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(4482)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5903); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 4482: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(7457); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 7457: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6788: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 6716: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 9204: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 9908: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 6724: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 1642: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 1451: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 7998: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +/** @type {import('./RequireObjectCoercible')} */ +module.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); + } + return value; +}; + + +/***/ }), + +/***/ 5249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = __webpack_require__(3777); +var isCallable = __webpack_require__(5443); +var isDate = __webpack_require__(8659); +var isSymbol = __webpack_require__(3082); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; + + +/***/ }), + +/***/ 3777: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + /***/ }), /***/ 5619: @@ -1416,6 +2811,954 @@ module.exports = function equal(a, b) { }; +/***/ }), + +/***/ 4843: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isCallable = __webpack_require__(5443); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; + + +/***/ }), + +/***/ 3828: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(2473); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 8819: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8729: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(8819); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 2473: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5810)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8729); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5810: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1759); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1759: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8198: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 1856: +/***/ (function(module) { + +"use strict"; + + +var test = { + __proto__: null, + foo: {} +}; + +var $Object = Object; + +/** @type {import('.')} */ +module.exports = function hasProto() { + // @ts-expect-error: TS errors on an inherited property for some reason + return { __proto__: test }.foo === test.foo + && !(test instanceof $Object); +}; + + +/***/ }), + +/***/ 9905: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = __webpack_require__.g.Symbol; +var hasSymbolSham = __webpack_require__(5682); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5682: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 81: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4111: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__(81); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 9429: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __webpack_require__(766); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 2075: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 766: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2075); + +module.exports = Function.prototype.bind || implementation; + + /***/ }), /***/ 8575: @@ -1450,6 +3793,1471 @@ if (typeof Object.create === 'function') { } +/***/ }), + +/***/ 4602: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(4374); +var callBound = __webpack_require__(7442); +var GetIntrinsic = __webpack_require__(3767); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); +/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */ +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); +var $toString = callBound('Object.prototype.toString'); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; +var $abSlice = !!abSlice && callBind(abSlice); + +/** @type {import('.')} */ +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + // @ts-expect-error no idea why TS can't handle the overload + $byteLength(obj); + } else { + // @ts-expect-error TS chooses not to type-narrow inside a closure + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $ArrayBuffer + // in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag + ? function isArrayBuffer(obj) { + return $toString(obj) === '[object ArrayBuffer]'; + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 7442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3767); + +var callBind = __webpack_require__(4374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7410); +var GetIntrinsic = __webpack_require__(3767); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1818: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7410: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1818); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3767: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6945)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7410); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6945: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6992); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6992: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5443: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = reflectApply + ? function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value); + } + : function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + + +/***/ }), + +/***/ 8659: +/***/ (function(module) { + +"use strict"; + + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; + + +/***/ }), + +/***/ 5604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(6131); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +/** @type {import('.')} */ +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 6131: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(6254); + +var callBind = __webpack_require__(7679); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 7679: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(578); +var GetIntrinsic = __webpack_require__(6254); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 901: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 578: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(901); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 6254: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(2665)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(578); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 2665: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(2408); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 2408: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 3082: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var hasSymbols = __webpack_require__(9905)(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && 0; + }; +} + + +/***/ }), + +/***/ 2527: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); + +/** @type {import('.')} */ +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; + + /***/ }), /***/ 9894: @@ -2162,6 +5970,225 @@ normalizeWheel.getEventType = function() /*string*/ { module.exports = normalizeWheel; +/***/ }), + +/***/ 8383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = __webpack_require__(4418); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + + +/***/ }), + +/***/ 806: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var slice = Array.prototype.slice; +var isArgs = __webpack_require__(4418); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8383); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + + +/***/ }), + +/***/ 4418: +/***/ (function(module) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), + +/***/ 131: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + + /***/ }), /***/ 5372: @@ -2856,12 +6883,2753 @@ module.exports.remove = removeAccents; /***/ }), -/***/ 3124: +/***/ 3002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = __webpack_require__(9386); + +var callBound = __webpack_require__(3315); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = __webpack_require__(1489)(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +/** @type {never[]} */ var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + +// eslint-disable-next-line no-extra-parens +var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (__webpack_require__(9277)) : null; + +/** @type {import('.')} */ +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + /** @type {typeof item} */ var arg = arguments[i]; + // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + if (!empty[isConcatSpreadable]) { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + empty[isConcatSpreadable] = true; + } + // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null + var arr = isArray(arg) ? $slice(arg) : [arg]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object + return $concatApply(arguments); + } + : callBind($concat, empty); + + +/***/ }), + +/***/ 3315: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); + +var callBind = __webpack_require__(9386); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 9386: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(5127); +var GetIntrinsic = __webpack_require__(8024); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6850: /***/ (function(module) { "use strict"; +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5127: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(6850); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8024: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(330)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5127); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 330: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1489); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1489: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 9277: +/***/ (function(module) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ 1312: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var isRegex = __webpack_require__(6073); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = __webpack_require__(1642); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; + + +/***/ }), + +/***/ 2137: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5273); + +var callBind = __webpack_require__(381); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 381: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3331); +var GetIntrinsic = __webpack_require__(5273); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7780: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3331: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7780); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5273: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6339)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3331); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6789); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6789: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var hasToStringTag = __webpack_require__(4111)(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; + + +/***/ }), + +/***/ 4521: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1757); +var define = __webpack_require__(2656); +var hasDescriptors = __webpack_require__(8198)(); +var gOPD = __webpack_require__(3828); + +var $TypeError = __webpack_require__(1642); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; + + +/***/ }), + +/***/ 5371: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 9015: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(5371); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1757: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(1207)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(9015); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 1207: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(2326); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 2326: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5467: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var RequireObjectCoercible = __webpack_require__(7998); +var ToString = __webpack_require__(6245); +var callBound = __webpack_require__(6907); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; + + +/***/ }), + +/***/ 4113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(7618); +var define = __webpack_require__(5213); +var RequireObjectCoercible = __webpack_require__(7998); + +var implementation = __webpack_require__(5467); +var getPolyfill = __webpack_require__(5626); +var shim = __webpack_require__(1029); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; + + +/***/ }), + +/***/ 6907: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5037); + +var callBind = __webpack_require__(7618); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 7618: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1769); +var GetIntrinsic = __webpack_require__(5037); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 5213: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(806); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = __webpack_require__(2656); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = __webpack_require__(8198)(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 1032: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1769: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1032); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5037: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5570)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1769); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5570: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(5889); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5889: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5626: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(5467); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; + + +/***/ }), + +/***/ 1029: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(5213); +var getPolyfill = __webpack_require__(5626); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ 3124: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); +var taSlice = __webpack_require__(1140); +var gopd = __webpack_require__(3828); + // TODO: use call-bind, is-date, is-regex, is-string, is-boolean-object, is-number-object function toS(obj) { return Object.prototype.toString.call(obj); } function isDate(obj) { return toS(obj) === '[object Date]'; } @@ -2892,12 +9660,39 @@ var objectKeys = Object.keys || function keys(obj) { return res; }; +var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; // eslint-disable-line id-length + +// TODO: use reflect.ownkeys and filter out non-enumerables +function ownEnumerableKeys(obj) { + var res = objectKeys(obj); + + // Include enumerable symbol properties. + if (getOwnPropertySymbols) { + var symbols = getOwnPropertySymbols(obj); + for (var i = 0; i < symbols.length; i++) { + if (propertyIsEnumerable.call(obj, symbols[i])) { + res.push(symbols[i]); + } + } + } + return res; +} + // TODO: use object.hasown var hasOwnProperty = Object.prototype.hasOwnProperty || function (obj, key) { return key in obj; }; -function copy(src) { +function isWritable(object, key) { + if (typeof gopd !== 'function') { + return true; + } + + return !gopd(object, key).writable; +} + +function copy(src, options) { if (typeof src === 'object' && src !== null) { var dst; @@ -2911,20 +9706,26 @@ function copy(src) { dst = { message: src.message }; } else if (isBoolean(src) || isNumber(src) || isString(src)) { dst = Object(src); - } else if (Object.create && Object.getPrototypeOf) { - dst = Object.create(Object.getPrototypeOf(src)); - } else if (src.constructor === Object) { - dst = {}; } else { - var proto = (src.constructor && src.constructor.prototype) - || src.__proto__ - || {}; - var T = function T() {}; // eslint-disable-line func-style, func-name-matching - T.prototype = proto; - dst = new T(); + var ta = whichTypedArray(src); + if (ta) { + return taSlice(src); + } else if (Object.create && Object.getPrototypeOf) { + dst = Object.create(Object.getPrototypeOf(src)); + } else if (src.constructor === Object) { + dst = {}; + } else { + var proto = (src.constructor && src.constructor.prototype) + || src.__proto__ + || {}; + var T = function T() {}; // eslint-disable-line func-style, func-name-matching + T.prototype = proto; + dst = new T(); + } } - forEach(objectKeys(src), function (key) { + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { dst[key] = src[key]; }); return dst; @@ -2932,13 +9733,19 @@ function copy(src) { return src; } -function walk(root, cb, immutable) { +/** @type {TraverseOptions} */ +var emptyNull = { __proto__: null }; + +function walk(root, cb) { var path = []; var parents = []; var alive = true; + var options = arguments.length > 2 ? arguments[2] : emptyNull; + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + var immutable = !!options.immutable; return (function walker(node_) { - var node = immutable ? copy(node_) : node_; + var node = immutable ? copy(node_, options) : node_; var modifiers = {}; var keepGoing = true; @@ -2986,7 +9793,7 @@ function walk(root, cb, immutable) { function updateState() { if (typeof state.node === 'object' && state.node !== null) { if (!state.keys || state.node_ !== state.node) { - state.keys = objectKeys(state.node); + state.keys = iteratorFunction(state.node); } state.isLeaf = state.keys.length === 0; @@ -3031,7 +9838,11 @@ function walk(root, cb, immutable) { if (modifiers.pre) { modifiers.pre.call(state, state.node[key], key); } var child = walker(state.node[key]); - if (immutable && hasOwnProperty.call(state.node, key)) { + if ( + immutable + && hasOwnProperty.call(state.node, key) + && !isWritable(state.node, key) + ) { state.node[key] = child.node; } @@ -3051,15 +9862,29 @@ function walk(root, cb, immutable) { }(root)).node; } +/** @typedef {{ immutable?: boolean, includeSymbols?: boolean }} TraverseOptions */ + +/** + * A traverse constructor + * @param {object} obj - the object to traverse + * @param {TraverseOptions | undefined} [options] - options for the traverse + * @constructor + */ function Traverse(obj) { + /** @type {TraverseOptions} */ + this.options = arguments.length > 1 ? arguments[1] : emptyNull; this.value = obj; } +/** @type {(ps: PropertyKey[]) => Traverse['value']} */ Traverse.prototype.get = function (ps) { var node = this.value; - for (var i = 0; i < ps.length; i++) { + for (var i = 0; node && i < ps.length; i++) { var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { + if ( + !hasOwnProperty.call(node, key) + || (!this.options.includeSymbols && typeof key === 'symbol') + ) { return void undefined; } node = node[key]; @@ -3067,11 +9892,12 @@ Traverse.prototype.get = function (ps) { return node; }; +/** @type {(ps: PropertyKey[]) => boolean} */ Traverse.prototype.has = function (ps) { var node = this.value; - for (var i = 0; i < ps.length; i++) { + for (var i = 0; node && i < ps.length; i++) { var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { + if (!hasOwnProperty.call(node, key) || (!this.options.includeSymbols && typeof key === 'symbol')) { return false; } node = node[key]; @@ -3091,11 +9917,11 @@ Traverse.prototype.set = function (ps, value) { }; Traverse.prototype.map = function (cb) { - return walk(this.value, cb, true); + return walk(this.value, cb, { __proto__: null, immutable: true, includeSymbols: !!this.options.includeSymbols }); }; Traverse.prototype.forEach = function (cb) { - this.value = walk(this.value, cb, false); + this.value = walk(this.value, cb, this.options); return this.value; }; @@ -3129,6 +9955,11 @@ Traverse.prototype.nodes = function () { Traverse.prototype.clone = function () { var parents = []; var nodes = []; + var options = this.options; + + if (whichTypedArray(this.value)) { + return taSlice(this.value); + } return (function clone(src) { for (var i = 0; i < parents.length; i++) { @@ -3138,12 +9969,13 @@ Traverse.prototype.clone = function () { } if (typeof src === 'object' && src !== null) { - var dst = copy(src); + var dst = copy(src, options); parents.push(src); nodes.push(dst); - forEach(objectKeys(src), function (key) { + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { dst[key] = clone(src[key]); }); @@ -3157,12 +9989,14 @@ Traverse.prototype.clone = function () { }(this.value)); }; +/** @type {(obj: object, options?: TraverseOptions) => Traverse} */ function traverse(obj) { - return new Traverse(obj); + var options = arguments.length > 1 ? arguments[1] : emptyNull; + return new Traverse(obj, options); } // TODO: replace with object.assign? -forEach(objectKeys(Traverse.prototype), function (key) { +forEach(ownEnumerableKeys(Traverse.prototype), function (key) { traverse[key] = function (obj) { var args = [].slice.call(arguments, 1); var t = new Traverse(obj); @@ -3173,6 +10007,4193 @@ forEach(objectKeys(Traverse.prototype), function (key) { module.exports = traverse; +/***/ }), + +/***/ 6740: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(6798); + +var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true); + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +module.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError('Not a Typed Array'); + } + return x.buffer; +}; + + +/***/ }), + +/***/ 6798: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1634); + +var callBind = __webpack_require__(8388); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8388: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7715); +var GetIntrinsic = __webpack_require__(1634); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 9003: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7715: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(9003); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1634: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(263)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7715); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 263: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9184); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9184: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 7046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var callBind = __webpack_require__(2526); + +var typedArrays = __webpack_require__(4343)(); + +/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */ +/** @typedef {(x: TypedArray) => number} ByteOffsetGetter */ + +/** @type {Object.} */ +var getters = {}; +var hasProto = __webpack_require__(1856)(); + +var gOPD = __webpack_require__(3828); +var oDP = Object.defineProperty; +if (gOPD) { + /** @type {ByteOffsetGetter} */ + var getByteOffset = function (x) { + return x.byteOffset; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof __webpack_require__.g[typedArray] === 'function' || typeof __webpack_require__.g[typedArray] === 'object') { + var Proto = __webpack_require__.g[typedArray].prototype; + // @ts-expect-error TS can't guarantee the callback is invoked sync + var descriptor = gOPD(Proto, 'byteOffset'); + if (!descriptor && hasProto) { + // @ts-expect-error hush, TS, every object has a dunder proto + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(superProto, 'byteOffset'); + } + // Opera 12.16 has a magic byteOffset data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteOffset data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(arr, 'byteOffset'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); +} + +/** @type {ByteOffsetGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundOffset; + forEach(getters, /** @type {(getter: ByteOffsetGetter) => void} */ function (getter) { + if (typeof foundOffset !== 'number') { + try { + var offset = getter(value); + if (typeof offset === 'number') { + foundOffset = offset; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the callback is invoked sync + return foundOffset; +}; + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +module.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 2526: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1530); +var GetIntrinsic = __webpack_require__(3699); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1609: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1530: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1609); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3699: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5162)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1530); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5162: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(3903); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 3903: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8150: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// / + +var callBind = __webpack_require__(4888); +var forEach = __webpack_require__(4843); +var gOPD = __webpack_require__(3828); +var hasProto = __webpack_require__(1856)(); +var isTypedArray = __webpack_require__(2527); +var typedArrays = __webpack_require__(131); + +/** @typedef {(value: import('.').TypedArray) => number} TypedArrayLengthGetter */ +/** @typedef {{ [k in `$${import('.').TypedArrayName}` | '__proto__']: k extends '__proto__' ? null : TypedArrayLengthGetter }} Cache */ + +/** @type {Cache} */ +// @ts-expect-error TS doesn't seem to have a "will eventually satisfy" type +var getters = { __proto__: null }; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = /** @type {TypedArrayLengthGetter} */ function (x) { + return x.length; + }; + forEach(typedArrays, /** @type {(typedArray: import('.').TypedArrayName) => void} */ function (typedArray) { + var TA = __webpack_require__.g[typedArray]; + // In Safari 7, Typed Array constructors are typeof object + if (typeof TA === 'function' || typeof TA === 'object') { + var Proto = TA.prototype; + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = getLength; + } + } + } + }); +} + +/** @type {TypedArrayLengthGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundLength; + // @ts-expect-error not sure why this won't work + forEach(getters, /** @type {(getter: TypedArrayLengthGetter) => void} */ function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the above callback is invoked sync + return foundLength; +}; + +/** @type {import('.')} */ +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 4888: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3576); +var GetIntrinsic = __webpack_require__(8031); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7380: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3576: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7380); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8031: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(307)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3576); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 307: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1766); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1766: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var Get = __webpack_require__(3675); +var GetValueFromBuffer = __webpack_require__(9661); +var IsDetachedBuffer = __webpack_require__(1320); +var max = __webpack_require__(1367); +var min = __webpack_require__(2967); +var Set = __webpack_require__(8055); +var SetValueInBuffer = __webpack_require__(3383); +var ToIntegerOrInfinity = __webpack_require__(2897); +var ToString = __webpack_require__(7249); +var TypedArrayElementSize = __webpack_require__(9149); +var TypedArrayElementType = __webpack_require__(1586); +var TypedArraySpeciesCreate = __webpack_require__(817); +var ValidateTypedArray = __webpack_require__(3842); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); + +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice + +module.exports = function slice(start, end) { + var O = this; // step 1 + + ValidateTypedArray(O, 'SEQ-CST'); // step 2 + + // 3. Let len be O.[[ArrayLength]]. + var len = O.length; // steps 3 + + var relativeStart = ToIntegerOrInfinity(start); // step 4 + + var k; + if (relativeStart === -Infinity) { + k = 0; // step 5 + } else if (relativeStart < 0) { + k = max(len + relativeStart, 0); // step 6 + } else { + k = min(relativeStart, len); // step 7 + } + + var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 8 + + var final; + if (relativeEnd === -Infinity) { + final = 0; // step 9 + } else if (relativeEnd < 0) { + final = max(len + relativeEnd, 0); // step 10 + } else { + final = min(relativeEnd, len); // step 11 + } + + var count = max(final - k, 0); // step 12 + + var A = TypedArraySpeciesCreate(O, [count]); // step 13 + + if (count > 0) { // step 14 + if (IsDetachedBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Cannot use a Typed Array with an underlying ArrayBuffer that is detached'); // step 14.a + } + var srcType = TypedArrayElementType(O); // step 14.b + var targetType = TypedArrayElementType(A); // step 14.c + if (srcType === targetType) { // step 14.d + // 1. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data. + var srcBuffer = typedArrayBuffer(O); // step 14.d.ii + var targetBuffer = typedArrayBuffer(A); // step 14.d.iii + var elementSize = TypedArrayElementSize(O); // step 14.d.iv + var srcByteOffset = typedArrayByteOffset(O); // step 14.d.v + var srcByteIndex = (k * elementSize) + srcByteOffset; // step 14.d.vi + var targetByteIndex = typedArrayByteOffset(A); // step 14.d.vii + var limit = targetByteIndex + (count * elementSize); // step 14.d.viii + while (targetByteIndex < limit) { // step 14.d.ix + var value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'UINT8', true, 'UNORDERED'); // step 14.d.ix.1 + SetValueInBuffer(targetBuffer, targetByteIndex, 'UINT8', value, true, 'UNORDERED'); // step 14.d.ix.2 + srcByteIndex += 1; // step 14.d.ix.3 + targetByteIndex += 1; // step 14.d.ix.4 + } + } else { // step 14.e + var n = 0; // step 14.e.i + while (k < final) { // step 14.e.ii + var Pk = ToString(k); // step 14.e.ii.1 + var kValue = Get(O, Pk); // step 14.e.ii.2 + Set(A, ToString(n), kValue, true); // step 14.e.ii.3 + k += 1; // step 14.e.ii.4 + n += 1; // step 14.e.ii.5 + } + } + } + + return A; // step 15 +}; + + +/***/ }), + +/***/ 1140: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var callBind = __webpack_require__(8374); + +var implementation = __webpack_require__(4073); +var getPolyfill = __webpack_require__(5046); +var shim = __webpack_require__(8564); + +var bound = callBind(getPolyfill()); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; + + +/***/ }), + +/***/ 1154: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var callBind = __webpack_require__(8374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(8474); +var GetIntrinsic = __webpack_require__(682); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6776: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(806); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = __webpack_require__(2656); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = __webpack_require__(8198)(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 2855: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8474: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2855); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 682: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5314)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8474); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5314: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6188); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6188: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6841: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; + + +/***/ }), + +/***/ 5726: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __webpack_require__(5794); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === __webpack_require__.g) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ 5046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(4073); + +module.exports = function getPolyfill() { + return (typeof Uint8Array === 'function' && Uint8Array.prototype.slice) || implementation; +}; + + +/***/ }), + +/***/ 8564: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var getProto = __webpack_require__(9495); + +var getPolyfill = __webpack_require__(5046); + +module.exports = function shimTypedArraySlice() { + if (typeof Uint8Array === 'function') { + var polyfill = getPolyfill(); + var proto = getProto(Uint8Array.prototype); + define( + proto, + { slice: polyfill }, + { slice: function () { return proto.slice !== polyfill; } } + ); + } + + return polyfill; +}; + + +/***/ }), + +/***/ 4010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var availableTypedArrays = __webpack_require__(4343); +var callBind = __webpack_require__(4899); +var callBound = __webpack_require__(7120); +var gOPD = __webpack_require__(3828); + +/** @type {(O: object) => string} */ +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = __webpack_require__(4111)(); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +/** @type {(array: readonly T[], value: unknown) => number} */ +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; + +/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */ +/** @type {{ [k in `\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */ +var cache = { __proto__: null }; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + // @ts-expect-error TS won't narrow inside a closure + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + // @ts-expect-error TS won't narrow inside a closure + descriptor = gOPD(superProto, Symbol.toStringTag); + } + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(fn); + } + }); +} + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ + function (getter, typedArray) { + if (!found) { + try { + // @ts-expect-error TODO: fix + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var trySlices = function tryAllSlices(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) { + if (!found) { + try { + // @ts-expect-error TODO: fix + getter(value); + found = $slice(name, 1); + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {import('.')} */ +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag) { + /** @type {string} */ + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { return null; } // unknown engine + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 7120: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(6883); + +var callBind = __webpack_require__(4899); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4899: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7961); +var GetIntrinsic = __webpack_require__(6883); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7562: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7961: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7562); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 6883: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8861)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7961); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8861: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(704); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 704: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + /***/ }), /***/ 9196: @@ -3181,6 +14202,3086 @@ module.exports = traverse; "use strict"; module.exports = window["React"]; +/***/ }), + +/***/ 5794: +/***/ (function() { + +/* (ignored) */ + +/***/ }), + +/***/ 4343: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var possibleNames = __webpack_require__(131); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; + +/** @type {import('.')} */ +module.exports = function availableTypedArrays() { + var /** @type {ReturnType} */ out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === 'function') { + // @ts-expect-error + out[out.length] = possibleNames[i]; + } + } + return out; +}; + + +/***/ }), + +/***/ 7153: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames () { + var classes = ''; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg) { + classes = appendClass(classes, parseValue(arg)); + } + } + + return classes; + } + + function parseValue (arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + return arg; + } + + if (typeof arg !== 'object') { + return ''; + } + + if (Array.isArray(arg)) { + return classNames.apply(null, arg); + } + + if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { + return arg.toString(); + } + + var classes = ''; + + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes = appendClass(classes, key); + } + } + + return classes; + } + + function appendClass (value, newClass) { + if (!newClass) { + return value; + } + + if (value) { + return value + ' ' + newClass; + } + + return value + newClass; + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ 6245: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5037); + +var $String = GetIntrinsic('%String%'); +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ 2981: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +// https://tc39.es/ecma262/#sec-arraybufferbytelength + +var IsDetachedBuffer = __webpack_require__(1320); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var arrayBufferByteLength = __webpack_require__(480); + +var isGrowable = false; // TODO: support this + +module.exports = function ArrayBufferByteLength(arrayBuffer, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + // 1. If IsSharedArrayBuffer(arrayBuffer) is true and arrayBuffer has an [[ArrayBufferByteLengthData]] internal slot, then + // TODO: see if IsFixedLengthArrayBuffer can be used here in the spec instead + if (isSAB && isGrowable) { // step 1 + // a. Let bufferByteLengthBlock be arrayBuffer.[[ArrayBufferByteLengthData]]. + // b. Let rawLength be GetRawBytesFromSharedBlock(bufferByteLengthBlock, 0, BIGUINT64, true, order). + // c. Let isLittleEndian be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. + // d. Return ℝ(RawBytesToNumeric(BIGUINT64, rawLength, isLittleEndian)). + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must not be detached'); // step 2 + } + + return arrayBufferByteLength(arrayBuffer); +}; + + +/***/ }), + +/***/ 6548: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = __webpack_require__(9204); +var $TypeError = __webpack_require__(1642); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (typeof n !== 'bigint' || typeof d !== 'bigint') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; + + +/***/ }), + +/***/ 9002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var DefineOwnProperty = __webpack_require__(208); + +var FromPropertyDescriptor = __webpack_require__(8367); +var IsDataDescriptor = __webpack_require__(4065); +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var ToPropertyDescriptor = __webpack_require__(8110); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; + + +/***/ }), + +/***/ 8367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var fromPropertyDescriptor = __webpack_require__(2646); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + return fromPropertyDescriptor(Desc); +}; + + +/***/ }), + +/***/ 3675: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var inspect = __webpack_require__(5726); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; + + +/***/ }), + +/***/ 9661: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = __webpack_require__(1154); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = __webpack_require__(6156); + +var IsDetachedBuffer = __webpack_require__(1320); +var RawBytesToNumeric = __webpack_require__(9219); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var safeConcat = __webpack_require__(3002); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); + +// https://262.ecma-international.org/15.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = tableTAO.size['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; + + +/***/ }), + +/***/ 5584: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; + + +/***/ }), + +/***/ 2985: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = __webpack_require__(692); + + +/***/ }), + +/***/ 4734: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BIGUINT64' || type === 'BIGINT64'; +}; + + +/***/ }), + +/***/ 3071: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = __webpack_require__(6841); + + +/***/ }), + +/***/ 7010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(4342); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = __webpack_require__(9002); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} + + +/***/ }), + +/***/ 4065: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var isPropertyDescriptor = __webpack_require__(6862); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; + + +/***/ }), + +/***/ 1320: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var $byteLength = __webpack_require__(480); +var availableTypedArrays = __webpack_require__(4343)(); +var callBound = __webpack_require__(1154); +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); + +var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) { + try { + new __webpack_require__.g[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; + + +/***/ }), + +/***/ 9442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(1154); + +var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true); +var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); + +// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer + +module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) { + var isAB = isArrayBuffer(arrayBuffer); + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isAB && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer'); + } + + if (isAB && $arrayBufferResizable) { + return !$arrayBufferResizable(arrayBuffer); // step 1 + } + if (isSAB && $sharedArrayGrowable) { + return !$sharedArrayGrowable(arrayBuffer); // step 1 + } + return true; // step 2 +}; + + +/***/ }), + +/***/ 9762: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; + + +/***/ }), + +/***/ 9954: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsDetachedBuffer = __webpack_require__(1320); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// https://tc39.es/ecma262/#sec-istypedarrayoutofbounds + +module.exports = function IsTypedArrayOutOfBounds(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + var O = taRecord['[[Object]]']; // step 1 + + var bufferByteLength = taRecord['[[CachedBufferByteLength]]']; // step 2 + + if (IsDetachedBuffer(typedArrayBuffer(O)) && bufferByteLength !== 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached only if the byte length is ~DETACHED~'); // step 3 + } + + if (bufferByteLength === 'DETACHED') { + return true; // step 4 + } + + var byteOffsetStart = typedArrayByteOffset(O); // step 5 + + var byteOffsetEnd; + var length = typedArrayLength(O); + // TODO: probably use package for array length + // seems to apply when TA is backed by a resizable/growable AB + if (length === 'AUTO') { // step 6 + byteOffsetEnd = bufferByteLength; // step 6.a + } else { + var elementSize = TypedArrayElementSize(O); // step 7.a + + byteOffsetEnd = byteOffsetStart + (length * elementSize); // step 7.b + } + + if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) { + return true; // step 8 + } + + // 9. NOTE: 0-length TypedArrays are not considered out-of-bounds. + + return false; // step 10 +}; + + +/***/ }), + +/***/ 7551: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'UINT8' + || type === 'UINT8C' + || type === 'UINT16' + || type === 'UINT32' + || type === 'BIGUINT64'; +}; + + +/***/ }), + +/***/ 6005: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var ArrayBufferByteLength = __webpack_require__(2981); +var IsDetachedBuffer = __webpack_require__(1320); + +var isTypedArray = __webpack_require__(2527); +var typedArrayBuffer = __webpack_require__(6740); + +// https://tc39.es/ecma262/#sec-maketypedarraywithbufferwitnessrecord + +module.exports = function MakeTypedArrayWithBufferWitnessRecord(obj, order) { + if (!isTypedArray(obj)) { + throw new $TypeError('Assertion failed: `obj` must be a Typed Array'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + var buffer = typedArrayBuffer(obj); // step 1 + + var byteLength = IsDetachedBuffer(buffer) ? 'DETACHED' : ArrayBufferByteLength(buffer, order); // steps 2 - 3 + + return { '[[Object]]': obj, '[[CachedBufferByteLength]]': byteLength }; // step 4 +}; + + +/***/ }), + +/***/ 4604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwnProperty = __webpack_require__(5584); +var ToBigInt64 = __webpack_require__(1242); +var ToBigUint64 = __webpack_require__(2947); +var ToInt16 = __webpack_require__(3181); +var ToInt32 = __webpack_require__(2587); +var ToInt8 = __webpack_require__(5562); +var ToUint16 = __webpack_require__(5465); +var ToUint32 = __webpack_require__(5964); +var ToUint8 = __webpack_require__(9496); +var ToUint8Clamp = __webpack_require__(6550); + +var valueToFloat32Bytes = __webpack_require__(3647); +var valueToFloat64Bytes = __webpack_require__(7511); +var integerToNBytes = __webpack_require__(1520); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +var TypeToAO = { + __proto__: null, + INT8: ToInt8, + UINT8: ToUint8, + UINT8C: ToUint8Clamp, + INT16: ToInt16, + UINT16: ToUint16, + INT32: ToInt32, + UINT32: ToUint32, + BIGINT64: ToBigInt64, + BIGUINT64: ToBigUint64 +}; + +// https://262.ecma-international.org/15.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'FLOAT32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'FLOAT64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; + + +/***/ }), + +/***/ 9219: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); +var callBound = __webpack_require__(1154); + +var $RangeError = __webpack_require__(9204); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = __webpack_require__(5584); +var IsArray = __webpack_require__(2985); +var IsBigIntElementType = __webpack_require__(4734); +var IsUnsignedElementType = __webpack_require__(7551); + +var bytesAsFloat32 = __webpack_require__(8727); +var bytesAsFloat64 = __webpack_require__(7604); +var bytesAsInteger = __webpack_require__(2367); +var every = __webpack_require__(8172); +var isByteValue = __webpack_require__(1824); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +// https://262.ecma-international.org/15.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'FLOAT32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'FLOAT64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; + + +/***/ }), + +/***/ 3392: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; + + +/***/ }), + +/***/ 8055: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var Type = __webpack_require__(9655); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (typeof Throw !== 'boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; + + +/***/ }), + +/***/ 3383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var isInteger = __webpack_require__(6156); + +var IsBigIntElementType = __webpack_require__(4734); +var IsDetachedBuffer = __webpack_require__(1320); +var NumericToRawBytes = __webpack_require__(4604); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(5604); +var has = __webpack_require__(9429); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); +var forEach = __webpack_require__(9065); + +// https://262.ecma-international.org/15.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !has(tableTAO.size, '$' + type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED' && order !== 'INIT') { + throw new $TypeError('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = tableTAO.size['$' + type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; + + +/***/ }), + +/***/ 5994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = __webpack_require__(1642); + +var IsConstructor = __webpack_require__(7010); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; + + +/***/ }), + +/***/ 907: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; + + +/***/ }), + +/***/ 4967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = __webpack_require__(1642); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = __webpack_require__(1154); +var regexTester = __webpack_require__(1312); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = __webpack_require__(4113); + +// https://262.ecma-international.org/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; + + +/***/ }), + +/***/ 9752: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +var StringToBigInt = __webpack_require__(907); +var ToPrimitive = __webpack_require__(210); + +// https://262.ecma-international.org/13.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (typeof n === 'undefined') { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; + + +/***/ }), + +/***/ 1242: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; + + +/***/ }), + +/***/ 2947: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; + + +/***/ }), + +/***/ 6440: +/***/ (function(module) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; + + +/***/ }), + +/***/ 3181: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint16 + +var two16 = 0x10000; // Math.pow(2, 16); + +module.exports = function ToInt16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit >= 0x8000 ? int16bit - two16 : int16bit; +}; + + +/***/ }), + +/***/ 2587: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint32 + +var two31 = 0x80000000; // Math.pow(2, 31); +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToInt32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + var result = int32bit >= two31 ? int32bit - two32 : int32bit; + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5562: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; + + +/***/ }), + +/***/ 2897: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + return truncate(number); +}; + + +/***/ }), + +/***/ 3438: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = __webpack_require__(4968); + +var ToPrimitive = __webpack_require__(210); +var StringToNumber = __webpack_require__(4967); + +// https://262.ecma-international.org/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; + + +/***/ }), + +/***/ 210: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toPrimitive = __webpack_require__(5249); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; + + +/***/ }), + +/***/ 8110: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); + +var $TypeError = __webpack_require__(1642); + +var Type = __webpack_require__(9655); +var ToBoolean = __webpack_require__(6440); +var IsCallable = __webpack_require__(3071); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; + + +/***/ }), + +/***/ 7249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $String = GetIntrinsic('%String%'); +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ 5465: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint16 + +var two16 = 0x10000; // Math.pow(2, 16) + +module.exports = function ToUint16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5964: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint32 + +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToUint32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 9496: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isFinite = __webpack_require__(7991); + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +// https://262.ecma-international.org/14.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit; +}; + + +/***/ }), + +/***/ 6550: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var clamp = __webpack_require__(3832); + +var ToNumber = __webpack_require__(3438); +var floor = __webpack_require__(3473); + +var $isNaN = __webpack_require__(9404); + +// https://262.ecma-international.org/15.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); // step 1 + + if ($isNaN(number)) { return 0; } // step 2 + + var clamped = clamp(number, 0, 255); // step 4 + + var f = floor(clamped); // step 5 + + if (clamped < (f + 0.5)) { return f; } // step 6 + + if (clamped > (f + 0.5)) { return f + 1; } // step 7 + + return f % 2 === 0 ? f : f + 1; // step 8 +}; + + +/***/ }), + +/***/ 9655: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ES5Type = __webpack_require__(1528); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; + + +/***/ }), + +/***/ 7265: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var IsArray = __webpack_require__(2985); +var IsConstructor = __webpack_require__(7010); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayLength = __webpack_require__(8921); +var ValidateTypedArray = __webpack_require__(3842); + +var availableTypedArrays = __webpack_require__(4343)(); + +// https://262.ecma-international.org/15.0/#typedarraycreatefromconstructor + +module.exports = function TypedArrayCreateFromConstructor(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + var taRecord = ValidateTypedArray(newTypedArray, 'SEQ-CST'); // step 2 + + if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3 + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('new Typed Array is out of bounds'); // step 3.a + } + var length = TypedArrayLength(taRecord); // step 3.b + if (length < argumentList[0]) { + throw new $TypeError('`argumentList[0]` must be <= `newTypedArray.length`'); // step 3.c + } + } + + return newTypedArray; // step 4 +}; + + +/***/ }), + +/***/ 9149: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var isInteger = __webpack_require__(6156); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = tableTAO.size['$' + tableTAO.name['$' + type]]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; + + +/***/ }), + +/***/ 1586: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/15.0/#sec-typedarrayelementtype + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = tableTAO.name['$' + type]; + if (typeof result !== 'string') { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; + + +/***/ }), + +/***/ 8921: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var floor = __webpack_require__(3473); +var IsFixedLengthArrayBuffer = __webpack_require__(9442); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// http://www.ecma-international.org/ecma-262/15.0/#sec-typedarraylength + +module.exports = function TypedArrayLength(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` is out of bounds'); // step 1 + } + + var O = taRecord['[[Object]]']; // step 2 + + var length = typedArrayLength(O); + if (length !== 'AUTO') { + return length; // step 3 + } + + if (IsFixedLengthArrayBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Assertion failed: array buffer is not fixed length'); // step 4 + } + + var byteOffset = typedArrayByteOffset(O); // step 5 + + var elementSize = TypedArrayElementSize(O); // step 6 + + var byteLength = taRecord['[[CachedBufferByteLength]]']; // step 7 + + if (byteLength === 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached'); // step 8 + } + + return floor((byteLength - byteOffset) / elementSize); // step 9 +}; + + +/***/ }), + +/***/ 817: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); +var availableTypedArrays = __webpack_require__(4343)(); + +var IsArray = __webpack_require__(2985); +var SpeciesConstructor = __webpack_require__(5994); +var TypedArrayCreateFromConstructor = __webpack_require__(7265); + +var getConstructor = __webpack_require__(9660); + +// https://262.ecma-international.org/15.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreateFromConstructor(constructor, argumentList); // step 4 +}; + + +/***/ }), + +/***/ 3842: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var MakeTypedArrayWithBufferWitnessRecord = __webpack_require__(6005); +var Type = __webpack_require__(9655); + +var isTypedArray = __webpack_require__(2527); + +// https://262.ecma-international.org/15.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O, order) { + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1 + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 1 - 2 + } + + var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, order); // step 3 + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('`O` must be in-bounds and backed by a non-detached buffer'); // step 4 + } + + return taRecord; // step 5 +}; + + +/***/ }), + +/***/ 3832: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; + + +/***/ }), + +/***/ 3473: +/***/ (function(module) { + +"use strict"; + + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (typeof x === 'bigint') { + return x; + } + return $floor(x); +}; + + +/***/ }), + +/***/ 1367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); + + +/***/ }), + +/***/ 2967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); + + +/***/ }), + +/***/ 8457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var mod = __webpack_require__(2076); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; + + +/***/ }), + +/***/ 2170: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors + +module.exports = { + __proto__: null, + name: { + __proto__: null, + $Int8Array: 'INT8', + $Uint8Array: 'UINT8', + $Uint8ClampedArray: 'UINT8C', + $Int16Array: 'INT16', + $Uint16Array: 'UINT16', + $Int32Array: 'INT32', + $Uint32Array: 'UINT32', + $BigInt64Array: 'BIGINT64', + $BigUint64Array: 'BIGUINT64', + $Float32Array: 'FLOAT32', + $Float64Array: 'FLOAT64' + }, + size: { + __proto__: null, + $INT8: 1, + $UINT8: 1, + $UINT8C: 1, + $INT16: 2, + $UINT16: 2, + $INT32: 4, + $UINT32: 4, + $BIGINT64: 8, + $BIGUINT64: 8, + $FLOAT32: 4, + $FLOAT64: 8 + } +}; + + +/***/ }), + +/***/ 736: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var floor = __webpack_require__(3473); + +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/14.0/#eqn-truncate + +module.exports = function truncate(x) { + if (typeof x !== 'number' && typeof x !== 'bigint') { + throw new $TypeError('argument must be a Number or a BigInt'); + } + var result = x < 0 ? -floor(-x) : floor(x); + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 1528: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/5.1/#sec-8 + +module.exports = function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } +}; + + +/***/ }), + +/***/ 4342: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// TODO: remove, semver-major + +module.exports = __webpack_require__(682); + + +/***/ }), + +/***/ 208: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasPropertyDescriptors = __webpack_require__(8198); + +var $defineProperty = __webpack_require__(8918); + +var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + +// eslint-disable-next-line global-require +var isArray = hasArrayLengthDefineBug && __webpack_require__(692); + +var callBound = __webpack_require__(1154); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +// eslint-disable-next-line max-params +module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { + if (!$defineProperty) { + if (!IsDataDescriptor(desc)) { + // ES3 does not support getters/setters + return false; + } + if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { + return false; + } + + // fallback for ES3 + if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { + // a non-enumerable existing property + return false; + } + + // property does not exist at all, or exists but is enumerable + var V = desc['[[Value]]']; + // eslint-disable-next-line no-param-reassign + O[P] = V; // will use [[Define]] + return SameValue(O[P], V); + } + if ( + hasArrayLengthDefineBug + && P === 'length' + && '[[Value]]' in desc + && isArray(O) + && O.length !== desc['[[Value]]'] + ) { + // eslint-disable-next-line no-param-reassign + O.length = desc['[[Value]]']; + return O.length === desc['[[Value]]']; + } + + $defineProperty(O, P, FromPropertyDescriptor(desc)); + return true; +}; + + +/***/ }), + +/***/ 692: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && __webpack_require__(1154)('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; + + +/***/ }), + +/***/ 8727: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat32(rawBytes) { + // return new $Float32Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[3] & 0x80 ? -1 : 1; // Check the sign bit + var exponent = ((rawBytes[3] & 0x7F) << 1) + | (rawBytes[2] >> 7); // Combine bits for exponent + var mantissa = ((rawBytes[2] & 0x7F) << 16) + | (rawBytes[1] << 8) + | rawBytes[0]; // Combine bits for mantissa + + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + if (exponent === -127) { + return sign * mantissa * $pow(2, -126 - 23); + } + return sign * (1 + (mantissa * $pow(2, -23))) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 7604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat64(rawBytes) { + // return new $Float64Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + // Handle subnormal numbers + if (exponent === -1023) { + return sign * mantissa * 5e-324; // $pow(2, -1022 - 52) + } + + return sign * (1 + (mantissa / 0x10000000000000)) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 2367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function bytesAsInteger(rawBytes, elementSize, isUnsigned, isBigInt) { + var Z = isBigInt ? $BigInt : $Number; + + // this is common to both branches + var intValue = Z(0); + for (var i = 0; i < rawBytes.length; i++) { + intValue += Z(rawBytes[i] * $pow(2, 8 * i)); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!isUnsigned) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + + if (rawBytes[elementSize - 1] & 0x80) { + intValue -= Z($pow(2, bitLength)); + } + } + + return intValue; // step 7 +}; + + +/***/ }), + +/***/ 2142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); +var $Uint32Array = GetIntrinsic('%Uint32Array%', true); + +var typedArrayBuffer = __webpack_require__(6740); + +var uInt32 = $Uint32Array && new $Uint32Array([0x12345678]); +var uInt8 = uInt32 && new $Uint8Array(typedArrayBuffer(uInt32)); + +module.exports = uInt8 + ? uInt8[0] === 0x78 + ? 'little' + : uInt8[0] === 0x12 + ? 'big' + : uInt8[0] === 0x34 + ? 'mixed' // https://developer.mozilla.org/en-US/docs/Glossary/Endianness + : 'unknown' // ??? + : 'indeterminate'; // no way to know + + +/***/ }), + +/***/ 8172: +/***/ (function(module) { + +"use strict"; + + +module.exports = function every(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (!predicate(array[i], i, array)) { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 9065: +/***/ (function(module) { + +"use strict"; + + +module.exports = function forEach(array, callback) { + for (var i = 0; i < array.length; i += 1) { + callback(array[i], i, array); // eslint-disable-line callback-return + } +}; + + +/***/ }), + +/***/ 1211: +/***/ (function(module) { + +"use strict"; + + +var MAX_ITER = 1075; // 1023+52 (subnormals) => BIAS+NUM_SIGNFICAND_BITS-1 +var maxBits = 54; // only 53 bits for fraction + +module.exports = function fractionToBitString(x) { + var str = ''; + if (x === 0) { + return str; + } + var j = MAX_ITER; + + var y; + // Each time we multiply by 2 and find a ones digit, add a '1'; otherwise, add a '0'.. + for (var i = 0; i < MAX_ITER; i += 1) { + y = x * 2; + if (y >= 1) { + x = y - 1; // eslint-disable-line no-param-reassign + str += '1'; + if (j === MAX_ITER) { + j = i; // first 1 + } + } else { + x = y; // eslint-disable-line no-param-reassign + str += '0'; + } + // Stop when we have no more decimals to process or in the event we found a fraction which cannot be represented in a finite number of bits... + if (y === 1 || i - j > maxBits) { + return str; + } + } + return str; +}; + + +/***/ }), + +/***/ 2646: +/***/ (function(module) { + +"use strict"; + + +module.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + var obj = {}; + if ('[[Value]]' in Desc) { + obj.value = Desc['[[Value]]']; + } + if ('[[Writable]]' in Desc) { + obj.writable = !!Desc['[[Writable]]']; + } + if ('[[Get]]' in Desc) { + obj.get = Desc['[[Get]]']; + } + if ('[[Set]]' in Desc) { + obj.set = Desc['[[Set]]']; + } + if ('[[Enumerable]]' in Desc) { + obj.enumerable = !!Desc['[[Enumerable]]']; + } + if ('[[Configurable]]' in Desc) { + obj.configurable = !!Desc['[[Configurable]]']; + } + return obj; +}; + + +/***/ }), + +/***/ 9495: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); + +var hasProto = __webpack_require__(1856)(); + +module.exports = originalGetProto || ( + hasProto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + + +/***/ }), + +/***/ 20: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $floor = GetIntrinsic('%Math.floor%'); + +// https://runestone.academy/ns/books/published/pythonds/BasicDS/ConvertingDecimalNumberstoBinaryNumbers.html#:~:text=The%20Divide%20by%202%20algorithm,have%20a%20remainder%20of%200 + +module.exports = function intToBinaryString(x) { + var str = ''; + var y; + + while (x > 0) { + y = x / 2; + x = $floor(y); // eslint-disable-line no-param-reassign + if (y === x) { + str = '0' + str; + } else { + str = '1' + str; + } + } + return str; +}; + + +/***/ }), + +/***/ 1520: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function integerToNBytes(intValue, n, isLittleEndian) { + var Z = typeof intValue === 'bigint' ? $BigInt : $Number; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue >>>= 0; // eslint-disable-line no-param-reassign + } + + var rawBytes = []; + for (var i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & Z(0xFF)); + intValue >>= Z(8); // eslint-disable-line no-param-reassign + } + + return rawBytes; // step 4 +}; + + +/***/ }), + +/***/ 1824: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isByteValue(value) { + return typeof value === 'number' && value >= 0 && value <= 255 && (value | 0) === value; +}; + + +/***/ }), + +/***/ 7991: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + + +/***/ }), + +/***/ 6156: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; + + + +/***/ }), + +/***/ 9404: +/***/ (function(module) { + +"use strict"; + + +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 2745: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; + + +/***/ }), + +/***/ 4968: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ 2076: +/***/ (function(module) { + +"use strict"; + + +var $floor = Math.floor; + +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; + + +/***/ }), + +/***/ 8626: +/***/ (function(module) { + +"use strict"; + + +module.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; +}; + + +/***/ }), + +/***/ 6862: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var allowed = { + __proto__: null, + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true +}; + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function isPropertyDescriptor(Desc) { + if (!Desc || typeof Desc !== 'object') { + return false; + } + + for (var key in Desc) { // eslint-disable-line + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = hasOwn(Desc, '[[Value]]') || hasOwn(Desc, '[[Writable]]'); + var IsAccessor = hasOwn(Desc, '[[Get]]') || hasOwn(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; +}; + + +/***/ }), + +/***/ 359: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); +var isTypedArray = __webpack_require__(2527); + +var isInteger = __webpack_require__(6156); + +module.exports = function isTypedArrayWithBufferWitnessRecord(value) { + return !!value + && typeof value === 'object' + && hasOwn(value, '[[Object]]') + && hasOwn(value, '[[CachedBufferByteLength]]') + && ( + (isInteger(value['[[CachedBufferByteLength]]']) && value['[[CachedBufferByteLength]]'] >= 0) + || value['[[CachedBufferByteLength]]'] === 'DETACHED' + ) + && isTypedArray(value['[[Object]]']); +}; + + +/***/ }), + +/***/ 9660: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var constructors = { + __proto__: null, + $Int8Array: GetIntrinsic('%Int8Array%', true), + $Uint8Array: GetIntrinsic('%Uint8Array%', true), + $Uint8ClampedArray: GetIntrinsic('%Uint8ClampedArray%', true), + $Int16Array: GetIntrinsic('%Int16Array%', true), + $Uint16Array: GetIntrinsic('%Uint16Array%', true), + $Int32Array: GetIntrinsic('%Int32Array%', true), + $Uint32Array: GetIntrinsic('%Uint32Array%', true), + $BigInt64Array: GetIntrinsic('%BigInt64Array%', true), + $BigUint64Array: GetIntrinsic('%BigUint64Array%', true), + $Float32Array: GetIntrinsic('%Float32Array%', true), + $Float64Array: GetIntrinsic('%Float64Array%', true) +}; + +module.exports = function getConstructor(kind) { + return constructors['$' + kind]; +}; + + +/***/ }), + +/***/ 3647: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); +var $pow = GetIntrinsic('%Math.pow%'); + +var isFinite = __webpack_require__(7991); +var isNaN = __webpack_require__(9404); +var isNegativeZero = __webpack_require__(2745); + +var maxFiniteFloat32 = 3.4028234663852886e+38; // roughly 2 ** 128 - 1 + +module.exports = function valueToFloat32Bytes(value, isLittleEndian) { + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = isNegativeZero(value) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if ($abs(value) > maxFiniteFloat32 || !isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = $abs(value); // eslint-disable-line no-param-reassign + + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23) + 0.5; + mantissa = $floor(mantissa); + + exponent += 127; + exponent <<= 23; + + var result = (sign << 31) + | exponent + | mantissa; + + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + result >>= 8; + var byte2 = result & 255; + result >>= 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; +}; + + +/***/ }), + +/***/ 7511: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $parseInt = GetIntrinsic('%parseInt%'); +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var callBound = __webpack_require__(1154); + +var $strIndexOf = callBound('String.prototype.indexOf'); +var $strSlice = callBound('String.prototype.slice'); + +var fractionToBitString = __webpack_require__(1211); +var intToBinString = __webpack_require__(20); +var isNegativeZero = __webpack_require__(2745); + +var float64bias = 1023; + +var elevenOnes = '11111111111'; +var elevenZeroes = '00000000000'; +var fiftyOneZeroes = elevenZeroes + elevenZeroes + elevenZeroes + elevenZeroes + '0000000'; + +// IEEE 754-1985 +module.exports = function valueToFloat64Bytes(value, isLittleEndian) { + var signBit = value < 0 || isNegativeZero(value) ? '1' : '0'; + var exponentBits; + var significandBits; + + if (isNaN(value)) { + exponentBits = elevenOnes; + significandBits = '1' + fiftyOneZeroes; + } else if (!isFinite(value)) { + exponentBits = elevenOnes; + significandBits = '0' + fiftyOneZeroes; + } else if (value === 0) { + exponentBits = elevenZeroes; + significandBits = '0' + fiftyOneZeroes; + } else { + value = $abs(value); // eslint-disable-line no-param-reassign + + // Isolate the integer part (digits before the decimal): + var integerPart = $floor(value); + + var intBinString = intToBinString(integerPart); // bit string for integer part + var fracBinString = fractionToBitString(value - integerPart); // bit string for fractional part + + var numberOfBits; + // find exponent needed to normalize integer+fractional parts + if (intBinString) { + exponentBits = intBinString.length - 1; // move the decimal to the left + } else { + var first1 = $strIndexOf(fracBinString, '1'); + if (first1 > -1) { + numberOfBits = first1 + 1; + } + exponentBits = -numberOfBits; // move the decimal to the right + } + + significandBits = intBinString + fracBinString; + if (exponentBits < 0) { + // subnormals + if (exponentBits <= -float64bias) { + numberOfBits = float64bias - 1; // limit number of removed bits + } + significandBits = $strSlice(significandBits, numberOfBits); // remove all leading 0s and the first 1 for normal values; for subnormals, remove up to `float64bias - 1` leading bits + } else { + significandBits = $strSlice(significandBits, 1); // remove the leading '1' (implicit/hidden bit) + } + exponentBits = $strSlice(elevenZeroes + intToBinString(exponentBits + float64bias), -11); // Convert the exponent to a bit string + + significandBits = $strSlice(significandBits + fiftyOneZeroes + '0', 0, 52); // fill in any trailing zeros and ensure we have only 52 fraction bits + } + + var bits = signBit + exponentBits + significandBits; + var rawBytes = []; + for (var i = 0; i < 8; i++) { + var targetIndex = isLittleEndian ? 8 - i - 1 : i; + rawBytes[targetIndex] = $parseInt($strSlice(bits, i * 8, (i + 1) * 8), 2); + } + + return rawBytes; +}; + + /***/ }) /******/ }); @@ -3234,6 +17335,18 @@ module.exports = window["React"]; /******/ }; /******/ }(); /******/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } @@ -3671,7 +17784,7 @@ function _extends() { ;// CONCATENATED MODULE: external ["wp","element"] var external_wp_element_namespaceObject = window["wp"]["element"]; // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(7153); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","compose"] var external_wp_compose_namespaceObject = window["wp"]["compose"]; @@ -16752,26 +30865,4346 @@ function BlockHTML(_ref) { /* harmony default export */ var block_html = (BlockHTML); -;// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/esm/index.js -var f=r(),esm_n=e=>c(e,f),m=r();esm_n.write=e=>c(e,m);var d=r();esm_n.onStart=e=>c(e,d);var h=r();esm_n.onFrame=e=>c(e,h);var p=r();esm_n.onFinish=e=>c(e,p);var i=[];esm_n.setTimeout=(e,t)=>{let a=esm_n.now()+t,o=()=>{let F=i.findIndex(z=>z.cancel==o);~F&&i.splice(F,1),u-=~F?1:0},s={time:a,handler:e,cancel:o};return i.splice(w(a),0,s),u+=1,v(),s};var w=e=>~(~i.findIndex(t=>t.time>e)||~i.length);esm_n.cancel=e=>{d.delete(e),h.delete(e),p.delete(e),f.delete(e),m.delete(e)};esm_n.sync=e=>{T=!0,esm_n.batchedUpdates(e),T=!1};esm_n.throttle=e=>{let t;function a(){try{e(...t)}finally{t=null}}function o(...s){t=s,esm_n.onStart(a)}return o.handler=e,o.cancel=()=>{d.delete(a),t=null},o};var y=typeof window<"u"?window.requestAnimationFrame:()=>{};esm_n.use=e=>y=e;esm_n.now=typeof performance<"u"?()=>performance.now():Date.now;esm_n.batchedUpdates=e=>e();esm_n.catch=console.error;esm_n.frameLoop="always";esm_n.advance=()=>{esm_n.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):x()};var l=-1,u=0,T=!1;function c(e,t){T?(t.delete(e),e(0)):(t.add(e),v())}function v(){l<0&&(l=0,esm_n.frameLoop!=="demand"&&y(b))}function R(){l=-1}function b(){~l&&(y(b),esm_n.batchedUpdates(x))}function x(){let e=l;l=esm_n.now();let t=w(l);if(t&&(Q(i.splice(0,t),a=>a.handler()),u-=t),!u){R();return}d.flush(),f.flush(e?Math.min(64,l-e):16.667),h.flush(),m.flush(),p.flush()}function r(){let e=new Set,t=e;return{add(a){u+=t==e&&!e.has(a)?1:0,e.add(a)},delete(a){return u-=t==e&&e.has(a)?1:0,e.delete(a)},flush(a){t.size&&(e=new Set,u-=t.size,Q(t,o=>o(a)&&e.add(o)),u+=e.size,t=e)}}}function Q(e,t){e.forEach(a=>{try{t(a)}catch(o){esm_n.catch(o)}})}var S={count(){return u},isRunning(){return l>=0},clear(){l=-1,i=[],d=r(),f=r(),h=r(),m=r(),p=r(),u=0}}; - // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(9196); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); -;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/esm/index.js -var ze=Object.defineProperty;var Le=(e,t)=>{for(var r in t)ze(e,r,{get:t[r],enumerable:!0})};var esm_p={};Le(esm_p,{assign:()=>U,colors:()=>esm_c,createStringInterpolator:()=>k,skipAnimation:()=>ee,to:()=>J,willAdvance:()=>esm_S});function Y(){}var mt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),esm_l={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function bt(e,t){if(esm_l.arr(e)){if(!esm_l.arr(t)||e.length!==t.length)return!1;for(let r=0;re.forEach(t);function xt(e,t,r){if(esm_l.arr(e)){for(let n=0;nesm_l.und(e)?[]:esm_l.arr(e)?e:[e];function Pe(e,t){if(e.size){let r=Array.from(e);e.clear(),Ve(r,t)}}var yt=(e,...t)=>Pe(e,r=>r(...t)),esm_h=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);var k,J,esm_c=null,ee=!1,esm_S=Y,U=e=>{e.to&&(J=e.to),e.now&&(esm_n.now=e.now),e.colors!==void 0&&(esm_c=e.colors),e.skipAnimation!=null&&(ee=e.skipAnimation),e.createStringInterpolator&&(k=e.createStringInterpolator),e.requestAnimationFrame&&esm_n.use(e.requestAnimationFrame),e.batchedUpdates&&(esm_n.batchedUpdates=e.batchedUpdates),e.willAdvance&&(esm_S=e.willAdvance),e.frameLoop&&(esm_n.frameLoop=e.frameLoop)};var E=new Set,esm_u=[],H=[],A=0,qe={get idle(){return!E.size&&!esm_u.length},start(e){A>e.priority?(E.add(e),esm_n.onStart($e)):(te(e),esm_n(B))},advance:B,sort(e){if(A)esm_n.onFrame(()=>qe.sort(e));else{let t=esm_u.indexOf(e);~t&&(esm_u.splice(t,1),re(e))}},clear(){esm_u=[],E.clear()}};function $e(){E.forEach(te),E.clear(),esm_n(B)}function te(e){esm_u.includes(e)||re(e)}function re(e){esm_u.splice(Ge(esm_u,t=>t.priority>e.priority),0,e)}function B(e){let t=H;for(let r=0;r0}function Ge(e,t){let r=e.findIndex(t);return r<0?e.length:r}var ne=(e,t,r)=>Math.min(Math.max(r,e),t);var It={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};var esm_d="[-+]?\\d*\\.?\\d+",M=esm_d+"%";function C(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var oe=new RegExp("rgb"+C(esm_d,esm_d,esm_d)),fe=new RegExp("rgba"+C(esm_d,esm_d,esm_d,esm_d)),ae=new RegExp("hsl"+C(esm_d,M,M)),ie=new RegExp("hsla"+C(esm_d,M,M,esm_d)),se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ue=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,ce=/^#([0-9a-fA-F]{8})$/;function be(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=le.exec(e))?parseInt(t[1]+"ff",16)>>>0:esm_c&&esm_c[e]!==void 0?esm_c[e]:(t=oe.exec(e))?(esm_y(t[1])<<24|esm_y(t[2])<<16|esm_y(t[3])<<8|255)>>>0:(t=fe.exec(e))?(esm_y(t[1])<<24|esm_y(t[2])<<16|esm_y(t[3])<<8|me(t[4]))>>>0:(t=se.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ce.exec(e))?parseInt(t[1],16)>>>0:(t=ue.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ae.exec(e))?(de(pe(t[1]),z(t[2]),z(t[3]))|255)>>>0:(t=ie.exec(e))?(de(pe(t[1]),z(t[2]),z(t[3]))|me(t[4]))>>>0:null}function esm_j(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function de(e,t,r){let n=r<.5?r*(1+t):r+t-r*t,f=2*r-n,o=esm_j(f,n,e+1/3),i=esm_j(f,n,e),s=esm_j(f,n,e-1/3);return Math.round(o*255)<<24|Math.round(i*255)<<16|Math.round(s*255)<<8}function esm_y(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function pe(e){return(parseFloat(e)%360+360)%360/360}function me(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function z(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function D(e){let t=be(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,n=(t&16711680)>>>16,f=(t&65280)>>>8,o=(t&255)/255;return`rgba(${r}, ${n}, ${f}, ${o})`}var W=(e,t,r)=>{if(esm_l.fun(e))return e;if(esm_l.arr(e))return W({range:e,output:t,extrapolate:r});if(esm_l.str(e.output[0]))return k(e);let n=e,f=n.output,o=n.range||[0,1],i=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",x=n.easing||(a=>a);return a=>{let F=He(a,o);return Ue(a,o[F],o[F+1],f[F],f[F+1],x,i,s,n.map)}};function Ue(e,t,r,n,f,o,i,s,x){let a=x?x(e):e;if(ar){if(s==="identity")return a;s==="clamp"&&(a=r)}return n===f?n:t===r?e<=t?n:f:(t===-1/0?a=-a:r===1/0?a=a-t:a=(a-t)/(r-t),a=o(a),n===-1/0?a=-a:f===1/0?a=a+n:a=a*(f-n)+n,a)}function He(e,t){for(var r=1;r=e);++r);return r-1}var Be=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);let n=r*e,f=t==="end"?Math.floor(n):Math.ceil(n);return ne(0,1,f/e)},P=1.70158,L=P*1.525,xe=P+1,he=2*Math.PI/3,ye=2*Math.PI/4.5,V=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Lt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>xe*e*e*e-P*e*e,easeOutBack:e=>1+xe*Math.pow(e-1,3)+P*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((L+1)*2*e-L)/2:(Math.pow(2*e-2,2)*((L+1)*(e*2-2)+L)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*he),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*he)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ye))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ye)/2+1,easeInBounce:e=>1-V(1-e),easeOutBounce:V,easeInOutBounce:e=>e<.5?(1-V(1-2*e))/2:(1+V(2*e-1))/2,steps:Be};var g=Symbol.for("FluidValue.get"),esm_m=Symbol.for("FluidValue.observers");var Pt=e=>!!(e&&e[g]),ve=e=>e&&e[g]?e[g]():e,esm_qt=e=>e[esm_m]||null;function je(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $t(e,t){let r=e[esm_m];r&&r.forEach(n=>{je(n,t)})}var esm_ge=class{[g];[esm_m];constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");De(this,t)}},De=(e,t)=>Ee(e,g,t);function Gt(e,t){if(e[g]){let r=e[esm_m];r||Ee(e,esm_m,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Qt(e,t){let r=e[esm_m];if(r&&r.has(t)){let n=r.size-1;n?r.delete(t):e[esm_m]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Ee=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0});var O=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,esm_Oe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,K=new RegExp(`(${O.source})(%|[a-z]+)`,"i"),we=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,esm_b=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var N=e=>{let[t,r]=We(e);if(!t||esm_h())return e;let n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){let f=window.getComputedStyle(document.documentElement).getPropertyValue(r);return f||e}else{if(r&&esm_b.test(r))return N(r);if(r)return r}return e},We=e=>{let t=esm_b.exec(e);if(!t)return[,];let[,r,n]=t;return[r,n]};var _,Ke=(e,t,r,n,f)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${f})`,Xt=e=>{_||(_=esm_c?new RegExp(`(${Object.keys(esm_c).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(o=>ve(o).replace(esm_b,N).replace(esm_Oe,D).replace(_,D)),r=t.map(o=>o.match(O).map(Number)),f=r[0].map((o,i)=>r.map(s=>{if(!(i in s))throw Error('The arity of each "output" value must be equal');return s[i]})).map(o=>W({...e,output:o}));return o=>{let i=!K.test(t[0])&&t.find(x=>K.test(x))?.replace(O,""),s=0;return t[0].replace(O,()=>`${f[s++](o)}${i||""}`).replace(we,Ke)}};var Z="react-spring: ",Te=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${Z}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Ne=Te(console.warn);function Jt(){Ne(`${Z}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var _e=Te(console.warn);function er(){_e(`${Z}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function esm_or(e){return esm_l.str(e)&&(e[0]=="#"||/\d/.test(e)||!esm_h()&&esm_b.test(e)||e in(esm_c||{}))}var esm_v,q=new WeakMap,Ze=e=>e.forEach(({target:t,contentRect:r})=>q.get(t)?.forEach(n=>n(r)));function Fe(e,t){esm_v||typeof ResizeObserver<"u"&&(esm_v=new ResizeObserver(Ze));let r=q.get(t);return r||(r=new Set,q.set(t,r)),r.add(e),esm_v&&esm_v.observe(t),()=>{let n=q.get(t);n&&(n.delete(e),!n.size&&esm_v&&esm_v.unobserve(t))}}var $=new Set,esm_w,Xe=()=>{let e=()=>{$.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},Ie=e=>($.add(e),esm_w||(esm_w=Xe()),()=>{$.delete(e),!$.size&&esm_w&&(esm_w(),esm_w=void 0)});var ke=(e,{container:t=document.documentElement}={})=>t===document.documentElement?Ie(e):Fe(e,t);var Se=(e,t,r)=>t-e===0?1:(r-e)/(t-e);var Ye={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},esm_G=class{callback;container;info;constructor(t,r){this.callback=t,this.container=r,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}createAxis=()=>({current:0,progress:0,scrollLength:0});updateAxis=t=>{let r=this.info[t],{length:n,position:f}=Ye[t];r.current=this.container[`scroll${f}`],r.scrollLength=this.container["scroll"+n]-this.container["client"+n],r.progress=Se(0,r.scrollLength,r.current)};update=()=>{this.updateAxis("x"),this.updateAxis("y")};sendEvent=()=>{this.callback(this.info)};advance=()=>{this.update(),this.sendEvent()}};var esm_T=new WeakMap,Ae=new WeakMap,X=new WeakMap,Me=e=>e===document.documentElement?window:e,yr=(e,{container:t=document.documentElement}={})=>{let r=X.get(t);r||(r=new Set,X.set(t,r));let n=new esm_G(e,t);if(r.add(n),!esm_T.has(t)){let o=()=>(r?.forEach(s=>s.advance()),!0);esm_T.set(t,o);let i=Me(t);window.addEventListener("resize",o,{passive:!0}),t!==document.documentElement&&Ae.set(t,ke(o,{container:t})),i.addEventListener("scroll",o,{passive:!0})}let f=esm_T.get(t);return Re(f),()=>{Re.cancel(f);let o=X.get(t);if(!o||(o.delete(n),o.size))return;let i=esm_T.get(t);esm_T.delete(t),i&&(Me(t).removeEventListener("scroll",i),window.removeEventListener("resize",i),Ae.get(t)?.())}};function Er(e){let t=Je(null);return t.current===null&&(t.current=e()),t.current}var esm_Q=esm_h()?external_React_.useEffect:external_React_.useLayoutEffect;var Ce=()=>{let e=(0,external_React_.useRef)(!1);return esm_Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Mr(){let e=(0,external_React_.useState)()[1],t=Ce();return()=>{t.current&&e(Math.random())}}function Lr(e,t){let[r]=(0,external_React_.useState)(()=>({inputs:t,result:e()})),n=(0,external_React_.useRef)(),f=n.current,o=f;return o?t&&o.inputs&&it(t,o.inputs)||(o={inputs:t,result:e()}):o=r,(0,external_React_.useEffect)(()=>{n.current=o,f==r&&(r.inputs=r.result=void 0)},[o]),o.result}function it(e,t){if(e.length!==t.length)return!1;for(let r=0;r(0,external_React_.useEffect)(e,ut),ut=[];function Ur(e){let t=(0,external_React_.useRef)();return (0,external_React_.useEffect)(()=>{t.current=e}),t.current}var Wr=()=>{let[e,t]=dt(null);return esm_Q(()=>{let r=window.matchMedia("(prefers-reduced-motion)"),n=f=>{t(f.matches),U({skipAnimation:f.matches})};return n(r),r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),e}; +;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; -;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/esm/index.js -var dist_esm_h=Symbol.for("Animated:node"),dist_esm_v=e=>!!e&&e[dist_esm_h]===e,esm_k=e=>e&&e[dist_esm_h],esm_D=(e,t)=>mt(e,dist_esm_h,t),F=e=>e&&e[dist_esm_h]&&e[dist_esm_h].getPayload(),dist_esm_c=class{payload;constructor(){esm_D(this,this)}getPayload(){return this.payload||[]}};var dist_esm_l=class extends dist_esm_c{constructor(r){super();this._value=r;esm_l.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(r){return new dist_esm_l(r)}getPayload(){return[this]}getValue(){return this._value}setValue(r,n){return esm_l.num(r)&&(this.lastPosition=r,n&&(r=Math.round(r/n)*n,this.done&&(this.lastPosition=r))),this._value===r?!1:(this._value=r,!0)}reset(){let{done:r}=this;this.done=!1,esm_l.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,r&&(this.lastVelocity=null),this.v0=null)}};var dist_esm_d=class extends dist_esm_l{_string=null;_toString;constructor(t){super(0),this._toString=W({output:[t,t]})}static create(t){return new dist_esm_d(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(esm_l.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=W({output:[this.getValue(),t]})),this._value=0,super.reset()}};var esm_f={dependencies:null};var dist_esm_u=class extends dist_esm_c{constructor(r){super();this.source=r;this.setValue(r)}getValue(r){let n={};return xt(this.source,(a,i)=>{dist_esm_v(a)?n[i]=a.getValue(r):Pt(a)?n[i]=ve(a):r||(n[i]=a)}),n}setValue(r){this.source=r,this.payload=this._makePayload(r)}reset(){this.payload&&Ve(this.payload,r=>r.reset())}_makePayload(r){if(r){let n=new Set;return xt(r,this._addToPayload,n),Array.from(n)}}_addToPayload(r){esm_f.dependencies&&Pt(r)&&esm_f.dependencies.add(r);let n=F(r);n&&Ve(n,a=>this.add(a))}};var dist_esm_y=class extends dist_esm_u{constructor(t){super(t)}static create(t){return new dist_esm_y(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((n,a)=>n.setValue(t[a])).some(Boolean):(super.setValue(t.map(esm_z)),!0)}};function esm_z(e){return(esm_or(e)?dist_esm_d:dist_esm_l).create(e)}function esm_Le(e){let t=esm_k(e);return t?t.constructor:esm_l.arr(e)?dist_esm_y:esm_or(e)?dist_esm_d:dist_esm_l}var esm_x=(e,t)=>{let r=!esm_l.fun(e)||e.prototype&&e.prototype.isReactComponent;return (0,external_React_.forwardRef)((n,a)=>{let i=(0,external_React_.useRef)(null),o=r&&(0,external_React_.useCallback)(s=>{i.current=esm_ae(a,s)},[a]),[m,T]=esm_ne(n,t),W=Mr(),P=()=>{let s=i.current;if(r&&!s)return;(s?t.applyAnimatedValues(s,m.getValue(!0)):!1)===!1&&W()},_=new dist_esm_b(P,T),p=(0,external_React_.useRef)();esm_Q(()=>(p.current=_,Ve(T,s=>Gt(s,_)),()=>{p.current&&(Ve(p.current.deps,s=>Qt(s,p.current)),esm_n.cancel(p.current.update))})),(0,external_React_.useEffect)(P,[]),$r(()=>()=>{let s=p.current;Ve(s.deps,S=>Qt(S,s))});let $=t.getComponentProps(m.getValue());return external_React_.createElement(e,{...$,ref:o})})},dist_esm_b=class{constructor(t,r){this.update=t;this.deps=r}eventObserved(t){t.type=="change"&&esm_n.write(this.update)}};function esm_ne(e,t){let r=new Set;return esm_f.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new dist_esm_u(e),esm_f.dependencies=null,[e,r]}function esm_ae(e,t){return e&&(esm_l.fun(e)?e(t):e.current=t),t}var dist_esm_j=Symbol.for("AnimatedComponent"),esm_Ke=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=a=>new dist_esm_u(a),getComponentProps:n=a=>a}={})=>{let a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=o=>{let m=I(o)||"Anonymous";return esm_l.str(o)?o=i[o]||(i[o]=esm_x(o,a)):o=o[dist_esm_j]||(o[dist_esm_j]=esm_x(o,a)),o.displayName=`Animated(${m})`,o};return xt(e,(o,m)=>{esm_l.arr(e)&&(m=I(o)),i[m]=i(o)}),{animated:i}},I=e=>esm_l.str(e)?e:e&&esm_l.str(e.displayName)?e.displayName:esm_l.fun(e)&&e.name||null; +// src/globals.ts +var globals_exports = {}; +__export(globals_exports, { + assign: () => react_spring_shared_modern_assign, + colors: () => colors, + createStringInterpolator: () => createStringInterpolator, + skipAnimation: () => skipAnimation, + to: () => to, + willAdvance: () => willAdvance +}); -;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/esm/index.js -function esm_I(t,...e){return esm_l.fun(t)?t(...e):t}var esm_te=(t,e)=>t===!0||!!(e&&t&&(esm_l.fun(t)?t(e):ht(t).includes(e))),et=(t,e)=>esm_l.obj(t)?e&&t[e]:t;var esm_ke=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,nn=t=>t,dist_esm_ne=(t,e=nn)=>{let n=rn;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));let r={};for(let o of n){let s=e(t[o],o);esm_l.und(s)||(r[o]=s)}return r},rn=["config","onProps","onStart","onChange","onPause","onResume","onRest"],on={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sn(t){let e={},n=0;if(xt(t,(r,o)=>{on[o]||(e[o]=r,n++)}),n)return e}function esm_de(t){let e=sn(t);if(e){let n={to:e};return xt(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function esm_me(t){return t=ve(t),esm_l.arr(t)?t.map(esm_me):esm_or(t)?esm_p.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function esm_Ue(t){for(let e in t)return!0;return!1}function esm_Ee(t){return esm_l.fun(t)||esm_l.arr(t)&&esm_l.obj(t[0])}function esm_xe(t,e){t.ref?.delete(t),e?.delete(t)}function esm_he(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}function wr(t,e,n=1e3){an(()=>{if(e){let r=0;ge(t,(o,s)=>{let i=o.current;if(i.length){let a=n*e[s];isNaN(a)?a=r:r=a,ge(i,u=>{ge(u.queue,p=>{let f=p.delay;p.delay=d=>a+esm_I(f||0,d)})}),o.start()}})}else{let r=Promise.resolve();ge(t,o=>{let s=o.current;if(s.length){let i=s.map(a=>{let u=a.queue;return a.queue=[],u});r=r.then(()=>(ge(s,(a,u)=>ge(i[u]||[],p=>a.queue.push(p))),Promise.all(o.start())))}})}})}var esm_mt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};var tt={...esm_mt.default,mass:1,damping:1,easing:Lt.linear,clamp:!1},esm_we=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,tt)}};function gt(t,e,n){n&&(n={...n},esm_ht(n,e),e={...n,...e}),esm_ht(t,e),Object.assign(t,e);for(let i in tt)t[i]==null&&(t[i]=tt[i]);let{frequency:r,damping:o}=t,{mass:s}=t;return esm_l.und(r)||(r<.01&&(r=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/r,2)*s,t.friction=4*Math.PI*o*s/r),t}function esm_ht(t,e){if(!esm_l.und(e.decay))t.duration=void 0;else{let n=!esm_l.und(e.tension)||!esm_l.und(e.friction);(n||!esm_l.und(e.frequency)||!esm_l.und(e.damping)||!esm_l.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var esm_yt=[],dist_esm_Le=class{changed=!1;values=esm_yt;toValues=null;fromValues=esm_yt;to;from;config=new esm_we;immediate=!1};function esm_Me(t,{key:e,props:n,defaultProps:r,state:o,actions:s}){return new Promise((i,a)=>{let u,p,f=esm_te(n.cancel??r?.cancel,e);if(f)b();else{esm_l.und(n.pause)||(o.paused=esm_te(n.pause,e));let c=r?.pause;c!==!0&&(c=o.paused||esm_te(c,e)),u=esm_I(n.delay||0,e),c?(o.resumeQueue.add(m),s.pause()):(s.resume(),m())}function d(){o.resumeQueue.add(m),o.timeouts.delete(p),p.cancel(),u=p.time-esm_n.now()}function m(){u>0&&!esm_p.skipAnimation?(o.delayed=!0,p=esm_n.setTimeout(b,u),o.pauseQueue.add(d),o.timeouts.add(p)):b()}function b(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(p),t<=(o.cancelId||0)&&(f=!0);try{s.start({...n,callId:t,cancel:f},i)}catch(c){a(c)}}})}var esm_be=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?esm_q(t.get()):e.every(n=>n.noop)?nt(t.get()):esm_E(t.get(),e.every(n=>n.finished)),nt=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),esm_E=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),esm_q=t=>({value:t,cancelled:!0,finished:!1});function esm_De(t,e,n,r){let{callId:o,parentId:s,onRest:i}=e,{asyncTo:a,promise:u}=n;return!s&&t===a&&!e.reset?u:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;let p=dist_esm_ne(e,(l,h)=>h==="onRest"?void 0:l),f,d,m=new Promise((l,h)=>(f=l,d=h)),b=l=>{let h=o<=(n.cancelId||0)&&esm_q(r)||o!==n.asyncId&&esm_E(r,!1);if(h)throw l.result=h,d(l),l},c=(l,h)=>{let g=new esm_Ae,x=new esm_Ne;return(async()=>{if(esm_p.skipAnimation)throw esm_oe(n),x.result=esm_E(r,!1),d(x),x;b(g);let S=esm_l.obj(l)?{...l}:{...h,to:l};S.parentId=o,xt(p,(V,_)=>{esm_l.und(S[_])&&(S[_]=V)});let A=await r.start(S);return b(g),n.paused&&await new Promise(V=>{n.resumeQueue.add(V)}),A})()},P;if(esm_p.skipAnimation)return esm_oe(n),esm_E(r,!1);try{let l;esm_l.arr(t)?l=(async h=>{for(let g of h)await c(g)})(t):l=Promise.resolve(t(c,r.stop.bind(r))),await Promise.all([l.then(f),m]),P=esm_E(r.get(),!0,!1)}catch(l){if(l instanceof esm_Ae)P=l.result;else if(l instanceof esm_Ne)P=l.result;else throw l}finally{o==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?u:void 0)}return esm_l.fun(i)&&esm_n.batchedUpdates(()=>{i(P,r,r.item)}),P})()}function esm_oe(t,e){Pe(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var esm_Ae=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},esm_Ne=class extends Error{result;constructor(){super("SkipAnimationSignal")}};var esm_Re=t=>t instanceof esm_X,Sn=1,esm_X=class extends esm_ge{id=Sn++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=esm_k(this);return e&&e.getValue()}to(...e){return esm_p.to(this,e)}interpolate(...e){return Jt(),esm_p.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,n=!1){$t(this,{type:"change",parent:this,value:e,idle:n})}_onPriorityChange(e){this.idle||qe.sort(this),$t(this,{type:"priority",parent:this,priority:e})}};var esm_se=Symbol.for("SpringPhase"),esm_bt=1,rt=2,ot=4,esm_qe=t=>(t[esm_se]&esm_bt)>0,dist_esm_Q=t=>(t[esm_se]&rt)>0,esm_ye=t=>(t[esm_se]&ot)>0,st=(t,e)=>e?t[esm_se]|=rt|esm_bt:t[esm_se]&=~rt,esm_it=(t,e)=>e?t[esm_se]|=ot:t[esm_se]&=~ot;var esm_ue=class extends esm_X{key;animation=new dist_esm_Le;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,n){if(super(),!esm_l.und(e)||!esm_l.und(n)){let r=esm_l.obj(e)?{...e}:{...n,from:e};esm_l.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(dist_esm_Q(this)||this._state.asyncTo)||esm_ye(this)}get goal(){return ve(this.animation.to)}get velocity(){let e=esm_k(this);return e instanceof dist_esm_l?e.lastVelocity||0:e.getPayload().map(n=>n.lastVelocity||0)}get hasAnimated(){return esm_qe(this)}get isAnimating(){return dist_esm_Q(this)}get isPaused(){return esm_ye(this)}get isDelayed(){return this._state.delayed}advance(e){let n=!0,r=!1,o=this.animation,{toValues:s}=o,{config:i}=o,a=F(o.to);!a&&Pt(o.to)&&(s=ht(ve(o.to))),o.values.forEach((f,d)=>{if(f.done)return;let m=f.constructor==dist_esm_d?1:a?a[d].lastPosition:s[d],b=o.immediate,c=m;if(!b){if(c=f.lastPosition,i.tension<=0){f.done=!0;return}let P=f.elapsedTime+=e,l=o.fromValues[d],h=f.v0!=null?f.v0:f.v0=esm_l.arr(i.velocity)?i.velocity[d]:i.velocity,g,x=i.precision||(l==m?.005:Math.min(1,Math.abs(m-l)*.001));if(esm_l.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,A=Math.exp(-(1-S)*P);c=l+h/(1-S)*(1-A),b=Math.abs(f.lastPosition-c)<=x,g=h*A}else{g=f.lastVelocity==null?h:f.lastVelocity;let S=i.restVelocity||x/10,A=i.clamp?0:i.bounce,V=!esm_l.und(A),_=l==m?f.v0>0:lS,!(!v&&(b=Math.abs(m-c)<=x,b)));++L){V&&(w=c==m||c>m==_,w&&(g=-g*A,c=m));let N=-i.tension*1e-6*(c-m),y=-i.friction*.001*g,T=(N+y)/i.mass;g=g+T*C,c=c+g*C}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,f.durationProgress>0&&(f.elapsedTime=i.duration*f.durationProgress,P=f.elapsedTime+=e)),S=(i.progress||0)+P/this._memoizedDuration,S=S>1?1:S<0?0:S,f.durationProgress=S),c=l+i.easing(S)*(m-l),g=(c-f.lastPosition)/e,b=S==1}f.lastVelocity=g,Number.isNaN(c)&&(console.warn("Got NaN while animating:",this),b=!0)}a&&!a[d].done&&(b=!1),b?f.done=!0:n=!1,f.setValue(c,i.round)&&(r=!0)});let u=esm_k(this),p=u.getValue();if(n){let f=ve(o.to);(p!==f||r)&&!i.decay?(u.setValue(f),this._onChange(f)):r&&i.decay&&this._onChange(p),this._stop()}else r&&this._onChange(p)}set(e){return esm_n.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(dist_esm_Q(this)){let{to:e,config:n}=this.animation;esm_n.batchedUpdates(()=>{this._onStart(),n.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,n){let r;return esm_l.und(e)?(r=this.queue||[],this.queue=[]):r=[esm_l.obj(e)?e:{...n,to:e}],Promise.all(r.map(o=>this._update(o))).then(o=>esm_be(this,o))}stop(e){let{to:n}=this.animation;return this._focus(this.get()),esm_oe(this._state,e&&this._lastCallId),esm_n.batchedUpdates(()=>this._stop(n,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){let n=this.key||"",{to:r,from:o}=e;r=esm_l.obj(r)?r[n]:r,(r==null||esm_Ee(r))&&(r=void 0),o=esm_l.obj(o)?o[n]:o,o==null&&(o=void 0);let s={to:r,from:o};return esm_qe(this)||(e.reverse&&([r,o]=[o,r]),o=ve(o),esm_l.und(o)?esm_k(this)||this._set(r):this._set(o)),s}_update({...e},n){let{key:r,defaultProps:o}=this;e.default&&Object.assign(o,dist_esm_ne(e,(a,u)=>/^on/.test(u)?et(a,r):a)),_t(this,e,"onProps"),esm_Ie(this,"onProps",e,this);let s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return esm_Me(++this._lastCallId,{key:r,props:e,defaultProps:o,state:i,actions:{pause:()=>{esm_ye(this)||(esm_it(this,!0),yt(i.pauseQueue),esm_Ie(this,"onPause",esm_E(this,esm_Ce(this,this.animation.to)),this))},resume:()=>{esm_ye(this)&&(esm_it(this,!1),dist_esm_Q(this)&&this._resume(),yt(i.resumeQueue),esm_Ie(this,"onResume",esm_E(this,esm_Ce(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(a=>{if(e.loop&&a.finished&&!(n&&a.noop)){let u=at(e);if(u)return this._update(u,!0)}return a})}_merge(e,n,r){if(n.cancel)return this.stop(!0),r(esm_q(this));let o=!esm_l.und(e.to),s=!esm_l.und(e.from);if(o||s)if(n.callId>this._lastToId)this._lastToId=n.callId;else return r(esm_q(this));let{key:i,defaultProps:a,animation:u}=this,{to:p,from:f}=u,{to:d=p,from:m=f}=e;s&&!o&&(!n.default||esm_l.und(d))&&(d=m),n.reverse&&([d,m]=[m,d]);let b=!bt(m,f);b&&(u.from=m),m=ve(m);let c=!bt(d,p);c&&this._focus(d);let P=esm_Ee(n.to),{config:l}=u,{decay:h,velocity:g}=l;(o||s)&&(l.velocity=0),n.config&&!P&>(l,esm_I(n.config,i),n.config!==a.config?esm_I(a.config,i):void 0);let x=esm_k(this);if(!x||esm_l.und(d))return r(esm_E(this,!0));let S=esm_l.und(n.reset)?s&&!n.default:!esm_l.und(m)&&esm_te(n.reset,i),A=S?m:this.get(),V=esm_me(d),_=esm_l.num(V)||esm_l.arr(V)||esm_or(V),v=!P&&(!_||esm_te(a.immediate||n.immediate,i));if(c){let L=esm_Le(d);if(L!==x.constructor)if(v)x=this._set(V);else throw Error(`Cannot animate between ${x.constructor.name} and ${L.name}, as the "to" prop suggests`)}let w=x.constructor,C=Pt(d),$=!1;if(!C){let L=S||!esm_qe(this)&&b;(c||L)&&($=bt(esm_me(A),V),C=!$),(!bt(u.immediate,v)&&!v||!bt(l.decay,h)||!bt(l.velocity,g))&&(C=!0)}if($&&dist_esm_Q(this)&&(u.changed&&!S?C=!0:C||this._stop(p)),!P&&((C||Pt(p))&&(u.values=x.getPayload(),u.toValues=Pt(d)?null:w==dist_esm_d?[1]:ht(V)),u.immediate!=v&&(u.immediate=v,!v&&!S&&this._set(p)),C)){let{onRest:L}=u;Ve(_n,y=>_t(this,n,y));let N=esm_E(this,esm_Ce(this,p));yt(this._pendingCalls,N),this._pendingCalls.add(r),u.changed&&esm_n.batchedUpdates(()=>{u.changed=!S,L?.(N,this),S?esm_I(a.onRest,N):u.onStart?.(N,this)})}S&&this._set(A),P?r(esm_De(n.to,n,this._state,this)):C?this._start():dist_esm_Q(this)&&!c?this._pendingCalls.add(r):r(nt(A))}_focus(e){let n=this.animation;e!==n.to&&(esm_qt(this)&&this._detach(),n.to=e,esm_qt(this)&&this._attach())}_attach(){let e=0,{to:n}=this.animation;Pt(n)&&(Gt(n,this),esm_Re(n)&&(e=n.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Pt(e)&&Qt(e,this)}_set(e,n=!0){let r=ve(e);if(!esm_l.und(r)){let o=esm_k(this);if(!o||!bt(r,o.getValue())){let s=esm_Le(r);!o||o.constructor!=s?esm_D(this,s.create(r)):o.setValue(r),o&&esm_n.batchedUpdates(()=>{this._onChange(r,n)})}}return esm_k(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,esm_Ie(this,"onStart",esm_E(this,esm_Ce(this,e.to)),this))}_onChange(e,n){n||(this._onStart(),esm_I(this.animation.onChange,e,this)),esm_I(this.defaultProps.onChange,e,this),super._onChange(e,n)}_start(){let e=this.animation;esm_k(this).reset(ve(e.to)),e.immediate||(e.fromValues=e.values.map(n=>n.lastPosition)),dist_esm_Q(this)||(st(this,!0),esm_ye(this)||this._resume())}_resume(){esm_p.skipAnimation?this.finish():qe.start(this)}_stop(e,n){if(dist_esm_Q(this)){st(this,!1);let r=this.animation;Ve(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),$t(this,{type:"idle",parent:this});let o=n?esm_q(this.get()):esm_E(this.get(),esm_Ce(this,e??r.to));yt(this._pendingCalls,o),r.changed&&(r.changed=!1,esm_Ie(this,"onRest",o,this))}}};function esm_Ce(t,e){let n=esm_me(e),r=esm_me(t.get());return bt(r,n)}function at(t,e=t.loop,n=t.to){let r=esm_I(e);if(r){let o=r!==!0&&esm_de(r),s=(o||t).reverse,i=!o||o.reset;return esm_Pe({...t,loop:e,default:!1,pause:void 0,to:!s||esm_Ee(n)?n:void 0,from:i?t.from:void 0,reset:i,...o})}}function esm_Pe(t){let{to:e,from:n}=t=esm_de(t),r=new Set;return esm_l.obj(e)&&Vt(e,r),esm_l.obj(n)&&Vt(n,r),t.keys=r.size?Array.from(r):null,t}function Ot(t){let e=esm_Pe(t);return esm_l.und(e.default)&&(e.default=dist_esm_ne(e)),e}function Vt(t,e){xt(t,(n,r)=>n!=null&&e.add(r))}var _n=["onStart","onRest","onChange","onPause","onResume"];function _t(t,e,n){t.animation[n]=e[n]!==esm_ke(e,n)?et(e[n],t.key):void 0}function esm_Ie(t,e,...n){t.animation[e]?.(...n),t.defaultProps[e]?.(...n)}var Fn=["onStart","onChange","onRest"],kn=1,esm_le=class{id=kn++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,n){this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((n,r)=>e[r]=n.get()),e}set(e){for(let n in e){let r=e[n];esm_l.und(r)||this.springs[n].set(r)}}update(e){return e&&this.queue.push(esm_Pe(e)),this}start(e){let{queue:n}=this;return e?n=ht(e).map(esm_Pe):this.queue=[],this._flush?this._flush(this,n):(jt(this,n),esm_ze(this,n))}stop(e,n){if(e!==!!e&&(n=e),n){let r=this.springs;Ve(ht(n),o=>r[o].stop(!!e))}else esm_oe(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(esm_l.und(e))this.start({pause:!0});else{let n=this.springs;Ve(ht(e),r=>n[r].pause())}return this}resume(e){if(esm_l.und(e))this.start({pause:!1});else{let n=this.springs;Ve(ht(e),r=>n[r].resume())}return this}each(e){xt(this.springs,e)}_onFrame(){let{onStart:e,onChange:n,onRest:r}=this._events,o=this._active.size>0,s=this._changed.size>0;(o&&!this._started||s&&!this._started)&&(this._started=!0,Pe(e,([u,p])=>{p.value=this.get(),u(p,this,this._item)}));let i=!o&&this._started,a=s||i&&r.size?this.get():null;s&&n.size&&Pe(n,([u,p])=>{p.value=a,u(p,this,this._item)}),i&&(this._started=!1,Pe(r,([u,p])=>{p.value=a,u(p,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;esm_n.onFrame(this._onFrame)}};function esm_ze(t,e){return Promise.all(e.map(n=>wt(t,n))).then(n=>esm_be(t,n))}async function wt(t,e,n){let{keys:r,to:o,from:s,loop:i,onRest:a,onResolve:u}=e,p=esm_l.obj(e.default)&&e.default;i&&(e.loop=!1),o===!1&&(e.to=null),s===!1&&(e.from=null);let f=esm_l.arr(o)||esm_l.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,p&&(p.onRest=void 0)):Ve(Fn,P=>{let l=e[P];if(esm_l.fun(l)){let h=t._events[P];e[P]=({finished:g,cancelled:x})=>{let S=h.get(l);S?(g||(S.finished=!1),x&&(S.cancelled=!0)):h.set(l,{value:null,finished:g||!1,cancelled:x||!1})},p&&(p[P]=e[P])}});let d=t._state;e.pause===!d.paused?(d.paused=e.pause,yt(e.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(e.pause=!0);let m=(r||Object.keys(t.springs)).map(P=>t.springs[P].start(e)),b=e.cancel===!0||esm_ke(e,"cancel")===!0;(f||b&&d.asyncId)&&m.push(esm_Me(++t._lastAsyncId,{props:e,state:d,actions:{pause:Y,resume:Y,start(P,l){b?(esm_oe(d,t._lastAsyncId),l(esm_q(t))):(P.onRest=a,l(esm_De(f,P,d,t)))}}})),d.paused&&await new Promise(P=>{d.resumeQueue.add(P)});let c=esm_be(t,await Promise.all(m));if(i&&c.finished&&!(n&&c.noop)){let P=at(e,i,o);if(P)return jt(t,[P]),wt(t,P,!0)}return u&&esm_n.batchedUpdates(()=>u(c,t,t.item)),c}function esm_e(t,e){let n={...t.springs};return e&&Ve(ht(e),r=>{esm_l.und(r.keys)&&(r=esm_Pe(r)),esm_l.obj(r.to)||(r={...r,to:void 0}),Mt(n,r,o=>esm_Lt(o))}),pt(t,n),n}function pt(t,e){xt(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Gt(n,t))})}function esm_Lt(t,e){let n=new esm_ue;return n.key=t,e&&Gt(n,e),n}function Mt(t,e,n){e.keys&&Ve(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function jt(t,e){Ve(e,n=>{Mt(t.springs,n,r=>esm_Lt(r,t))})}var esm_H=({children:t,...e})=>{let n=(0,external_React_.useContext)(esm_Ge),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=Lr(()=>({pause:r,immediate:o}),[r,o]);let{Provider:s}=esm_Ge;return external_React_.createElement(s,{value:e},t)},esm_Ge=wn(esm_H,{});esm_H.Provider=esm_Ge.Provider;esm_H.Consumer=esm_Ge.Consumer;function wn(t,e){return Object.assign(t,external_React_.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}var esm_fe=()=>{let t=[],e=function(r){er();let o=[];return Ve(t,(s,i)=>{if(esm_l.und(r))o.push(s.start());else{let a=n(r,s,i);a&&o.push(s.start(a))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){let o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return Ve(t,r=>r.pause(...arguments)),this},e.resume=function(){return Ve(t,r=>r.resume(...arguments)),this},e.set=function(r){Ve(t,(o,s)=>{let i=esm_l.fun(r)?r(s,o):r;i&&o.set(i)})},e.start=function(r){let o=[];return Ve(t,(s,i)=>{if(esm_l.und(r))o.push(s.start());else{let a=this._getProps(r,s,i);a&&o.push(s.start(a))}}),o},e.stop=function(){return Ve(t,r=>r.stop(...arguments)),this},e.update=function(r){return Ve(t,(o,s)=>o.update(this._getProps(r,o,s))),this};let n=function(r,o,s){return esm_l.fun(r)?r(s,o):r};return e._getProps=n,e};function esm_He(t,e,n){let r=esm_l.fun(e)&&e;r&&!n&&(n=[]);let o=(0,external_React_.useMemo)(()=>r||arguments.length==3?esm_fe():void 0,[]),s=(0,external_React_.useRef)(0),i=Mr(),a=(0,external_React_.useMemo)(()=>({ctrls:[],queue:[],flush(h,g){let x=esm_e(h,g);return s.current>0&&!a.queue.length&&!Object.keys(x).some(A=>!h.springs[A])?esm_ze(h,g):new Promise(A=>{pt(h,x),a.queue.push(()=>{A(esm_ze(h,g))}),i()})}}),[]),u=(0,external_React_.useRef)([...a.ctrls]),p=[],f=Ur(t)||0;(0,external_React_.useMemo)(()=>{Ve(u.current.slice(t,f),h=>{esm_xe(h,o),h.stop(!0)}),u.current.length=t,d(f,t)},[t]),(0,external_React_.useMemo)(()=>{d(0,Math.min(f,t))},n);function d(h,g){for(let x=h;xesm_e(h,p[g])),b=(0,external_React_.useContext)(esm_H),c=Ur(b),P=b!==c&&esm_Ue(b);esm_Q(()=>{s.current++,a.ctrls=u.current;let{queue:h}=a;h.length&&(a.queue=[],Ve(h,g=>g())),Ve(u.current,(g,x)=>{o?.add(g),P&&g.start({default:b});let S=p[x];S&&(esm_he(g,S.ref),g.ref?g.queue.push(S):g.start(S))})}),$r(()=>()=>{Ve(a.ctrls,h=>h.stop(!0))});let l=m.map(h=>({...h}));return o?[l,o]:l}function esm_J(t,e){let n=esm_l.fun(t),[[r],o]=esm_He(1,n?t:[t],n?e||[]:e);return n||arguments.length==2?[r,o]:r}var Gn=()=>esm_fe(),Xo=()=>zn(Gn)[0];var Wo=(t,e)=>{let n=Bn(()=>new esm_ue(t,e));return Kn(()=>()=>{n.stop()}),n};function esm_Qt(t,e,n){let r=qt.fun(e)&&e;r&&!n&&(n=[]);let o=!0,s,i=esm_He(t,(a,u)=>{let p=r?r(a,u):e;return s=p.ref,o=o&&p.reverse,p},n||[{}]);if(Yn(()=>{Xn(i[1].current,(a,u)=>{let p=i[1].current[u+(o?1:-1)];if(esm_he(a,s),a.ref){p&&a.update({to:p.springs});return}p?a.start({to:p.springs}):a.start()})},n),r||arguments.length==3){let a=s??i[1];return a._getProps=(u,p,f)=>{let d=qt.fun(u)?u(f,p):u;if(d){let m=a.current[f+(d.reverse?1:-1)];return m&&(d.to=m.springs),d}},i}return i[0]}function esm_Gt(t,e,n){let r=G.fun(e)&&e,{reset:o,sort:s,trail:i=0,expires:a=!0,exitBeforeEnter:u=!1,onDestroyed:p,ref:f,config:d}=r?r():e,m=Jn(()=>r||arguments.length==3?esm_fe():void 0,[]),b=zt(t),c=[],P=lt(null),l=o?null:P.current;Je(()=>{P.current=c}),$n(()=>(j(c,y=>{m?.add(y.ctrl),y.ctrl.ref=m}),()=>{j(P.current,y=>{y.expired&&clearTimeout(y.expirationId),esm_xe(y.ctrl,m),y.ctrl.stop(!0)})}));let h=tr(b,r?r():e,l),g=o&&P.current||[];Je(()=>j(g,({ctrl:y,item:T,key:F})=>{esm_xe(y,m),esm_I(p,T,F)}));let x=[];if(l&&j(l,(y,T)=>{y.expired?(clearTimeout(y.expirationId),g.push(y)):(T=x[T]=h.indexOf(y.key),~T&&(c[T]=y))}),j(b,(y,T)=>{c[T]||(c[T]={key:h[T],item:y,phase:"mount",ctrl:new esm_le},c[T].ctrl.item=y)}),x.length){let y=-1,{leave:T}=r?r():e;j(x,(F,k)=>{let O=l[k];~F?(y=c.indexOf(O),c[y]={...O,item:b[F]}):T&&c.splice(++y,0,O)})}G.fun(s)&&c.sort((y,T)=>s(y.item,T.item));let S=-i,A=Wn(),V=dist_esm_ne(e),_=new Map,v=lt(new Map),w=lt(!1);j(c,(y,T)=>{let F=y.key,k=y.phase,O=r?r():e,U,D,Jt=esm_I(O.delay||0,F);if(k=="mount")U=O.enter,D="enter";else{let M=h.indexOf(F)<0;if(k!="leave")if(M)U=O.leave,D="leave";else if(U=O.update)D="update";else return;else if(!M)U=O.enter,D="enter";else return}if(U=esm_I(U,y.item,T),U=G.obj(U)?esm_de(U):{to:U},!U.config){let M=d||V.config;U.config=esm_I(M,y.item,T,D)}S+=i;let Z={...V,delay:Jt+S,ref:f,immediate:O.immediate,reset:!1,...U};if(D=="enter"&&G.und(Z.from)){let M=r?r():e,Te=G.und(M.initial)||l?M.from:M.initial;Z.from=esm_I(Te,y.item,T)}let{onResolve:Wt}=Z;Z.onResolve=M=>{esm_I(Wt,M);let Te=P.current,B=Te.find(Fe=>Fe.key===F);if(B&&!(M.cancelled&&B.phase!="update")&&B.ctrl.idle){let Fe=Te.every(ee=>ee.ctrl.idle);if(B.phase=="leave"){let ee=esm_I(a,B.item);if(ee!==!1){let Ze=ee===!0?0:ee;if(B.expired=!0,!Fe&&Ze>0){Ze<=2147483647&&(B.expirationId=setTimeout(A,Ze));return}}}Fe&&Te.some(ee=>ee.expired)&&(v.current.delete(B),u&&(w.current=!0),A())}};let ft=esm_e(y.ctrl,Z);D==="leave"&&u?v.current.set(y,{phase:D,springs:ft,payload:Z}):_.set(y,{phase:D,springs:ft,payload:Z})});let C=Hn(esm_H),$=Zn(C),L=C!==$&&esm_Ue(C);Je(()=>{L&&j(c,y=>{y.ctrl.start({default:C})})},[C]),j(_,(y,T)=>{if(v.current.size){let F=c.findIndex(k=>k.key===T.key);c.splice(F,1)}}),Je(()=>{j(v.current.size?v.current:_,({phase:y,payload:T},F)=>{let{ctrl:k}=F;F.phase=y,m?.add(k),L&&y=="enter"&&k.start({default:C}),T&&(esm_he(k,T.ref),(k.ref||m)&&!w.current?k.update(T):(k.start(T),w.current&&(w.current=!1)))})},o?void 0:n);let N=y=>Oe.createElement(Oe.Fragment,null,c.map((T,F)=>{let{springs:k}=_.get(T)||T.ctrl,O=y({...k},T.item,T,F);return O&&O.type?Oe.createElement(O.type,{...O.props,key:G.str(T.key)||G.num(T.key)?T.key:T.ctrl.id,ref:O.ref}):O}));return m?[N,m]:N}var esm_er=1;function tr(t,{key:e,keys:n=e},r){if(n===null){let o=new Set;return t.map(s=>{let i=r&&r.find(a=>a.item===s&&a.phase!=="leave"&&!o.has(a));return i?(o.add(i),i.key):esm_er++})}return G.und(n)?t:G.fun(n)?t.map(n):zt(n)}var hs=({container:t,...e}={})=>{let[n,r]=esm_J(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...e}),[]);return or(()=>{let o=rr(({x:s,y:i})=>{r.start({scrollX:s.current,scrollXProgress:s.progress,scrollY:i.current,scrollYProgress:i.progress})},{container:t?.current||void 0});return()=>{nr(Object.values(n),s=>s.stop()),o()}},[]),n};var Ps=({container:t,...e})=>{let[n,r]=esm_J(()=>({width:0,height:0,...e}),[]);return ar(()=>{let o=sr(({width:s,height:i})=>{r.start({width:s,height:i,immediate:n.width.get()===0||n.height.get()===0})},{container:t?.current||void 0});return()=>{ir(Object.values(n),s=>s.stop()),o()}},[]),n};var cr={any:0,all:1};function Cs(t,e){let[n,r]=pr(!1),o=ur(),s=Bt.fun(t)&&t,i=s?s():{},{to:a={},from:u={},...p}=i,f=s?e:t,[d,m]=esm_J(()=>({from:u,...p}),[]);return lr(()=>{let b=o.current,{root:c,once:P,amount:l="any",...h}=f??{};if(!b||P&&n||typeof IntersectionObserver>"u")return;let g=new WeakMap,x=()=>(a&&m.start(a),r(!0),P?void 0:()=>{u&&m.start(u),r(!1)}),S=V=>{V.forEach(_=>{let v=g.get(_.target);if(_.isIntersecting!==!!v)if(_.isIntersecting){let w=x();Bt.fun(w)?g.set(_.target,w):A.unobserve(_.target)}else v&&(v(),g.delete(_.target))})},A=new IntersectionObserver(S,{root:c&&c.current||void 0,threshold:typeof l=="number"||Array.isArray(l)?l:cr[l],...h});return A.observe(b),()=>A.unobserve(b)},[f]),s?[o,d]:[o,n]}function qs({children:t,...e}){return t(esm_J(e))}function Bs({items:t,children:e,...n}){let r=esm_Qt(t.length,n);return t.map((o,s)=>{let i=e(o,s);return fr.fun(i)?i(r[s]):i})}function Ys({items:t,children:e,...n}){return esm_Gt(t,n)(e)}var esm_W=class extends esm_X{constructor(n,r){super();this.source=n;this.calc=W(...r);let o=this._get(),s=esm_Le(o);esm_D(this,s.create(o))}key;idle=!0;calc;_active=new Set;advance(n){let r=this._get(),o=this.get();bt(r,o)||(esm_k(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Yt(this._active)&&ct(this)}_get(){let n=esm_l.arr(this.source)?this.source.map(ve):ht(ve(this.source));return this.calc(...n)}_start(){this.idle&&!Yt(this._active)&&(this.idle=!1,Ve(F(this),n=>{n.done=!1}),esm_p.skipAnimation?(esm_n.batchedUpdates(()=>this.advance()),ct(this)):qe.start(this))}_attach(){let n=1;Ve(ht(this.source),r=>{Pt(r)&&Gt(r,this),esm_Re(r)&&(r.idle||this._active.add(r),n=Math.max(n,r.priority+1))}),this.priority=n,this._start()}_detach(){Ve(ht(this.source),n=>{Pt(n)&&Qt(n,this)}),this._active.clear(),ct(this)}eventObserved(n){n.type=="change"?n.idle?this.advance():(this._active.add(n.parent),this._start()):n.type=="idle"?this._active.delete(n.parent):n.type=="priority"&&(this.priority=ht(this.source).reduce((r,o)=>Math.max(r,(esm_Re(o)?o.priority:0)+1),0))}};function vr(t){return t.idle!==!1}function Yt(t){return!t.size||Array.from(t).every(vr)}function ct(t){t.idle||(t.idle=!0,Ve(F(t),e=>{e.done=!0}),$t(t,{type:"idle",parent:t}))}var esm_ui=(t,...e)=>new esm_W(t,e),pi=(t,...e)=>(Cr(),new esm_W(t,e));esm_p.assign({createStringInterpolator:Xt,to:(t,e)=>new esm_W(t,e)});var di=qe.advance; +// ../rafz/dist/react-spring_rafz.modern.mjs +var updateQueue = makeQueue(); +var raf = (fn) => schedule(fn, updateQueue); +var writeQueue = makeQueue(); +raf.write = (fn) => schedule(fn, writeQueue); +var onStartQueue = makeQueue(); +raf.onStart = (fn) => schedule(fn, onStartQueue); +var onFrameQueue = makeQueue(); +raf.onFrame = (fn) => schedule(fn, onFrameQueue); +var onFinishQueue = makeQueue(); +raf.onFinish = (fn) => schedule(fn, onFinishQueue); +var timeouts = []; +raf.setTimeout = (handler, ms) => { + const time = raf.now() + ms; + const cancel = () => { + const i = timeouts.findIndex((t) => t.cancel == cancel); + if (~i) + timeouts.splice(i, 1); + pendingCount -= ~i ? 1 : 0; + }; + const timeout = { time, handler, cancel }; + timeouts.splice(findTimeout(time), 0, timeout); + pendingCount += 1; + start(); + return timeout; +}; +var findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length); +raf.cancel = (fn) => { + onStartQueue.delete(fn); + onFrameQueue.delete(fn); + onFinishQueue.delete(fn); + updateQueue.delete(fn); + writeQueue.delete(fn); +}; +raf.sync = (fn) => { + sync = true; + raf.batchedUpdates(fn); + sync = false; +}; +raf.throttle = (fn) => { + let lastArgs; + function queuedFn() { + try { + fn(...lastArgs); + } finally { + lastArgs = null; + } + } + function throttled(...args) { + lastArgs = args; + raf.onStart(queuedFn); + } + throttled.handler = fn; + throttled.cancel = () => { + onStartQueue.delete(queuedFn); + lastArgs = null; + }; + return throttled; +}; +var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : ( + // eslint-disable-next-line @typescript-eslint/no-empty-function + () => { + } +); +raf.use = (impl) => nativeRaf = impl; +raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now; +raf.batchedUpdates = (fn) => fn(); +raf.catch = console.error; +raf.frameLoop = "always"; +raf.advance = () => { + if (raf.frameLoop !== "demand") { + console.warn( + "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" + ); + } else { + update(); + } +}; +var ts = -1; +var pendingCount = 0; +var sync = false; +function schedule(fn, queue) { + if (sync) { + queue.delete(fn); + fn(0); + } else { + queue.add(fn); + start(); + } +} +function start() { + if (ts < 0) { + ts = 0; + if (raf.frameLoop !== "demand") { + nativeRaf(loop); + } + } +} +function stop() { + ts = -1; +} +function loop() { + if (~ts) { + nativeRaf(loop); + raf.batchedUpdates(update); + } +} +function update() { + const prevTs = ts; + ts = raf.now(); + const count = findTimeout(ts); + if (count) { + eachSafely(timeouts.splice(0, count), (t) => t.handler()); + pendingCount -= count; + } + if (!pendingCount) { + stop(); + return; + } + onStartQueue.flush(); + updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667); + onFrameQueue.flush(); + writeQueue.flush(); + onFinishQueue.flush(); +} +function makeQueue() { + let next = /* @__PURE__ */ new Set(); + let current = next; + return { + add(fn) { + pendingCount += current == next && !next.has(fn) ? 1 : 0; + next.add(fn); + }, + delete(fn) { + pendingCount -= current == next && next.has(fn) ? 1 : 0; + return next.delete(fn); + }, + flush(arg) { + if (current.size) { + next = /* @__PURE__ */ new Set(); + pendingCount -= current.size; + eachSafely(current, (fn) => fn(arg) && next.add(fn)); + pendingCount += next.size; + current = next; + } + } + }; +} +function eachSafely(values, each2) { + values.forEach((value) => { + try { + each2(value); + } catch (e) { + raf.catch(e); + } + }); +} +// src/helpers.ts +function noop() { +} +var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, { value, writable: true, configurable: true }); +var is = { + arr: Array.isArray, + obj: (a) => !!a && a.constructor.name === "Object", + fun: (a) => typeof a === "function", + str: (a) => typeof a === "string", + num: (a) => typeof a === "number", + und: (a) => a === void 0 +}; +function isEqual(a, b) { + if (is.arr(a)) { + if (!is.arr(b) || a.length !== b.length) + return false; + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) + return false; + } + return true; + } + return a === b; +} +var react_spring_shared_modern_each = (obj, fn) => obj.forEach(fn); +function eachProp(obj, fn, ctx) { + if (is.arr(obj)) { + for (let i = 0; i < obj.length; i++) { + fn.call(ctx, obj[i], `${i}`); + } + return; + } + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + fn.call(ctx, obj[key], key); + } + } +} +var toArray = (a) => is.und(a) ? [] : is.arr(a) ? a : [a]; +function flush(queue, iterator) { + if (queue.size) { + const items = Array.from(queue); + queue.clear(); + react_spring_shared_modern_each(items, iterator); + } +} +var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args)); +var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent); + +// src/globals.ts +var createStringInterpolator; +var to; +var colors = null; +var skipAnimation = false; +var willAdvance = noop; +var react_spring_shared_modern_assign = (globals) => { + if (globals.to) + to = globals.to; + if (globals.now) + raf.now = globals.now; + if (globals.colors !== void 0) + colors = globals.colors; + if (globals.skipAnimation != null) + skipAnimation = globals.skipAnimation; + if (globals.createStringInterpolator) + createStringInterpolator = globals.createStringInterpolator; + if (globals.requestAnimationFrame) + raf.use(globals.requestAnimationFrame); + if (globals.batchedUpdates) + raf.batchedUpdates = globals.batchedUpdates; + if (globals.willAdvance) + willAdvance = globals.willAdvance; + if (globals.frameLoop) + raf.frameLoop = globals.frameLoop; +}; + +// src/FrameLoop.ts +var startQueue = /* @__PURE__ */ new Set(); +var currentFrame = []; +var prevFrame = []; +var priority = 0; +var frameLoop = { + get idle() { + return !startQueue.size && !currentFrame.length; + }, + /** Advance the given animation on every frame until idle. */ + start(animation) { + if (priority > animation.priority) { + startQueue.add(animation); + raf.onStart(flushStartQueue); + } else { + startSafely(animation); + raf(advance); + } + }, + /** Advance all animations by the given time. */ + advance, + /** Call this when an animation's priority changes. */ + sort(animation) { + if (priority) { + raf.onFrame(() => frameLoop.sort(animation)); + } else { + const prevIndex = currentFrame.indexOf(animation); + if (~prevIndex) { + currentFrame.splice(prevIndex, 1); + startUnsafely(animation); + } + } + }, + /** + * Clear all animations. For testing purposes. + * + * ☠️ Never call this from within the frameloop. + */ + clear() { + currentFrame = []; + startQueue.clear(); + } +}; +function flushStartQueue() { + startQueue.forEach(startSafely); + startQueue.clear(); + raf(advance); +} +function startSafely(animation) { + if (!currentFrame.includes(animation)) + startUnsafely(animation); +} +function startUnsafely(animation) { + currentFrame.splice( + findIndex(currentFrame, (other) => other.priority > animation.priority), + 0, + animation + ); +} +function advance(dt) { + const nextFrame = prevFrame; + for (let i = 0; i < currentFrame.length; i++) { + const animation = currentFrame[i]; + priority = animation.priority; + if (!animation.idle) { + willAdvance(animation); + animation.advance(dt); + if (!animation.idle) { + nextFrame.push(animation); + } + } + } + priority = 0; + prevFrame = currentFrame; + prevFrame.length = 0; + currentFrame = nextFrame; + return currentFrame.length > 0; +} +function findIndex(arr, test) { + const index = arr.findIndex(test); + return index < 0 ? arr.length : index; +} + +// src/clamp.ts +var clamp = (min, max, v) => Math.min(Math.max(v, min), max); + +// src/colors.ts +var colors2 = { + transparent: 0, + aliceblue: 4042850303, + antiquewhite: 4209760255, + aqua: 16777215, + aquamarine: 2147472639, + azure: 4043309055, + beige: 4126530815, + bisque: 4293182719, + black: 255, + blanchedalmond: 4293643775, + blue: 65535, + blueviolet: 2318131967, + brown: 2771004159, + burlywood: 3736635391, + burntsienna: 3934150143, + cadetblue: 1604231423, + chartreuse: 2147418367, + chocolate: 3530104575, + coral: 4286533887, + cornflowerblue: 1687547391, + cornsilk: 4294499583, + crimson: 3692313855, + cyan: 16777215, + darkblue: 35839, + darkcyan: 9145343, + darkgoldenrod: 3095792639, + darkgray: 2846468607, + darkgreen: 6553855, + darkgrey: 2846468607, + darkkhaki: 3182914559, + darkmagenta: 2332068863, + darkolivegreen: 1433087999, + darkorange: 4287365375, + darkorchid: 2570243327, + darkred: 2332033279, + darksalmon: 3918953215, + darkseagreen: 2411499519, + darkslateblue: 1211993087, + darkslategray: 793726975, + darkslategrey: 793726975, + darkturquoise: 13554175, + darkviolet: 2483082239, + deeppink: 4279538687, + deepskyblue: 12582911, + dimgray: 1768516095, + dimgrey: 1768516095, + dodgerblue: 512819199, + firebrick: 2988581631, + floralwhite: 4294635775, + forestgreen: 579543807, + fuchsia: 4278255615, + gainsboro: 3705462015, + ghostwhite: 4177068031, + gold: 4292280575, + goldenrod: 3668254975, + gray: 2155905279, + green: 8388863, + greenyellow: 2919182335, + grey: 2155905279, + honeydew: 4043305215, + hotpink: 4285117695, + indianred: 3445382399, + indigo: 1258324735, + ivory: 4294963455, + khaki: 4041641215, + lavender: 3873897215, + lavenderblush: 4293981695, + lawngreen: 2096890111, + lemonchiffon: 4294626815, + lightblue: 2916673279, + lightcoral: 4034953471, + lightcyan: 3774873599, + lightgoldenrodyellow: 4210742015, + lightgray: 3553874943, + lightgreen: 2431553791, + lightgrey: 3553874943, + lightpink: 4290167295, + lightsalmon: 4288707327, + lightseagreen: 548580095, + lightskyblue: 2278488831, + lightslategray: 2005441023, + lightslategrey: 2005441023, + lightsteelblue: 2965692159, + lightyellow: 4294959359, + lime: 16711935, + limegreen: 852308735, + linen: 4210091775, + magenta: 4278255615, + maroon: 2147483903, + mediumaquamarine: 1724754687, + mediumblue: 52735, + mediumorchid: 3126187007, + mediumpurple: 2473647103, + mediumseagreen: 1018393087, + mediumslateblue: 2070474495, + mediumspringgreen: 16423679, + mediumturquoise: 1221709055, + mediumvioletred: 3340076543, + midnightblue: 421097727, + mintcream: 4127193855, + mistyrose: 4293190143, + moccasin: 4293178879, + navajowhite: 4292783615, + navy: 33023, + oldlace: 4260751103, + olive: 2155872511, + olivedrab: 1804477439, + orange: 4289003775, + orangered: 4282712319, + orchid: 3664828159, + palegoldenrod: 4008225535, + palegreen: 2566625535, + paleturquoise: 2951671551, + palevioletred: 3681588223, + papayawhip: 4293907967, + peachpuff: 4292524543, + peru: 3448061951, + pink: 4290825215, + plum: 3718307327, + powderblue: 2967529215, + purple: 2147516671, + rebeccapurple: 1714657791, + red: 4278190335, + rosybrown: 3163525119, + royalblue: 1097458175, + saddlebrown: 2336560127, + salmon: 4202722047, + sandybrown: 4104413439, + seagreen: 780883967, + seashell: 4294307583, + sienna: 2689740287, + silver: 3233857791, + skyblue: 2278484991, + slateblue: 1784335871, + slategray: 1887473919, + slategrey: 1887473919, + snow: 4294638335, + springgreen: 16744447, + steelblue: 1182971135, + tan: 3535047935, + teal: 8421631, + thistle: 3636451583, + tomato: 4284696575, + turquoise: 1088475391, + violet: 4001558271, + wheat: 4125012991, + white: 4294967295, + whitesmoke: 4126537215, + yellow: 4294902015, + yellowgreen: 2597139199 +}; + +// src/colorMatchers.ts +var NUMBER = "[-+]?\\d*\\.?\\d+"; +var PERCENTAGE = NUMBER + "%"; +function call(...parts) { + return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)"; +} +var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER)); +var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER)); +var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE)); +var hsla = new RegExp( + "hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +); +var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex6 = /^#([0-9a-fA-F]{6})$/; +var hex8 = /^#([0-9a-fA-F]{8})$/; + +// src/normalizeColor.ts +function normalizeColor(color) { + let match; + if (typeof color === "number") { + return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null; + } + if (match = hex6.exec(color)) + return parseInt(match[1] + "ff", 16) >>> 0; + if (colors && colors[color] !== void 0) { + return colors[color]; + } + if (match = rgb.exec(color)) { + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + 255) >>> // a + 0; + } + if (match = rgba.exec(color)) { + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + parse1(match[4])) >>> // a + 0; + } + if (match = hex3.exec(color)) { + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + "ff", + // a + 16 + ) >>> 0; + } + if (match = hex8.exec(color)) + return parseInt(match[1], 16) >>> 0; + if (match = hex4.exec(color)) { + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + match[4] + match[4], + // a + 16 + ) >>> 0; + } + if (match = hsl.exec(color)) { + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | 255) >>> // a + 0; + } + if (match = hsla.exec(color)) { + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | parse1(match[4])) >>> // a + 0; + } + return null; +} +function hue2rgb(p, q, t) { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; + return p; +} +function hslToRgb(h, s, l) { + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + const r = hue2rgb(p, q, h + 1 / 3); + const g = hue2rgb(p, q, h); + const b = hue2rgb(p, q, h - 1 / 3); + return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8; +} +function parse255(str) { + const int = parseInt(str, 10); + if (int < 0) + return 0; + if (int > 255) + return 255; + return int; +} +function parse360(str) { + const int = parseFloat(str); + return (int % 360 + 360) % 360 / 360; +} +function parse1(str) { + const num = parseFloat(str); + if (num < 0) + return 0; + if (num > 1) + return 255; + return Math.round(num * 255); +} +function parsePercentage(str) { + const int = parseFloat(str); + if (int < 0) + return 0; + if (int > 100) + return 1; + return int / 100; +} + +// src/colorToRgba.ts +function colorToRgba(input) { + let int32Color = normalizeColor(input); + if (int32Color === null) + return input; + int32Color = int32Color || 0; + const r = (int32Color & 4278190080) >>> 24; + const g = (int32Color & 16711680) >>> 16; + const b = (int32Color & 65280) >>> 8; + const a = (int32Color & 255) / 255; + return `rgba(${r}, ${g}, ${b}, ${a})`; +} + +// src/createInterpolator.ts +var createInterpolator = (range, output, extrapolate) => { + if (is.fun(range)) { + return range; + } + if (is.arr(range)) { + return createInterpolator({ + range, + output, + extrapolate + }); + } + if (is.str(range.output[0])) { + return createStringInterpolator(range); + } + const config = range; + const outputRange = config.output; + const inputRange = config.range || [0, 1]; + const extrapolateLeft = config.extrapolateLeft || config.extrapolate || "extend"; + const extrapolateRight = config.extrapolateRight || config.extrapolate || "extend"; + const easing = config.easing || ((t) => t); + return (input) => { + const range2 = findRange(input, inputRange); + return interpolate( + input, + inputRange[range2], + inputRange[range2 + 1], + outputRange[range2], + outputRange[range2 + 1], + easing, + extrapolateLeft, + extrapolateRight, + config.map + ); + }; +}; +function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) { + let result = map ? map(input) : input; + if (result < inputMin) { + if (extrapolateLeft === "identity") + return result; + else if (extrapolateLeft === "clamp") + result = inputMin; + } + if (result > inputMax) { + if (extrapolateRight === "identity") + return result; + else if (extrapolateRight === "clamp") + result = inputMax; + } + if (outputMin === outputMax) + return outputMin; + if (inputMin === inputMax) + return input <= inputMin ? outputMin : outputMax; + if (inputMin === -Infinity) + result = -result; + else if (inputMax === Infinity) + result = result - inputMin; + else + result = (result - inputMin) / (inputMax - inputMin); + result = easing(result); + if (outputMin === -Infinity) + result = -result; + else if (outputMax === Infinity) + result = result + outputMin; + else + result = result * (outputMax - outputMin) + outputMin; + return result; +} +function findRange(input, inputRange) { + for (var i = 1; i < inputRange.length - 1; ++i) + if (inputRange[i] >= input) + break; + return i - 1; +} + +// src/easings.ts +var steps = (steps2, direction = "end") => (progress2) => { + progress2 = direction === "end" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3); + const expanded = progress2 * steps2; + const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); + return clamp(0, 1, rounded / steps2); +}; +var c1 = 1.70158; +var c2 = c1 * 1.525; +var c3 = c1 + 1; +var c4 = 2 * Math.PI / 3; +var c5 = 2 * Math.PI / 4.5; +var bounceOut = (x) => { + const n1 = 7.5625; + const d1 = 2.75; + if (x < 1 / d1) { + return n1 * x * x; + } else if (x < 2 / d1) { + return n1 * (x -= 1.5 / d1) * x + 0.75; + } else if (x < 2.5 / d1) { + return n1 * (x -= 2.25 / d1) * x + 0.9375; + } else { + return n1 * (x -= 2.625 / d1) * x + 0.984375; + } +}; +var easings = { + linear: (x) => x, + easeInQuad: (x) => x * x, + easeOutQuad: (x) => 1 - (1 - x) * (1 - x), + easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2, + easeInCubic: (x) => x * x * x, + easeOutCubic: (x) => 1 - Math.pow(1 - x, 3), + easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2, + easeInQuart: (x) => x * x * x * x, + easeOutQuart: (x) => 1 - Math.pow(1 - x, 4), + easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2, + easeInQuint: (x) => x * x * x * x * x, + easeOutQuint: (x) => 1 - Math.pow(1 - x, 5), + easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2, + easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2), + easeOutSine: (x) => Math.sin(x * Math.PI / 2), + easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2, + easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10), + easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x), + easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2, + easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)), + easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)), + easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2, + easeInBack: (x) => c3 * x * x * x - c1 * x * x, + easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2), + easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2, + easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4), + easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1, + easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1, + easeInBounce: (x) => 1 - bounceOut(1 - x), + easeOutBounce: bounceOut, + easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2, + steps +}; + +// src/fluids.ts +var $get = Symbol.for("FluidValue.get"); +var $observers = Symbol.for("FluidValue.observers"); +var hasFluidValue = (arg) => Boolean(arg && arg[$get]); +var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg; +var getFluidObservers = (target) => target[$observers] || null; +function callFluidObserver(observer2, event) { + if (observer2.eventObserved) { + observer2.eventObserved(event); + } else { + observer2(event); + } +} +function callFluidObservers(target, event) { + const observers = target[$observers]; + if (observers) { + observers.forEach((observer2) => { + callFluidObserver(observer2, event); + }); + } +} +var FluidValue = class { + constructor(get) { + if (!get && !(get = this.get)) { + throw Error("Unknown getter"); + } + setFluidGetter(this, get); + } +}; +$get, $observers; +var setFluidGetter = (target, get) => setHidden(target, $get, get); +function addFluidObserver(target, observer2) { + if (target[$get]) { + let observers = target[$observers]; + if (!observers) { + setHidden(target, $observers, observers = /* @__PURE__ */ new Set()); + } + if (!observers.has(observer2)) { + observers.add(observer2); + if (target.observerAdded) { + target.observerAdded(observers.size, observer2); + } + } + } + return observer2; +} +function removeFluidObserver(target, observer2) { + const observers = target[$observers]; + if (observers && observers.has(observer2)) { + const count = observers.size - 1; + if (count) { + observers.delete(observer2); + } else { + target[$observers] = null; + } + if (target.observerRemoved) { + target.observerRemoved(count, observer2); + } + } +} +var setHidden = (target, key, value) => Object.defineProperty(target, key, { + value, + writable: true, + configurable: true +}); + +// src/regexs.ts +var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; +var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; +var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i"); +var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi; +var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; + +// src/variableToRgba.ts +var variableToRgba = (input) => { + const [token, fallback] = parseCSSVariable(input); + if (!token || isSSR()) { + return input; + } + const value = window.getComputedStyle(document.documentElement).getPropertyValue(token); + if (value) { + return value.trim(); + } else if (fallback && fallback.startsWith("--")) { + const value2 = window.getComputedStyle(document.documentElement).getPropertyValue(fallback); + if (value2) { + return value2; + } else { + return input; + } + } else if (fallback && cssVariableRegex.test(fallback)) { + return variableToRgba(fallback); + } else if (fallback) { + return fallback; + } + return input; +}; +var parseCSSVariable = (current) => { + const match = cssVariableRegex.exec(current); + if (!match) + return [,]; + const [, token, fallback] = match; + return [token, fallback]; +}; + +// src/stringInterpolation.ts +var namedColorRegex; +var rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`; +var createStringInterpolator2 = (config) => { + if (!namedColorRegex) + namedColorRegex = colors ? ( + // match color names, ignore partial matches + new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`, "g") + ) : ( + // never match + /^\b$/ + ); + const output = config.output.map((value) => { + return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba); + }); + const keyframes = output.map((value) => value.match(numberRegex).map(Number)); + const outputRanges = keyframes[0].map( + (_, i) => keyframes.map((values) => { + if (!(i in values)) { + throw Error('The arity of each "output" value must be equal'); + } + return values[i]; + }) + ); + const interpolators = outputRanges.map( + (output2) => createInterpolator({ ...config, output: output2 }) + ); + return (input) => { + const missingUnit = !unitRegex.test(output[0]) && output.find((value) => unitRegex.test(value))?.replace(numberRegex, ""); + let i = 0; + return output[0].replace( + numberRegex, + () => `${interpolators[i++](input)}${missingUnit || ""}` + ).replace(rgbaRegex, rgbaRound); + }; +}; + +// src/deprecations.ts +var prefix = "react-spring: "; +var once = (fn) => { + const func = fn; + let called = false; + if (typeof func != "function") { + throw new TypeError(`${prefix}once requires a function parameter`); + } + return (...args) => { + if (!called) { + func(...args); + called = true; + } + }; +}; +var warnInterpolate = once(console.warn); +function deprecateInterpolate() { + warnInterpolate( + `${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)` + ); +} +var warnDirectCall = once(console.warn); +function deprecateDirectCall() { + warnDirectCall( + `${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions` + ); +} + +// src/isAnimatedString.ts +function isAnimatedString(value) { + return is.str(value) && (value[0] == "#" || /\d/.test(value) || // Do not identify a CSS variable as an AnimatedString if its SSR + !isSSR() && cssVariableRegex.test(value) || value in (colors || {})); +} + +// src/dom-events/resize/resizeElement.ts +var observer; +var resizeHandlers = /* @__PURE__ */ new WeakMap(); +var handleObservation = (entries) => entries.forEach(({ target, contentRect }) => { + return resizeHandlers.get(target)?.forEach((handler) => handler(contentRect)); +}); +function resizeElement(handler, target) { + if (!observer) { + if (typeof ResizeObserver !== "undefined") { + observer = new ResizeObserver(handleObservation); + } + } + let elementHandlers = resizeHandlers.get(target); + if (!elementHandlers) { + elementHandlers = /* @__PURE__ */ new Set(); + resizeHandlers.set(target, elementHandlers); + } + elementHandlers.add(handler); + if (observer) { + observer.observe(target); + } + return () => { + const elementHandlers2 = resizeHandlers.get(target); + if (!elementHandlers2) + return; + elementHandlers2.delete(handler); + if (!elementHandlers2.size && observer) { + observer.unobserve(target); + } + }; +} + +// src/dom-events/resize/resizeWindow.ts +var listeners = /* @__PURE__ */ new Set(); +var cleanupWindowResizeHandler; +var createResizeHandler = () => { + const handleResize = () => { + listeners.forEach( + (callback) => callback({ + width: window.innerWidth, + height: window.innerHeight + }) + ); + }; + window.addEventListener("resize", handleResize); + return () => { + window.removeEventListener("resize", handleResize); + }; +}; +var resizeWindow = (callback) => { + listeners.add(callback); + if (!cleanupWindowResizeHandler) { + cleanupWindowResizeHandler = createResizeHandler(); + } + return () => { + listeners.delete(callback); + if (!listeners.size && cleanupWindowResizeHandler) { + cleanupWindowResizeHandler(); + cleanupWindowResizeHandler = void 0; + } + }; +}; + +// src/dom-events/resize/index.ts +var react_spring_shared_modern_onResize = (callback, { container = document.documentElement } = {}) => { + if (container === document.documentElement) { + return resizeWindow(callback); + } else { + return resizeElement(callback, container); + } +}; + +// src/progress.ts +var progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min); + +// src/dom-events/scroll/ScrollHandler.ts +var SCROLL_KEYS = { + x: { + length: "Width", + position: "Left" + }, + y: { + length: "Height", + position: "Top" + } +}; +var ScrollHandler = class { + constructor(callback, container) { + this.createAxis = () => ({ + current: 0, + progress: 0, + scrollLength: 0 + }); + this.updateAxis = (axisName) => { + const axis = this.info[axisName]; + const { length, position } = SCROLL_KEYS[axisName]; + axis.current = this.container[`scroll${position}`]; + axis.scrollLength = this.container["scroll" + length] - this.container["client" + length]; + axis.progress = progress(0, axis.scrollLength, axis.current); + }; + this.update = () => { + this.updateAxis("x"); + this.updateAxis("y"); + }; + this.sendEvent = () => { + this.callback(this.info); + }; + this.advance = () => { + this.update(); + this.sendEvent(); + }; + this.callback = callback; + this.container = container; + this.info = { + time: 0, + x: this.createAxis(), + y: this.createAxis() + }; + } +}; + +// src/dom-events/scroll/index.ts +var scrollListeners = /* @__PURE__ */ new WeakMap(); +var resizeListeners = /* @__PURE__ */ new WeakMap(); +var onScrollHandlers = /* @__PURE__ */ new WeakMap(); +var getTarget = (container) => container === document.documentElement ? window : container; +var react_spring_shared_modern_onScroll = (callback, { container = document.documentElement } = {}) => { + let containerHandlers = onScrollHandlers.get(container); + if (!containerHandlers) { + containerHandlers = /* @__PURE__ */ new Set(); + onScrollHandlers.set(container, containerHandlers); + } + const containerHandler = new ScrollHandler(callback, container); + containerHandlers.add(containerHandler); + if (!scrollListeners.has(container)) { + const listener = () => { + containerHandlers?.forEach((handler) => handler.advance()); + return true; + }; + scrollListeners.set(container, listener); + const target = getTarget(container); + window.addEventListener("resize", listener, { passive: true }); + if (container !== document.documentElement) { + resizeListeners.set(container, react_spring_shared_modern_onResize(listener, { container })); + } + target.addEventListener("scroll", listener, { passive: true }); + } + const animateScroll = scrollListeners.get(container); + raf(animateScroll); + return () => { + raf.cancel(animateScroll); + const containerHandlers2 = onScrollHandlers.get(container); + if (!containerHandlers2) + return; + containerHandlers2.delete(containerHandler); + if (containerHandlers2.size) + return; + const listener = scrollListeners.get(container); + scrollListeners.delete(container); + if (listener) { + getTarget(container).removeEventListener("scroll", listener); + window.removeEventListener("resize", listener); + resizeListeners.get(container)?.(); + } + }; +}; + +// src/hooks/useConstant.ts + +function react_spring_shared_modern_useConstant(init) { + const ref = useRef(null); + if (ref.current === null) { + ref.current = init(); + } + return ref.current; +} + +// src/hooks/useForceUpdate.ts + + +// src/hooks/useIsMounted.ts + + +// src/hooks/useIsomorphicLayoutEffect.ts + +var react_spring_shared_modern_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect; + +// src/hooks/useIsMounted.ts +var useIsMounted = () => { + const isMounted = (0,external_React_.useRef)(false); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + isMounted.current = true; + return () => { + isMounted.current = false; + }; + }, []); + return isMounted; +}; + +// src/hooks/useForceUpdate.ts +function useForceUpdate() { + const update2 = (0,external_React_.useState)()[1]; + const isMounted = useIsMounted(); + return () => { + if (isMounted.current) { + update2(Math.random()); + } + }; +} + +// src/hooks/useMemoOne.ts + +function useMemoOne(getResult, inputs) { + const [initial] = (0,external_React_.useState)( + () => ({ + inputs, + result: getResult() + }) + ); + const committed = (0,external_React_.useRef)(); + const prevCache = committed.current; + let cache = prevCache; + if (cache) { + const useCache = Boolean( + inputs && cache.inputs && areInputsEqual(inputs, cache.inputs) + ); + if (!useCache) { + cache = { + inputs, + result: getResult() + }; + } + } else { + cache = initial; + } + (0,external_React_.useEffect)(() => { + committed.current = cache; + if (prevCache == initial) { + initial.inputs = initial.result = void 0; + } + }, [cache]); + return cache.result; +} +function areInputsEqual(next, prev) { + if (next.length !== prev.length) { + return false; + } + for (let i = 0; i < next.length; i++) { + if (next[i] !== prev[i]) { + return false; + } + } + return true; +} + +// src/hooks/useOnce.ts + +var useOnce = (effect) => (0,external_React_.useEffect)(effect, emptyDeps); +var emptyDeps = []; + +// src/hooks/usePrev.ts + +function usePrev(value) { + const prevRef = (0,external_React_.useRef)(); + (0,external_React_.useEffect)(() => { + prevRef.current = value; + }); + return prevRef.current; +} + +// src/hooks/useReducedMotion.ts + +var useReducedMotion = () => { + const [reducedMotion, setReducedMotion] = useState3(null); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + const mql = window.matchMedia("(prefers-reduced-motion)"); + const handleMediaChange = (e) => { + setReducedMotion(e.matches); + react_spring_shared_modern_assign({ + skipAnimation: e.matches + }); + }; + handleMediaChange(mql); + mql.addEventListener("change", handleMediaChange); + return () => { + mql.removeEventListener("change", handleMediaChange); + }; + }, []); + return reducedMotion; +}; + +//# sourceMappingURL=react-spring_shared.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs +// src/Animated.ts + +var $node = Symbol.for("Animated:node"); +var isAnimated = (value) => !!value && value[$node] === value; +var getAnimated = (owner) => owner && owner[$node]; +var setAnimated = (owner, node) => defineHidden(owner, $node, node); +var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload(); +var Animated = class { + constructor() { + setAnimated(this, this); + } + /** Get every `AnimatedValue` used by this node. */ + getPayload() { + return this.payload || []; + } +}; + +// src/AnimatedValue.ts + +var AnimatedValue = class extends Animated { + constructor(_value) { + super(); + this._value = _value; + this.done = true; + this.durationProgress = 0; + if (is.num(this._value)) { + this.lastPosition = this._value; + } + } + /** @internal */ + static create(value) { + return new AnimatedValue(value); + } + getPayload() { + return [this]; + } + getValue() { + return this._value; + } + setValue(value, step) { + if (is.num(value)) { + this.lastPosition = value; + if (step) { + value = Math.round(value / step) * step; + if (this.done) { + this.lastPosition = value; + } + } + } + if (this._value === value) { + return false; + } + this._value = value; + return true; + } + reset() { + const { done } = this; + this.done = false; + if (is.num(this._value)) { + this.elapsedTime = 0; + this.durationProgress = 0; + this.lastPosition = this._value; + if (done) + this.lastVelocity = null; + this.v0 = null; + } + } +}; + +// src/AnimatedString.ts + +var AnimatedString = class extends AnimatedValue { + constructor(value) { + super(0); + this._string = null; + this._toString = createInterpolator({ + output: [value, value] + }); + } + /** @internal */ + static create(value) { + return new AnimatedString(value); + } + getValue() { + const value = this._string; + return value == null ? this._string = this._toString(this._value) : value; + } + setValue(value) { + if (is.str(value)) { + if (value == this._string) { + return false; + } + this._string = value; + this._value = 1; + } else if (super.setValue(value)) { + this._string = null; + } else { + return false; + } + return true; + } + reset(goal) { + if (goal) { + this._toString = createInterpolator({ + output: [this.getValue(), goal] + }); + } + this._value = 0; + super.reset(); + } +}; + +// src/AnimatedArray.ts + + +// src/AnimatedObject.ts + + +// src/context.ts +var TreeContext = { dependencies: null }; + +// src/AnimatedObject.ts +var AnimatedObject = class extends Animated { + constructor(source) { + super(); + this.source = source; + this.setValue(source); + } + getValue(animated) { + const values = {}; + eachProp(this.source, (source, key) => { + if (isAnimated(source)) { + values[key] = source.getValue(animated); + } else if (hasFluidValue(source)) { + values[key] = getFluidValue(source); + } else if (!animated) { + values[key] = source; + } + }); + return values; + } + /** Replace the raw object data */ + setValue(source) { + this.source = source; + this.payload = this._makePayload(source); + } + reset() { + if (this.payload) { + react_spring_shared_modern_each(this.payload, (node) => node.reset()); + } + } + /** Create a payload set. */ + _makePayload(source) { + if (source) { + const payload = /* @__PURE__ */ new Set(); + eachProp(source, this._addToPayload, payload); + return Array.from(payload); + } + } + /** Add to a payload set. */ + _addToPayload(source) { + if (TreeContext.dependencies && hasFluidValue(source)) { + TreeContext.dependencies.add(source); + } + const payload = getPayload(source); + if (payload) { + react_spring_shared_modern_each(payload, (node) => this.add(node)); + } + } +}; + +// src/AnimatedArray.ts +var AnimatedArray = class extends AnimatedObject { + constructor(source) { + super(source); + } + /** @internal */ + static create(source) { + return new AnimatedArray(source); + } + getValue() { + return this.source.map((node) => node.getValue()); + } + setValue(source) { + const payload = this.getPayload(); + if (source.length == payload.length) { + return payload.map((node, i) => node.setValue(source[i])).some(Boolean); + } + super.setValue(source.map(makeAnimated)); + return true; + } +}; +function makeAnimated(value) { + const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue; + return nodeType.create(value); +} + +// src/getAnimatedType.ts + +function getAnimatedType(value) { + const parentNode = getAnimated(value); + return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue; +} + +// src/createHost.ts + + +// src/withAnimated.tsx + + + +var withAnimated = (Component, host) => { + const hasInstance = ( + // Function components must use "forwardRef" to avoid being + // re-rendered on every animation frame. + !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent + ); + return (0,external_React_.forwardRef)((givenProps, givenRef) => { + const instanceRef = (0,external_React_.useRef)(null); + const ref = hasInstance && // eslint-disable-next-line react-hooks/rules-of-hooks + (0,external_React_.useCallback)( + (value) => { + instanceRef.current = updateRef(givenRef, value); + }, + [givenRef] + ); + const [props, deps] = getAnimatedState(givenProps, host); + const forceUpdate = useForceUpdate(); + const callback = () => { + const instance = instanceRef.current; + if (hasInstance && !instance) { + return; + } + const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false; + if (didUpdate === false) { + forceUpdate(); + } + }; + const observer = new PropsObserver(callback, deps); + const observerRef = (0,external_React_.useRef)(); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + observerRef.current = observer; + react_spring_shared_modern_each(deps, (dep) => addFluidObserver(dep, observer)); + return () => { + if (observerRef.current) { + react_spring_shared_modern_each( + observerRef.current.deps, + (dep) => removeFluidObserver(dep, observerRef.current) + ); + raf.cancel(observerRef.current.update); + } + }; + }); + (0,external_React_.useEffect)(callback, []); + useOnce(() => () => { + const observer2 = observerRef.current; + react_spring_shared_modern_each(observer2.deps, (dep) => removeFluidObserver(dep, observer2)); + }); + const usedProps = host.getComponentProps(props.getValue()); + return /* @__PURE__ */ external_React_.createElement(Component, { ...usedProps, ref }); + }); +}; +var PropsObserver = class { + constructor(update, deps) { + this.update = update; + this.deps = deps; + } + eventObserved(event) { + if (event.type == "change") { + raf.write(this.update); + } + } +}; +function getAnimatedState(props, host) { + const dependencies = /* @__PURE__ */ new Set(); + TreeContext.dependencies = dependencies; + if (props.style) + props = { + ...props, + style: host.createAnimatedStyle(props.style) + }; + props = new AnimatedObject(props); + TreeContext.dependencies = null; + return [props, dependencies]; +} +function updateRef(ref, value) { + if (ref) { + if (is.fun(ref)) + ref(value); + else + ref.current = value; + } + return value; +} + +// src/createHost.ts +var cacheKey = Symbol.for("AnimatedComponent"); +var createHost = (components, { + applyAnimatedValues = () => false, + createAnimatedStyle = (style) => new AnimatedObject(style), + getComponentProps = (props) => props +} = {}) => { + const hostConfig = { + applyAnimatedValues, + createAnimatedStyle, + getComponentProps + }; + const animated = (Component) => { + const displayName = getDisplayName(Component) || "Anonymous"; + if (is.str(Component)) { + Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig)); + } else { + Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig)); + } + Component.displayName = `Animated(${displayName})`; + return Component; + }; + eachProp(components, (Component, key) => { + if (is.arr(components)) { + key = getDisplayName(Component); + } + animated[key] = animated(Component); + }); + return { + animated + }; +}; +var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null; + +//# sourceMappingURL=react-spring_animated.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring_core.modern.mjs +// src/hooks/useChain.ts + + +// src/helpers.ts + +function callProp(value, ...args) { + return is.fun(value) ? value(...args) : value; +} +var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key))); +var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop; +var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0; +var noopTransform = (value) => value; +var getDefaultProps = (props, transform = noopTransform) => { + let keys = DEFAULT_PROPS; + if (props.default && props.default !== true) { + props = props.default; + keys = Object.keys(props); + } + const defaults2 = {}; + for (const key of keys) { + const value = transform(props[key], key); + if (!is.und(value)) { + defaults2[key] = value; + } + } + return defaults2; +}; +var DEFAULT_PROPS = [ + "config", + "onProps", + "onStart", + "onChange", + "onPause", + "onResume", + "onRest" +]; +var RESERVED_PROPS = { + config: 1, + from: 1, + to: 1, + ref: 1, + loop: 1, + reset: 1, + pause: 1, + cancel: 1, + reverse: 1, + immediate: 1, + default: 1, + delay: 1, + onProps: 1, + onStart: 1, + onChange: 1, + onPause: 1, + onResume: 1, + onRest: 1, + onResolve: 1, + // Transition props + items: 1, + trail: 1, + sort: 1, + expires: 1, + initial: 1, + enter: 1, + update: 1, + leave: 1, + children: 1, + onDestroyed: 1, + // Internal props + keys: 1, + callId: 1, + parentId: 1 +}; +function getForwardProps(props) { + const forward = {}; + let count = 0; + eachProp(props, (value, prop) => { + if (!RESERVED_PROPS[prop]) { + forward[prop] = value; + count++; + } + }); + if (count) { + return forward; + } +} +function inferTo(props) { + const to2 = getForwardProps(props); + if (to2) { + const out = { to: to2 }; + eachProp(props, (val, key) => key in to2 || (out[key] = val)); + return out; + } + return { ...props }; +} +function computeGoal(value) { + value = getFluidValue(value); + return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals_exports.createStringInterpolator({ + range: [0, 1], + output: [value, value] + })(1) : value; +} +function hasProps(props) { + for (const _ in props) + return true; + return false; +} +function isAsyncTo(to2) { + return is.fun(to2) || is.arr(to2) && is.obj(to2[0]); +} +function detachRefs(ctrl, ref) { + ctrl.ref?.delete(ctrl); + ref?.delete(ctrl); +} +function replaceRef(ctrl, ref) { + if (ref && ctrl.ref !== ref) { + ctrl.ref?.delete(ctrl); + ref.add(ctrl); + ctrl.ref = ref; + } +} + +// src/hooks/useChain.ts +function useChain(refs, timeSteps, timeFrame = 1e3) { + useIsomorphicLayoutEffect(() => { + if (timeSteps) { + let prevDelay = 0; + each(refs, (ref, i) => { + const controllers = ref.current; + if (controllers.length) { + let delay = timeFrame * timeSteps[i]; + if (isNaN(delay)) + delay = prevDelay; + else + prevDelay = delay; + each(controllers, (ctrl) => { + each(ctrl.queue, (props) => { + const memoizedDelayProp = props.delay; + props.delay = (key) => delay + callProp(memoizedDelayProp || 0, key); + }); + }); + ref.start(); + } + }); + } else { + let p = Promise.resolve(); + each(refs, (ref) => { + const controllers = ref.current; + if (controllers.length) { + const queues = controllers.map((ctrl) => { + const q = ctrl.queue; + ctrl.queue = []; + return q; + }); + p = p.then(() => { + each( + controllers, + (ctrl, i) => each(queues[i] || [], (update2) => ctrl.queue.push(update2)) + ); + return Promise.all(ref.start()); + }); + } + }); + } + }); +} + +// src/hooks/useSpring.ts + + +// src/hooks/useSprings.ts + + + +// src/SpringValue.ts + + + +// src/AnimationConfig.ts + + +// src/constants.ts +var config = { + default: { tension: 170, friction: 26 }, + gentle: { tension: 120, friction: 14 }, + wobbly: { tension: 180, friction: 12 }, + stiff: { tension: 210, friction: 20 }, + slow: { tension: 280, friction: 60 }, + molasses: { tension: 280, friction: 120 } +}; + +// src/AnimationConfig.ts +var defaults = { + ...config.default, + mass: 1, + damping: 1, + easing: easings.linear, + clamp: false +}; +var AnimationConfig = class { + constructor() { + /** + * The initial velocity of one or more values. + * + * @default 0 + */ + this.velocity = 0; + Object.assign(this, defaults); + } +}; +function mergeConfig(config2, newConfig, defaultConfig) { + if (defaultConfig) { + defaultConfig = { ...defaultConfig }; + sanitizeConfig(defaultConfig, newConfig); + newConfig = { ...defaultConfig, ...newConfig }; + } + sanitizeConfig(config2, newConfig); + Object.assign(config2, newConfig); + for (const key in defaults) { + if (config2[key] == null) { + config2[key] = defaults[key]; + } + } + let { frequency, damping } = config2; + const { mass } = config2; + if (!is.und(frequency)) { + if (frequency < 0.01) + frequency = 0.01; + if (damping < 0) + damping = 0; + config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass; + config2.friction = 4 * Math.PI * damping * mass / frequency; + } + return config2; +} +function sanitizeConfig(config2, props) { + if (!is.und(props.decay)) { + config2.duration = void 0; + } else { + const isTensionConfig = !is.und(props.tension) || !is.und(props.friction); + if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) { + config2.duration = void 0; + config2.decay = void 0; + } + if (isTensionConfig) { + config2.frequency = void 0; + } + } +} + +// src/Animation.ts +var emptyArray = []; +var Animation = class { + constructor() { + this.changed = false; + this.values = emptyArray; + this.toValues = null; + this.fromValues = emptyArray; + this.config = new AnimationConfig(); + this.immediate = false; + } +}; + +// src/scheduleProps.ts + +function scheduleProps(callId, { key, props, defaultProps, state, actions }) { + return new Promise((resolve, reject) => { + let delay; + let timeout; + let cancel = matchProp(props.cancel ?? defaultProps?.cancel, key); + if (cancel) { + onStart(); + } else { + if (!is.und(props.pause)) { + state.paused = matchProp(props.pause, key); + } + let pause = defaultProps?.pause; + if (pause !== true) { + pause = state.paused || matchProp(pause, key); + } + delay = callProp(props.delay || 0, key); + if (pause) { + state.resumeQueue.add(onResume); + actions.pause(); + } else { + actions.resume(); + onResume(); + } + } + function onPause() { + state.resumeQueue.add(onResume); + state.timeouts.delete(timeout); + timeout.cancel(); + delay = timeout.time - raf.now(); + } + function onResume() { + if (delay > 0 && !globals_exports.skipAnimation) { + state.delayed = true; + timeout = raf.setTimeout(onStart, delay); + state.pauseQueue.add(onPause); + state.timeouts.add(timeout); + } else { + onStart(); + } + } + function onStart() { + if (state.delayed) { + state.delayed = false; + } + state.pauseQueue.delete(onPause); + state.timeouts.delete(timeout); + if (callId <= (state.cancelId || 0)) { + cancel = true; + } + try { + actions.start({ ...props, callId, cancel }, resolve); + } catch (err) { + reject(err); + } + } + }); +} + +// src/runAsync.ts + + +// src/AnimationResult.ts +var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult( + target.get(), + results.every((result) => result.finished) +); +var getNoopResult = (value) => ({ + value, + noop: true, + finished: true, + cancelled: false +}); +var getFinishedResult = (value, finished, cancelled = false) => ({ + value, + finished, + cancelled +}); +var getCancelledResult = (value) => ({ + value, + cancelled: true, + finished: false +}); + +// src/runAsync.ts +function runAsync(to2, props, state, target) { + const { callId, parentId, onRest } = props; + const { asyncTo: prevTo, promise: prevPromise } = state; + if (!parentId && to2 === prevTo && !props.reset) { + return prevPromise; + } + return state.promise = (async () => { + state.asyncId = callId; + state.asyncTo = to2; + const defaultProps = getDefaultProps( + props, + (value, key) => ( + // The `onRest` prop is only called when the `runAsync` promise is resolved. + key === "onRest" ? void 0 : value + ) + ); + let preventBail; + let bail; + const bailPromise = new Promise( + (resolve, reject) => (preventBail = resolve, bail = reject) + ); + const bailIfEnded = (bailSignal) => { + const bailResult = ( + // The `cancel` prop or `stop` method was used. + callId <= (state.cancelId || 0) && getCancelledResult(target) || // The async `to` prop was replaced. + callId !== state.asyncId && getFinishedResult(target, false) + ); + if (bailResult) { + bailSignal.result = bailResult; + bail(bailSignal); + throw bailSignal; + } + }; + const animate = (arg1, arg2) => { + const bailSignal = new BailSignal(); + const skipAnimationSignal = new SkipAnimationSignal(); + return (async () => { + if (globals_exports.skipAnimation) { + stopAsync(state); + skipAnimationSignal.result = getFinishedResult(target, false); + bail(skipAnimationSignal); + throw skipAnimationSignal; + } + bailIfEnded(bailSignal); + const props2 = is.obj(arg1) ? { ...arg1 } : { ...arg2, to: arg1 }; + props2.parentId = callId; + eachProp(defaultProps, (value, key) => { + if (is.und(props2[key])) { + props2[key] = value; + } + }); + const result2 = await target.start(props2); + bailIfEnded(bailSignal); + if (state.paused) { + await new Promise((resume) => { + state.resumeQueue.add(resume); + }); + } + return result2; + })(); + }; + let result; + if (globals_exports.skipAnimation) { + stopAsync(state); + return getFinishedResult(target, false); + } + try { + let animating; + if (is.arr(to2)) { + animating = (async (queue) => { + for (const props2 of queue) { + await animate(props2); + } + })(to2); + } else { + animating = Promise.resolve(to2(animate, target.stop.bind(target))); + } + await Promise.all([animating.then(preventBail), bailPromise]); + result = getFinishedResult(target.get(), true, false); + } catch (err) { + if (err instanceof BailSignal) { + result = err.result; + } else if (err instanceof SkipAnimationSignal) { + result = err.result; + } else { + throw err; + } + } finally { + if (callId == state.asyncId) { + state.asyncId = parentId; + state.asyncTo = parentId ? prevTo : void 0; + state.promise = parentId ? prevPromise : void 0; + } + } + if (is.fun(onRest)) { + raf.batchedUpdates(() => { + onRest(result, target, target.item); + }); + } + return result; + })(); +} +function stopAsync(state, cancelId) { + flush(state.timeouts, (t) => t.cancel()); + state.pauseQueue.clear(); + state.resumeQueue.clear(); + state.asyncId = state.asyncTo = state.promise = void 0; + if (cancelId) + state.cancelId = cancelId; +} +var BailSignal = class extends Error { + constructor() { + super( + "An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise." + ); + } +}; +var SkipAnimationSignal = class extends Error { + constructor() { + super("SkipAnimationSignal"); + } +}; + +// src/FrameValue.ts + + +var isFrameValue = (value) => value instanceof FrameValue; +var nextId = 1; +var FrameValue = class extends FluidValue { + constructor() { + super(...arguments); + this.id = nextId++; + this._priority = 0; + } + get priority() { + return this._priority; + } + set priority(priority) { + if (this._priority != priority) { + this._priority = priority; + this._onPriorityChange(priority); + } + } + /** Get the current value */ + get() { + const node = getAnimated(this); + return node && node.getValue(); + } + /** Create a spring that maps our value to another value */ + to(...args) { + return globals_exports.to(this, args); + } + /** @deprecated Use the `to` method instead. */ + interpolate(...args) { + deprecateInterpolate(); + return globals_exports.to(this, args); + } + toJSON() { + return this.get(); + } + observerAdded(count) { + if (count == 1) + this._attach(); + } + observerRemoved(count) { + if (count == 0) + this._detach(); + } + /** Called when the first child is added. */ + _attach() { + } + /** Called when the last child is removed. */ + _detach() { + } + /** Tell our children about our new value */ + _onChange(value, idle = false) { + callFluidObservers(this, { + type: "change", + parent: this, + value, + idle + }); + } + /** Tell our children about our new priority */ + _onPriorityChange(priority) { + if (!this.idle) { + frameLoop.sort(this); + } + callFluidObservers(this, { + type: "priority", + parent: this, + priority + }); + } +}; + +// src/SpringPhase.ts +var $P = Symbol.for("SpringPhase"); +var HAS_ANIMATED = 1; +var IS_ANIMATING = 2; +var IS_PAUSED = 4; +var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0; +var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0; +var isPaused = (target) => (target[$P] & IS_PAUSED) > 0; +var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING; +var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED; + +// src/SpringValue.ts +var SpringValue = class extends FrameValue { + constructor(arg1, arg2) { + super(); + /** The animation state */ + this.animation = new Animation(); + /** Some props have customizable default values */ + this.defaultProps = {}; + /** The state for `runAsync` calls */ + this._state = { + paused: false, + delayed: false, + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() + }; + /** The promise resolvers of pending `start` calls */ + this._pendingCalls = /* @__PURE__ */ new Set(); + /** The counter for tracking `scheduleProps` calls */ + this._lastCallId = 0; + /** The last `scheduleProps` call that changed the `to` prop */ + this._lastToId = 0; + this._memoizedDuration = 0; + if (!is.und(arg1) || !is.und(arg2)) { + const props = is.obj(arg1) ? { ...arg1 } : { ...arg2, from: arg1 }; + if (is.und(props.default)) { + props.default = true; + } + this.start(props); + } + } + /** Equals true when not advancing on each frame. */ + get idle() { + return !(isAnimating(this) || this._state.asyncTo) || isPaused(this); + } + get goal() { + return getFluidValue(this.animation.to); + } + get velocity() { + const node = getAnimated(this); + return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0); + } + /** + * When true, this value has been animated at least once. + */ + get hasAnimated() { + return hasAnimated(this); + } + /** + * When true, this value has an unfinished animation, + * which is either active or paused. + */ + get isAnimating() { + return isAnimating(this); + } + /** + * When true, all current and future animations are paused. + */ + get isPaused() { + return isPaused(this); + } + /** + * + * + */ + get isDelayed() { + return this._state.delayed; + } + /** Advance the current animation by a number of milliseconds */ + advance(dt) { + let idle = true; + let changed = false; + const anim = this.animation; + let { toValues } = anim; + const { config: config2 } = anim; + const payload = getPayload(anim.to); + if (!payload && hasFluidValue(anim.to)) { + toValues = toArray(getFluidValue(anim.to)); + } + anim.values.forEach((node2, i) => { + if (node2.done) + return; + const to2 = ( + // Animated strings always go from 0 to 1. + node2.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i] + ); + let finished = anim.immediate; + let position = to2; + if (!finished) { + position = node2.lastPosition; + if (config2.tension <= 0) { + node2.done = true; + return; + } + let elapsed = node2.elapsedTime += dt; + const from = anim.fromValues[i]; + const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i] : config2.velocity; + let velocity; + const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3)); + if (!is.und(config2.duration)) { + let p = 1; + if (config2.duration > 0) { + if (this._memoizedDuration !== config2.duration) { + this._memoizedDuration = config2.duration; + if (node2.durationProgress > 0) { + node2.elapsedTime = config2.duration * node2.durationProgress; + elapsed = node2.elapsedTime += dt; + } + } + p = (config2.progress || 0) + elapsed / this._memoizedDuration; + p = p > 1 ? 1 : p < 0 ? 0 : p; + node2.durationProgress = p; + } + position = from + config2.easing(p) * (to2 - from); + velocity = (position - node2.lastPosition) / dt; + finished = p == 1; + } else if (config2.decay) { + const decay = config2.decay === true ? 0.998 : config2.decay; + const e = Math.exp(-(1 - decay) * elapsed); + position = from + v0 / (1 - decay) * (1 - e); + finished = Math.abs(node2.lastPosition - position) <= precision; + velocity = v0 * e; + } else { + velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity; + const restVelocity = config2.restVelocity || precision / 10; + const bounceFactor = config2.clamp ? 0 : config2.bounce; + const canBounce = !is.und(bounceFactor); + const isGrowing = from == to2 ? node2.v0 > 0 : from < to2; + let isMoving; + let isBouncing = false; + const step = 1; + const numSteps = Math.ceil(dt / step); + for (let n = 0; n < numSteps; ++n) { + isMoving = Math.abs(velocity) > restVelocity; + if (!isMoving) { + finished = Math.abs(to2 - position) <= precision; + if (finished) { + break; + } + } + if (canBounce) { + isBouncing = position == to2 || position > to2 == isGrowing; + if (isBouncing) { + velocity = -velocity * bounceFactor; + position = to2; + } + } + const springForce = -config2.tension * 1e-6 * (position - to2); + const dampingForce = -config2.friction * 1e-3 * velocity; + const acceleration = (springForce + dampingForce) / config2.mass; + velocity = velocity + acceleration * step; + position = position + velocity * step; + } + } + node2.lastVelocity = velocity; + if (Number.isNaN(position)) { + console.warn(`Got NaN while animating:`, this); + finished = true; + } + } + if (payload && !payload[i].done) { + finished = false; + } + if (finished) { + node2.done = true; + } else { + idle = false; + } + if (node2.setValue(position, config2.round)) { + changed = true; + } + }); + const node = getAnimated(this); + const currVal = node.getValue(); + if (idle) { + const finalVal = getFluidValue(anim.to); + if ((currVal !== finalVal || changed) && !config2.decay) { + node.setValue(finalVal); + this._onChange(finalVal); + } else if (changed && config2.decay) { + this._onChange(currVal); + } + this._stop(); + } else if (changed) { + this._onChange(currVal); + } + } + /** Set the current value, while stopping the current animation */ + set(value) { + raf.batchedUpdates(() => { + this._stop(); + this._focus(value); + this._set(value); + }); + return this; + } + /** + * Freeze the active animation in time, as well as any updates merged + * before `resume` is called. + */ + pause() { + this._update({ pause: true }); + } + /** Resume the animation if paused. */ + resume() { + this._update({ pause: false }); + } + /** Skip to the end of the current animation. */ + finish() { + if (isAnimating(this)) { + const { to: to2, config: config2 } = this.animation; + raf.batchedUpdates(() => { + this._onStart(); + if (!config2.decay) { + this._set(to2, false); + } + this._stop(); + }); + } + return this; + } + /** Push props into the pending queue. */ + update(props) { + const queue = this.queue || (this.queue = []); + queue.push(props); + return this; + } + start(to2, arg2) { + let queue; + if (!is.und(to2)) { + queue = [is.obj(to2) ? to2 : { ...arg2, to: to2 }]; + } else { + queue = this.queue || []; + this.queue = []; + } + return Promise.all( + queue.map((props) => { + const up = this._update(props); + return up; + }) + ).then((results) => getCombinedResult(this, results)); + } + /** + * Stop the current animation, and cancel any delayed updates. + * + * Pass `true` to call `onRest` with `cancelled: true`. + */ + stop(cancel) { + const { to: to2 } = this.animation; + this._focus(this.get()); + stopAsync(this._state, cancel && this._lastCallId); + raf.batchedUpdates(() => this._stop(to2, cancel)); + return this; + } + /** Restart the animation. */ + reset() { + this._update({ reset: true }); + } + /** @internal */ + eventObserved(event) { + if (event.type == "change") { + this._start(); + } else if (event.type == "priority") { + this.priority = event.priority + 1; + } + } + /** + * Parse the `to` and `from` range from the given `props` object. + * + * This also ensures the initial value is available to animated components + * during the render phase. + */ + _prepareNode(props) { + const key = this.key || ""; + let { to: to2, from } = props; + to2 = is.obj(to2) ? to2[key] : to2; + if (to2 == null || isAsyncTo(to2)) { + to2 = void 0; + } + from = is.obj(from) ? from[key] : from; + if (from == null) { + from = void 0; + } + const range = { to: to2, from }; + if (!hasAnimated(this)) { + if (props.reverse) + [to2, from] = [from, to2]; + from = getFluidValue(from); + if (!is.und(from)) { + this._set(from); + } else if (!getAnimated(this)) { + this._set(to2); + } + } + return range; + } + /** Every update is processed by this method before merging. */ + _update({ ...props }, isLoop) { + const { key, defaultProps } = this; + if (props.default) + Object.assign( + defaultProps, + getDefaultProps( + props, + (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value + ) + ); + mergeActiveFn(this, props, "onProps"); + sendEvent(this, "onProps", props, this); + const range = this._prepareNode(props); + if (Object.isFrozen(this)) { + throw Error( + "Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?" + ); + } + const state = this._state; + return scheduleProps(++this._lastCallId, { + key, + props, + defaultProps, + state, + actions: { + pause: () => { + if (!isPaused(this)) { + setPausedBit(this, true); + flushCalls(state.pauseQueue); + sendEvent( + this, + "onPause", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); + } + }, + resume: () => { + if (isPaused(this)) { + setPausedBit(this, false); + if (isAnimating(this)) { + this._resume(); + } + flushCalls(state.resumeQueue); + sendEvent( + this, + "onResume", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); + } + }, + start: this._merge.bind(this, range) + } + }).then((result) => { + if (props.loop && result.finished && !(isLoop && result.noop)) { + const nextProps = createLoopUpdate(props); + if (nextProps) { + return this._update(nextProps, true); + } + } + return result; + }); + } + /** Merge props into the current animation */ + _merge(range, props, resolve) { + if (props.cancel) { + this.stop(true); + return resolve(getCancelledResult(this)); + } + const hasToProp = !is.und(range.to); + const hasFromProp = !is.und(range.from); + if (hasToProp || hasFromProp) { + if (props.callId > this._lastToId) { + this._lastToId = props.callId; + } else { + return resolve(getCancelledResult(this)); + } + } + const { key, defaultProps, animation: anim } = this; + const { to: prevTo, from: prevFrom } = anim; + let { to: to2 = prevTo, from = prevFrom } = range; + if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) { + to2 = from; + } + if (props.reverse) + [to2, from] = [from, to2]; + const hasFromChanged = !isEqual(from, prevFrom); + if (hasFromChanged) { + anim.from = from; + } + from = getFluidValue(from); + const hasToChanged = !isEqual(to2, prevTo); + if (hasToChanged) { + this._focus(to2); + } + const hasAsyncTo = isAsyncTo(props.to); + const { config: config2 } = anim; + const { decay, velocity } = config2; + if (hasToProp || hasFromProp) { + config2.velocity = 0; + } + if (props.config && !hasAsyncTo) { + mergeConfig( + config2, + callProp(props.config, key), + // Avoid calling the same "config" prop twice. + props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0 + ); + } + let node = getAnimated(this); + if (!node || is.und(to2)) { + return resolve(getFinishedResult(this, true)); + } + const reset = ( + // When `reset` is undefined, the `from` prop implies `reset: true`, + // except for declarative updates. When `reset` is defined, there + // must exist a value to animate from. + is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key) + ); + const value = reset ? from : this.get(); + const goal = computeGoal(to2); + const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal); + const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key)); + if (hasToChanged) { + const nodeType = getAnimatedType(to2); + if (nodeType !== node.constructor) { + if (immediate) { + node = this._set(goal); + } else + throw Error( + `Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests` + ); + } + } + const goalType = node.constructor; + let started = hasFluidValue(to2); + let finished = false; + if (!started) { + const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged; + if (hasToChanged || hasValueChanged) { + finished = isEqual(computeGoal(value), goal); + started = !finished; + } + if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) { + started = true; + } + } + if (finished && isAnimating(this)) { + if (anim.changed && !reset) { + started = true; + } else if (!started) { + this._stop(prevTo); + } + } + if (!hasAsyncTo) { + if (started || hasFluidValue(prevTo)) { + anim.values = node.getPayload(); + anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal); + } + if (anim.immediate != immediate) { + anim.immediate = immediate; + if (!immediate && !reset) { + this._set(prevTo); + } + } + if (started) { + const { onRest } = anim; + react_spring_shared_modern_each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type)); + const result = getFinishedResult(this, checkFinished(this, prevTo)); + flushCalls(this._pendingCalls, result); + this._pendingCalls.add(resolve); + if (anim.changed) + raf.batchedUpdates(() => { + anim.changed = !reset; + onRest?.(result, this); + if (reset) { + callProp(defaultProps.onRest, result); + } else { + anim.onStart?.(result, this); + } + }); + } + } + if (reset) { + this._set(value); + } + if (hasAsyncTo) { + resolve(runAsync(props.to, props, this._state, this)); + } else if (started) { + this._start(); + } else if (isAnimating(this) && !hasToChanged) { + this._pendingCalls.add(resolve); + } else { + resolve(getNoopResult(value)); + } + } + /** Update the `animation.to` value, which might be a `FluidValue` */ + _focus(value) { + const anim = this.animation; + if (value !== anim.to) { + if (getFluidObservers(this)) { + this._detach(); + } + anim.to = value; + if (getFluidObservers(this)) { + this._attach(); + } + } + } + _attach() { + let priority = 0; + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + addFluidObserver(to2, this); + if (isFrameValue(to2)) { + priority = to2.priority + 1; + } + } + this.priority = priority; + } + _detach() { + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + removeFluidObserver(to2, this); + } + } + /** + * Update the current value from outside the frameloop, + * and return the `Animated` node. + */ + _set(arg, idle = true) { + const value = getFluidValue(arg); + if (!is.und(value)) { + const oldNode = getAnimated(this); + if (!oldNode || !isEqual(value, oldNode.getValue())) { + const nodeType = getAnimatedType(value); + if (!oldNode || oldNode.constructor != nodeType) { + setAnimated(this, nodeType.create(value)); + } else { + oldNode.setValue(value); + } + if (oldNode) { + raf.batchedUpdates(() => { + this._onChange(value, idle); + }); + } + } + } + return getAnimated(this); + } + _onStart() { + const anim = this.animation; + if (!anim.changed) { + anim.changed = true; + sendEvent( + this, + "onStart", + getFinishedResult(this, checkFinished(this, anim.to)), + this + ); + } + } + _onChange(value, idle) { + if (!idle) { + this._onStart(); + callProp(this.animation.onChange, value, this); + } + callProp(this.defaultProps.onChange, value, this); + super._onChange(value, idle); + } + // This method resets the animation state (even if already animating) to + // ensure the latest from/to range is used, and it also ensures this spring + // is added to the frameloop. + _start() { + const anim = this.animation; + getAnimated(this).reset(getFluidValue(anim.to)); + if (!anim.immediate) { + anim.fromValues = anim.values.map((node) => node.lastPosition); + } + if (!isAnimating(this)) { + setActiveBit(this, true); + if (!isPaused(this)) { + this._resume(); + } + } + } + _resume() { + if (globals_exports.skipAnimation) { + this.finish(); + } else { + frameLoop.start(this); + } + } + /** + * Exit the frameloop and notify `onRest` listeners. + * + * Always wrap `_stop` calls with `batchedUpdates`. + */ + _stop(goal, cancel) { + if (isAnimating(this)) { + setActiveBit(this, false); + const anim = this.animation; + react_spring_shared_modern_each(anim.values, (node) => { + node.done = true; + }); + if (anim.toValues) { + anim.onChange = anim.onPause = anim.onResume = void 0; + } + callFluidObservers(this, { + type: "idle", + parent: this + }); + const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal ?? anim.to)); + flushCalls(this._pendingCalls, result); + if (anim.changed) { + anim.changed = false; + sendEvent(this, "onRest", result, this); + } + } + } +}; +function checkFinished(target, to2) { + const goal = computeGoal(to2); + const value = computeGoal(target.get()); + return isEqual(value, goal); +} +function createLoopUpdate(props, loop = props.loop, to2 = props.to) { + const loopRet = callProp(loop); + if (loopRet) { + const overrides = loopRet !== true && inferTo(loopRet); + const reverse = (overrides || props).reverse; + const reset = !overrides || overrides.reset; + return createUpdate({ + ...props, + loop, + // Avoid updating default props when looping. + default: false, + // Never loop the `pause` prop. + pause: void 0, + // For the "reverse" prop to loop as expected, the "to" prop + // must be undefined. The "reverse" prop is ignored when the + // "to" prop is an array or function. + to: !reverse || isAsyncTo(to2) ? to2 : void 0, + // Ignore the "from" prop except on reset. + from: reset ? props.from : void 0, + reset, + // The "loop" prop can return a "useSpring" props object to + // override any of the original props. + ...overrides + }); + } +} +function createUpdate(props) { + const { to: to2, from } = props = inferTo(props); + const keys = /* @__PURE__ */ new Set(); + if (is.obj(to2)) + findDefined(to2, keys); + if (is.obj(from)) + findDefined(from, keys); + props.keys = keys.size ? Array.from(keys) : null; + return props; +} +function declareUpdate(props) { + const update2 = createUpdate(props); + if (is.und(update2.default)) { + update2.default = getDefaultProps(update2); + } + return update2; +} +function findDefined(values, keys) { + eachProp(values, (value, key) => value != null && keys.add(key)); +} +var ACTIVE_EVENTS = [ + "onStart", + "onRest", + "onChange", + "onPause", + "onResume" +]; +function mergeActiveFn(target, props, type) { + target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0; +} +function sendEvent(target, type, ...args) { + target.animation[type]?.(...args); + target.defaultProps[type]?.(...args); +} + +// src/Controller.ts + +var BATCHED_EVENTS = ["onStart", "onChange", "onRest"]; +var nextId2 = 1; +var Controller = class { + constructor(props, flush3) { + this.id = nextId2++; + /** The animated values */ + this.springs = {}; + /** The queue of props passed to the `update` method. */ + this.queue = []; + /** The counter for tracking `scheduleProps` calls */ + this._lastAsyncId = 0; + /** The values currently being animated */ + this._active = /* @__PURE__ */ new Set(); + /** The values that changed recently */ + this._changed = /* @__PURE__ */ new Set(); + /** Equals false when `onStart` listeners can be called */ + this._started = false; + /** State used by the `runAsync` function */ + this._state = { + paused: false, + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() + }; + /** The event queues that are flushed once per frame maximum */ + this._events = { + onStart: /* @__PURE__ */ new Map(), + onChange: /* @__PURE__ */ new Map(), + onRest: /* @__PURE__ */ new Map() + }; + this._onFrame = this._onFrame.bind(this); + if (flush3) { + this._flush = flush3; + } + if (props) { + this.start({ default: true, ...props }); + } + } + /** + * Equals `true` when no spring values are in the frameloop, and + * no async animation is currently active. + */ + get idle() { + return !this._state.asyncTo && Object.values(this.springs).every((spring) => { + return spring.idle && !spring.isDelayed && !spring.isPaused; + }); + } + get item() { + return this._item; + } + set item(item) { + this._item = item; + } + /** Get the current values of our springs */ + get() { + const values = {}; + this.each((spring, key) => values[key] = spring.get()); + return values; + } + /** Set the current values without animating. */ + set(values) { + for (const key in values) { + const value = values[key]; + if (!is.und(value)) { + this.springs[key].set(value); + } + } + } + /** Push an update onto the queue of each value. */ + update(props) { + if (props) { + this.queue.push(createUpdate(props)); + } + return this; + } + /** + * Start the queued animations for every spring, and resolve the returned + * promise once all queued animations have finished or been cancelled. + * + * When you pass a queue (instead of nothing), that queue is used instead of + * the queued animations added with the `update` method, which are left alone. + */ + start(props) { + let { queue } = this; + if (props) { + queue = toArray(props).map(createUpdate); + } else { + this.queue = []; + } + if (this._flush) { + return this._flush(this, queue); + } + prepareKeys(this, queue); + return flushUpdateQueue(this, queue); + } + /** @internal */ + stop(arg, keys) { + if (arg !== !!arg) { + keys = arg; + } + if (keys) { + const springs = this.springs; + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].stop(!!arg)); + } else { + stopAsync(this._state, this._lastAsyncId); + this.each((spring) => spring.stop(!!arg)); + } + return this; + } + /** Freeze the active animation in time */ + pause(keys) { + if (is.und(keys)) { + this.start({ pause: true }); + } else { + const springs = this.springs; + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].pause()); + } + return this; + } + /** Resume the animation if paused. */ + resume(keys) { + if (is.und(keys)) { + this.start({ pause: false }); + } else { + const springs = this.springs; + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].resume()); + } + return this; + } + /** Call a function once per spring value */ + each(iterator) { + eachProp(this.springs, iterator); + } + /** @internal Called at the end of every animation frame */ + _onFrame() { + const { onStart, onChange, onRest } = this._events; + const active = this._active.size > 0; + const changed = this._changed.size > 0; + if (active && !this._started || changed && !this._started) { + this._started = true; + flush(onStart, ([onStart2, result]) => { + result.value = this.get(); + onStart2(result, this, this._item); + }); + } + const idle = !active && this._started; + const values = changed || idle && onRest.size ? this.get() : null; + if (changed && onChange.size) { + flush(onChange, ([onChange2, result]) => { + result.value = values; + onChange2(result, this, this._item); + }); + } + if (idle) { + this._started = false; + flush(onRest, ([onRest2, result]) => { + result.value = values; + onRest2(result, this, this._item); + }); + } + } + /** @internal */ + eventObserved(event) { + if (event.type == "change") { + this._changed.add(event.parent); + if (!event.idle) { + this._active.add(event.parent); + } + } else if (event.type == "idle") { + this._active.delete(event.parent); + } else + return; + raf.onFrame(this._onFrame); + } +}; +function flushUpdateQueue(ctrl, queue) { + return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then( + (results) => getCombinedResult(ctrl, results) + ); +} +async function flushUpdate(ctrl, props, isLoop) { + const { keys, to: to2, from, loop, onRest, onResolve } = props; + const defaults2 = is.obj(props.default) && props.default; + if (loop) { + props.loop = false; + } + if (to2 === false) + props.to = null; + if (from === false) + props.from = null; + const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0; + if (asyncTo) { + props.to = void 0; + props.onRest = void 0; + if (defaults2) { + defaults2.onRest = void 0; + } + } else { + react_spring_shared_modern_each(BATCHED_EVENTS, (key) => { + const handler = props[key]; + if (is.fun(handler)) { + const queue = ctrl["_events"][key]; + props[key] = ({ finished, cancelled }) => { + const result2 = queue.get(handler); + if (result2) { + if (!finished) + result2.finished = false; + if (cancelled) + result2.cancelled = true; + } else { + queue.set(handler, { + value: null, + finished: finished || false, + cancelled: cancelled || false + }); + } + }; + if (defaults2) { + defaults2[key] = props[key]; + } + } + }); + } + const state = ctrl["_state"]; + if (props.pause === !state.paused) { + state.paused = props.pause; + flushCalls(props.pause ? state.pauseQueue : state.resumeQueue); + } else if (state.paused) { + props.pause = true; + } + const promises = (keys || Object.keys(ctrl.springs)).map( + (key) => ctrl.springs[key].start(props) + ); + const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true; + if (asyncTo || cancel && state.asyncId) { + promises.push( + scheduleProps(++ctrl["_lastAsyncId"], { + props, + state, + actions: { + pause: noop, + resume: noop, + start(props2, resolve) { + if (cancel) { + stopAsync(state, ctrl["_lastAsyncId"]); + resolve(getCancelledResult(ctrl)); + } else { + props2.onRest = onRest; + resolve( + runAsync( + asyncTo, + props2, + state, + ctrl + ) + ); + } + } + } + }) + ); + } + if (state.paused) { + await new Promise((resume) => { + state.resumeQueue.add(resume); + }); + } + const result = getCombinedResult(ctrl, await Promise.all(promises)); + if (loop && result.finished && !(isLoop && result.noop)) { + const nextProps = createLoopUpdate(props, loop, to2); + if (nextProps) { + prepareKeys(ctrl, [nextProps]); + return flushUpdate(ctrl, nextProps, true); + } + } + if (onResolve) { + raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item)); + } + return result; +} +function getSprings(ctrl, props) { + const springs = { ...ctrl.springs }; + if (props) { + react_spring_shared_modern_each(toArray(props), (props2) => { + if (is.und(props2.keys)) { + props2 = createUpdate(props2); + } + if (!is.obj(props2.to)) { + props2 = { ...props2, to: void 0 }; + } + prepareSprings(springs, props2, (key) => { + return createSpring(key); + }); + }); + } + setSprings(ctrl, springs); + return springs; +} +function setSprings(ctrl, springs) { + eachProp(springs, (spring, key) => { + if (!ctrl.springs[key]) { + ctrl.springs[key] = spring; + addFluidObserver(spring, ctrl); + } + }); +} +function createSpring(key, observer) { + const spring = new SpringValue(); + spring.key = key; + if (observer) { + addFluidObserver(spring, observer); + } + return spring; +} +function prepareSprings(springs, props, create) { + if (props.keys) { + react_spring_shared_modern_each(props.keys, (key) => { + const spring = springs[key] || (springs[key] = create(key)); + spring["_prepareNode"](props); + }); + } +} +function prepareKeys(ctrl, queue) { + react_spring_shared_modern_each(queue, (props) => { + prepareSprings(ctrl.springs, props, (key) => { + return createSpring(key, ctrl); + }); + }); +} + +// src/SpringContext.tsx + + + +var SpringContext = ({ + children, + ...props +}) => { + const inherited = (0,external_React_.useContext)(ctx); + const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate; + props = useMemoOne(() => ({ pause, immediate }), [pause, immediate]); + const { Provider } = ctx; + return /* @__PURE__ */ external_React_.createElement(Provider, { value: props }, children); +}; +var ctx = makeContext(SpringContext, {}); +SpringContext.Provider = ctx.Provider; +SpringContext.Consumer = ctx.Consumer; +function makeContext(target, init) { + Object.assign(target, external_React_.createContext(init)); + target.Provider._context = target; + target.Consumer._context = target; + return target; +} + +// src/SpringRef.ts + +var SpringRef = () => { + const current = []; + const SpringRef2 = function(props) { + deprecateDirectCall(); + const results = []; + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { + results.push(ctrl.start()); + } else { + const update2 = _getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); + } + } + }); + return results; + }; + SpringRef2.current = current; + SpringRef2.add = function(ctrl) { + if (!current.includes(ctrl)) { + current.push(ctrl); + } + }; + SpringRef2.delete = function(ctrl) { + const i = current.indexOf(ctrl); + if (~i) + current.splice(i, 1); + }; + SpringRef2.pause = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.pause(...arguments)); + return this; + }; + SpringRef2.resume = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.resume(...arguments)); + return this; + }; + SpringRef2.set = function(values) { + react_spring_shared_modern_each(current, (ctrl, i) => { + const update2 = is.fun(values) ? values(i, ctrl) : values; + if (update2) { + ctrl.set(update2); + } + }); + }; + SpringRef2.start = function(props) { + const results = []; + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { + results.push(ctrl.start()); + } else { + const update2 = this._getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); + } + } + }); + return results; + }; + SpringRef2.stop = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.stop(...arguments)); + return this; + }; + SpringRef2.update = function(props) { + react_spring_shared_modern_each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i))); + return this; + }; + const _getProps = function(arg, ctrl, index) { + return is.fun(arg) ? arg(index, ctrl) : arg; + }; + SpringRef2._getProps = _getProps; + return SpringRef2; +}; + +// src/hooks/useSprings.ts +function useSprings(length, props, deps) { + const propsFn = is.fun(props) && props; + if (propsFn && !deps) + deps = []; + const ref = (0,external_React_.useMemo)( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); + const layoutId = (0,external_React_.useRef)(0); + const forceUpdate = useForceUpdate(); + const state = (0,external_React_.useMemo)( + () => ({ + ctrls: [], + queue: [], + flush(ctrl, updates2) { + const springs2 = getSprings(ctrl, updates2); + const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs2).some((key) => !ctrl.springs[key]); + return canFlushSync ? flushUpdateQueue(ctrl, updates2) : new Promise((resolve) => { + setSprings(ctrl, springs2); + state.queue.push(() => { + resolve(flushUpdateQueue(ctrl, updates2)); + }); + forceUpdate(); + }); + } + }), + [] + ); + const ctrls = (0,external_React_.useRef)([...state.ctrls]); + const updates = []; + const prevLength = usePrev(length) || 0; + (0,external_React_.useMemo)(() => { + react_spring_shared_modern_each(ctrls.current.slice(length, prevLength), (ctrl) => { + detachRefs(ctrl, ref); + ctrl.stop(true); + }); + ctrls.current.length = length; + declareUpdates(prevLength, length); + }, [length]); + (0,external_React_.useMemo)(() => { + declareUpdates(0, Math.min(prevLength, length)); + }, deps); + function declareUpdates(startIndex, endIndex) { + for (let i = startIndex; i < endIndex; i++) { + const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush)); + const update2 = propsFn ? propsFn(i, ctrl) : props[i]; + if (update2) { + updates[i] = declareUpdate(update2); + } + } + } + const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i])); + const context = (0,external_React_.useContext)(SpringContext); + const prevContext = usePrev(context); + const hasContext = context !== prevContext && hasProps(context); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + layoutId.current++; + state.ctrls = ctrls.current; + const { queue } = state; + if (queue.length) { + state.queue = []; + react_spring_shared_modern_each(queue, (cb) => cb()); + } + react_spring_shared_modern_each(ctrls.current, (ctrl, i) => { + ref?.add(ctrl); + if (hasContext) { + ctrl.start({ default: context }); + } + const update2 = updates[i]; + if (update2) { + replaceRef(ctrl, update2.ref); + if (ctrl.ref) { + ctrl.queue.push(update2); + } else { + ctrl.start(update2); + } + } + }); + }); + useOnce(() => () => { + react_spring_shared_modern_each(state.ctrls, (ctrl) => ctrl.stop(true)); + }); + const values = springs.map((x) => ({ ...x })); + return ref ? [values, ref] : values; +} + +// src/hooks/useSpring.ts +function useSpring(props, deps) { + const isFn = is.fun(props); + const [[values], ref] = useSprings( + 1, + isFn ? props : [props], + isFn ? deps || [] : deps + ); + return isFn || arguments.length == 2 ? [values, ref] : values; +} + +// src/hooks/useSpringRef.ts + +var initSpringRef = () => SpringRef(); +var useSpringRef = () => useState(initSpringRef)[0]; + +// src/hooks/useSpringValue.ts + +var useSpringValue = (initial, props) => { + const springValue = useConstant(() => new SpringValue(initial, props)); + useOnce2(() => () => { + springValue.stop(); + }); + return springValue; +}; + +// src/hooks/useTrail.ts + +function useTrail(length, propsArg, deps) { + const propsFn = is10.fun(propsArg) && propsArg; + if (propsFn && !deps) + deps = []; + let reverse = true; + let passedRef = void 0; + const result = useSprings( + length, + (i, ctrl) => { + const props = propsFn ? propsFn(i, ctrl) : propsArg; + passedRef = props.ref; + reverse = reverse && props.reverse; + return props; + }, + // Ensure the props function is called when no deps exist. + // This works around the 3 argument rule. + deps || [{}] + ); + useIsomorphicLayoutEffect3(() => { + each6(result[1].current, (ctrl, i) => { + const parent = result[1].current[i + (reverse ? 1 : -1)]; + replaceRef(ctrl, passedRef); + if (ctrl.ref) { + if (parent) { + ctrl.update({ to: parent.springs }); + } + return; + } + if (parent) { + ctrl.start({ to: parent.springs }); + } else { + ctrl.start(); + } + }); + }, deps); + if (propsFn || arguments.length == 3) { + const ref = passedRef ?? result[1]; + ref["_getProps"] = (propsArg2, ctrl, i) => { + const props = is10.fun(propsArg2) ? propsArg2(i, ctrl) : propsArg2; + if (props) { + const parent = ref.current[i + (props.reverse ? 1 : -1)]; + if (parent) + props.to = parent.springs; + return props; + } + }; + return result; + } + return result[0]; +} + +// src/hooks/useTransition.tsx + + + +function useTransition(data, props, deps) { + const propsFn = is11.fun(props) && props; + const { + reset, + sort, + trail = 0, + expires = true, + exitBeforeEnter = false, + onDestroyed, + ref: propsRef, + config: propsConfig + } = propsFn ? propsFn() : props; + const ref = useMemo2( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); + const items = toArray4(data); + const transitions = []; + const usedTransitions = useRef2(null); + const prevTransitions = reset ? null : usedTransitions.current; + useIsomorphicLayoutEffect4(() => { + usedTransitions.current = transitions; + }); + useOnce3(() => { + each7(transitions, (t) => { + ref?.add(t.ctrl); + t.ctrl.ref = ref; + }); + return () => { + each7(usedTransitions.current, (t) => { + if (t.expired) { + clearTimeout(t.expirationId); + } + detachRefs(t.ctrl, ref); + t.ctrl.stop(true); + }); + }; + }); + const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions); + const expired = reset && usedTransitions.current || []; + useIsomorphicLayoutEffect4( + () => each7(expired, ({ ctrl, item, key }) => { + detachRefs(ctrl, ref); + callProp(onDestroyed, item, key); + }) + ); + const reused = []; + if (prevTransitions) + each7(prevTransitions, (t, i) => { + if (t.expired) { + clearTimeout(t.expirationId); + expired.push(t); + } else { + i = reused[i] = keys.indexOf(t.key); + if (~i) + transitions[i] = t; + } + }); + each7(items, (item, i) => { + if (!transitions[i]) { + transitions[i] = { + key: keys[i], + item, + phase: "mount" /* MOUNT */, + ctrl: new Controller() + }; + transitions[i].ctrl.item = item; + } + }); + if (reused.length) { + let i = -1; + const { leave } = propsFn ? propsFn() : props; + each7(reused, (keyIndex, prevIndex) => { + const t = prevTransitions[prevIndex]; + if (~keyIndex) { + i = transitions.indexOf(t); + transitions[i] = { ...t, item: items[keyIndex] }; + } else if (leave) { + transitions.splice(++i, 0, t); + } + }); + } + if (is11.fun(sort)) { + transitions.sort((a, b) => sort(a.item, b.item)); + } + let delay = -trail; + const forceUpdate = useForceUpdate2(); + const defaultProps = getDefaultProps(props); + const changes = /* @__PURE__ */ new Map(); + const exitingTransitions = useRef2(/* @__PURE__ */ new Map()); + const forceChange = useRef2(false); + each7(transitions, (t, i) => { + const key = t.key; + const prevPhase = t.phase; + const p = propsFn ? propsFn() : props; + let to2; + let phase; + const propsDelay = callProp(p.delay || 0, key); + if (prevPhase == "mount" /* MOUNT */) { + to2 = p.enter; + phase = "enter" /* ENTER */; + } else { + const isLeave = keys.indexOf(key) < 0; + if (prevPhase != "leave" /* LEAVE */) { + if (isLeave) { + to2 = p.leave; + phase = "leave" /* LEAVE */; + } else if (to2 = p.update) { + phase = "update" /* UPDATE */; + } else + return; + } else if (!isLeave) { + to2 = p.enter; + phase = "enter" /* ENTER */; + } else + return; + } + to2 = callProp(to2, t.item, i); + to2 = is11.obj(to2) ? inferTo(to2) : { to: to2 }; + if (!to2.config) { + const config2 = propsConfig || defaultProps.config; + to2.config = callProp(config2, t.item, i, phase); + } + delay += trail; + const payload = { + ...defaultProps, + // we need to add our props.delay value you here. + delay: propsDelay + delay, + ref: propsRef, + immediate: p.immediate, + // This prevents implied resets. + reset: false, + // Merge any phase-specific props. + ...to2 + }; + if (phase == "enter" /* ENTER */ && is11.und(payload.from)) { + const p2 = propsFn ? propsFn() : props; + const from = is11.und(p2.initial) || prevTransitions ? p2.from : p2.initial; + payload.from = callProp(from, t.item, i); + } + const { onResolve } = payload; + payload.onResolve = (result) => { + callProp(onResolve, result); + const transitions2 = usedTransitions.current; + const t2 = transitions2.find((t3) => t3.key === key); + if (!t2) + return; + if (result.cancelled && t2.phase != "update" /* UPDATE */) { + return; + } + if (t2.ctrl.idle) { + const idle = transitions2.every((t3) => t3.ctrl.idle); + if (t2.phase == "leave" /* LEAVE */) { + const expiry = callProp(expires, t2.item); + if (expiry !== false) { + const expiryMs = expiry === true ? 0 : expiry; + t2.expired = true; + if (!idle && expiryMs > 0) { + if (expiryMs <= 2147483647) + t2.expirationId = setTimeout(forceUpdate, expiryMs); + return; + } + } + } + if (idle && transitions2.some((t3) => t3.expired)) { + exitingTransitions.current.delete(t2); + if (exitBeforeEnter) { + forceChange.current = true; + } + forceUpdate(); + } + } + }; + const springs = getSprings(t.ctrl, payload); + if (phase === "leave" /* LEAVE */ && exitBeforeEnter) { + exitingTransitions.current.set(t, { phase, springs, payload }); + } else { + changes.set(t, { phase, springs, payload }); + } + }); + const context = useContext3(SpringContext); + const prevContext = usePrev2(context); + const hasContext = context !== prevContext && hasProps(context); + useIsomorphicLayoutEffect4(() => { + if (hasContext) { + each7(transitions, (t) => { + t.ctrl.start({ default: context }); + }); + } + }, [context]); + each7(changes, (_, t) => { + if (exitingTransitions.current.size) { + const ind = transitions.findIndex((state) => state.key === t.key); + transitions.splice(ind, 1); + } + }); + useIsomorphicLayoutEffect4( + () => { + each7( + exitingTransitions.current.size ? exitingTransitions.current : changes, + ({ phase, payload }, t) => { + const { ctrl } = t; + t.phase = phase; + ref?.add(ctrl); + if (hasContext && phase == "enter" /* ENTER */) { + ctrl.start({ default: context }); + } + if (payload) { + replaceRef(ctrl, payload.ref); + if ((ctrl.ref || ref) && !forceChange.current) { + ctrl.update(payload); + } else { + ctrl.start(payload); + if (forceChange.current) { + forceChange.current = false; + } + } + } + } + ); + }, + reset ? void 0 : deps + ); + const renderTransitions = (render) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, transitions.map((t, i) => { + const { springs } = changes.get(t) || t.ctrl; + const elem = render({ ...springs }, t.item, t, i); + return elem && elem.type ? /* @__PURE__ */ React2.createElement( + elem.type, + { + ...elem.props, + key: is11.str(t.key) || is11.num(t.key) ? t.key : t.ctrl.id, + ref: elem.ref + } + ) : elem; + })); + return ref ? [renderTransitions, ref] : renderTransitions; +} +var nextKey = 1; +function getKeys(items, { key, keys = key }, prevTransitions) { + if (keys === null) { + const reused = /* @__PURE__ */ new Set(); + return items.map((item) => { + const t = prevTransitions && prevTransitions.find( + (t2) => t2.item === item && t2.phase !== "leave" /* LEAVE */ && !reused.has(t2) + ); + if (t) { + reused.add(t); + return t.key; + } + return nextKey++; + }); + } + return is11.und(keys) ? items : is11.fun(keys) ? items.map(keys) : toArray4(keys); +} + +// src/hooks/useScroll.ts + +var useScroll = ({ + container, + ...springOptions +} = {}) => { + const [scrollValues, api] = useSpring( + () => ({ + scrollX: 0, + scrollY: 0, + scrollXProgress: 0, + scrollYProgress: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect5(() => { + const cleanupScroll = onScroll( + ({ x, y }) => { + api.start({ + scrollX: x.current, + scrollXProgress: x.progress, + scrollY: y.current, + scrollYProgress: y.progress + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each8(Object.values(scrollValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return scrollValues; +}; + +// src/hooks/useResize.ts + +var useResize = ({ + container, + ...springOptions +}) => { + const [sizeValues, api] = useSpring( + () => ({ + width: 0, + height: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect6(() => { + const cleanupScroll = onResize( + ({ width, height }) => { + api.start({ + width, + height, + immediate: sizeValues.width.get() === 0 || sizeValues.height.get() === 0 + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each9(Object.values(sizeValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return sizeValues; +}; + +// src/hooks/useInView.ts + + +var defaultThresholdOptions = { + any: 0, + all: 1 +}; +function useInView(props, args) { + const [isInView, setIsInView] = useState2(false); + const ref = useRef3(); + const propsFn = is12.fun(props) && props; + const springsProps = propsFn ? propsFn() : {}; + const { to: to2 = {}, from = {}, ...restSpringProps } = springsProps; + const intersectionArguments = propsFn ? args : props; + const [springs, api] = useSpring(() => ({ from, ...restSpringProps }), []); + useIsomorphicLayoutEffect7(() => { + const element = ref.current; + const { + root, + once, + amount = "any", + ...restArgs + } = intersectionArguments ?? {}; + if (!element || once && isInView || typeof IntersectionObserver === "undefined") + return; + const activeIntersections = /* @__PURE__ */ new WeakMap(); + const onEnter = () => { + if (to2) { + api.start(to2); + } + setIsInView(true); + const cleanup = () => { + if (from) { + api.start(from); + } + setIsInView(false); + }; + return once ? void 0 : cleanup; + }; + const handleIntersection = (entries) => { + entries.forEach((entry) => { + const onLeave = activeIntersections.get(entry.target); + if (entry.isIntersecting === Boolean(onLeave)) { + return; + } + if (entry.isIntersecting) { + const newOnLeave = onEnter(); + if (is12.fun(newOnLeave)) { + activeIntersections.set(entry.target, newOnLeave); + } else { + observer.unobserve(entry.target); + } + } else if (onLeave) { + onLeave(); + activeIntersections.delete(entry.target); + } + }); + }; + const observer = new IntersectionObserver(handleIntersection, { + root: root && root.current || void 0, + threshold: typeof amount === "number" || Array.isArray(amount) ? amount : defaultThresholdOptions[amount], + ...restArgs + }); + observer.observe(element); + return () => observer.unobserve(element); + }, [intersectionArguments]); + if (propsFn) { + return [ref, springs]; + } + return [ref, isInView]; +} + +// src/components/Spring.tsx +function Spring({ children, ...props }) { + return children(useSpring(props)); +} + +// src/components/Trail.tsx + +function Trail({ + items, + children, + ...props +}) { + const trails = useTrail(items.length, props); + return items.map((item, index) => { + const result = children(item, index); + return is13.fun(result) ? result(trails[index]) : result; + }); +} + +// src/components/Transition.tsx +function Transition({ + items, + children, + ...props +}) { + return useTransition(items, props)(children); +} + +// src/interpolate.ts + + +// src/Interpolation.ts + + +var Interpolation = class extends FrameValue { + constructor(source, args) { + super(); + this.source = source; + /** Equals false when in the frameloop */ + this.idle = true; + /** The inputs which are currently animating */ + this._active = /* @__PURE__ */ new Set(); + this.calc = createInterpolator(...args); + const value = this._get(); + const nodeType = getAnimatedType(value); + setAnimated(this, nodeType.create(value)); + } + advance(_dt) { + const value = this._get(); + const oldValue = this.get(); + if (!isEqual(value, oldValue)) { + getAnimated(this).setValue(value); + this._onChange(value, this.idle); + } + if (!this.idle && checkIdle(this._active)) { + becomeIdle(this); + } + } + _get() { + const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source)); + return this.calc(...inputs); + } + _start() { + if (this.idle && !checkIdle(this._active)) { + this.idle = false; + react_spring_shared_modern_each(getPayload(this), (node) => { + node.done = false; + }); + if (globals_exports.skipAnimation) { + raf.batchedUpdates(() => this.advance()); + becomeIdle(this); + } else { + frameLoop.start(this); + } + } + } + // Observe our sources only when we're observed. + _attach() { + let priority = 1; + react_spring_shared_modern_each(toArray(this.source), (source) => { + if (hasFluidValue(source)) { + addFluidObserver(source, this); + } + if (isFrameValue(source)) { + if (!source.idle) { + this._active.add(source); + } + priority = Math.max(priority, source.priority + 1); + } + }); + this.priority = priority; + this._start(); + } + // Stop observing our sources once we have no observers. + _detach() { + react_spring_shared_modern_each(toArray(this.source), (source) => { + if (hasFluidValue(source)) { + removeFluidObserver(source, this); + } + }); + this._active.clear(); + becomeIdle(this); + } + /** @internal */ + eventObserved(event) { + if (event.type == "change") { + if (event.idle) { + this.advance(); + } else { + this._active.add(event.parent); + this._start(); + } + } else if (event.type == "idle") { + this._active.delete(event.parent); + } else if (event.type == "priority") { + this.priority = toArray(this.source).reduce( + (highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), + 0 + ); + } + } +}; +function isIdle(source) { + return source.idle !== false; +} +function checkIdle(active) { + return !active.size || Array.from(active).every(isIdle); +} +function becomeIdle(self) { + if (!self.idle) { + self.idle = true; + react_spring_shared_modern_each(getPayload(self), (node) => { + node.done = true; + }); + callFluidObservers(self, { + type: "idle", + parent: self + }); + } +} + +// src/interpolate.ts +var react_spring_core_modern_to = (source, ...args) => new Interpolation(source, args); +var react_spring_core_modern_interpolate = (source, ...args) => (deprecateInterpolate2(), new Interpolation(source, args)); + +// src/globals.ts + +globals_exports.assign({ + createStringInterpolator: createStringInterpolator2, + to: (source, args) => new Interpolation(source, args) +}); +var react_spring_core_modern_update = frameLoop.advance; + +// src/index.ts + + + +//# sourceMappingURL=react-spring_core.modern.mjs.map ;// CONCATENATED MODULE: external "ReactDOM" var external_ReactDOM_namespaceObject = window["ReactDOM"]; -;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/esm/index.js -var dist_esm_k=/^--/;function dist_esm_I(t,e){return e==null||typeof e=="boolean"||e===""?"":typeof e=="number"&&e!==0&&!dist_esm_k.test(t)&&!(web_dist_esm_c.hasOwnProperty(t)&&web_dist_esm_c[t])?e+"px":(""+e).trim()}var web_dist_esm_v={};function esm_V(t,e){if(!t.nodeType||!t.setAttribute)return!1;let r=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{style:i,children:s,scrollTop:u,scrollLeft:l,viewBox:a,...n}=e,d=Object.values(n),m=Object.keys(n).map(o=>r||t.hasAttribute(o)?o:web_dist_esm_v[o]||(web_dist_esm_v[o]=o.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));s!==void 0&&(t.textContent=s);for(let o in i)if(i.hasOwnProperty(o)){let p=dist_esm_I(o,i[o]);dist_esm_k.test(o)?t.style.setProperty(o,p):t.style[o]=p}m.forEach((o,p)=>{t.setAttribute(o,d[p])}),u!==void 0&&(t.scrollTop=u),l!==void 0&&(t.scrollLeft=l),a!==void 0&&t.setAttribute("viewBox",a)}var web_dist_esm_c={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},esm_F=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),esm_L=["Webkit","Ms","Moz","O"];web_dist_esm_c=Object.keys(web_dist_esm_c).reduce((t,e)=>(esm_L.forEach(r=>t[esm_F(r,e)]=t[e]),t),web_dist_esm_c);var esm_=/^(matrix|translate|scale|rotate|skew)/,esm_$=/^(translate)/,dist_esm_G=/^(rotate|skew)/,web_dist_esm_y=(t,e)=>esm_l.num(t)&&t!==0?t+e:t,web_dist_esm_h=(t,e)=>esm_l.arr(t)?t.every(r=>web_dist_esm_h(r,e)):esm_l.num(t)?t===e:parseFloat(t)===e,esm_g=class extends dist_esm_u{constructor({x:e,y:r,z:i,...s}){let u=[],l=[];(e||r||i)&&(u.push([e||0,r||0,i||0]),l.push(a=>[`translate3d(${a.map(n=>web_dist_esm_y(n,"px")).join(",")})`,web_dist_esm_h(a,0)])),xt(s,(a,n)=>{if(n==="transform")u.push([a||""]),l.push(d=>[d,d===""]);else if(esm_.test(n)){if(delete s[n],esm_l.und(a))return;let d=esm_$.test(n)?"px":dist_esm_G.test(n)?"deg":"";u.push(ht(a)),l.push(n==="rotate3d"?([m,o,p,O])=>[`rotate3d(${m},${o},${p},${web_dist_esm_y(O,d)})`,web_dist_esm_h(O,0)]:m=>[`${n}(${m.map(o=>web_dist_esm_y(o,d)).join(",")})`,web_dist_esm_h(m,n.startsWith("scale")?1:0)])}}),u.length&&(s.transform=new dist_esm_x(u,l)),super(s)}},dist_esm_x=class extends esm_ge{constructor(r,i){super();this.inputs=r;this.transforms=i}_value=null;get(){return this._value||(this._value=this._get())}_get(){let r="",i=!0;return Ve(this.inputs,(s,u)=>{let l=ve(s[0]),[a,n]=this.transforms[u](esm_l.arr(l)?l:s.map(ve));r+=" "+a,i=i&&n}),i?"none":r}observerAdded(r){r==1&&Ve(this.inputs,i=>Ve(i,s=>Pt(s)&&Gt(s,this)))}observerRemoved(r){r==0&&Ve(this.inputs,i=>Ve(i,s=>Pt(s)&&Qt(s,this)))}eventObserved(r){r.type=="change"&&(this._value=null),$t(this,r)}};var esm_C=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];esm_p.assign({batchedUpdates:external_ReactDOM_namespaceObject.unstable_batchedUpdates,createStringInterpolator:Xt,colors:It});var dist_esm_q=esm_Ke(esm_C,{applyAnimatedValues:esm_V,createAnimatedStyle:t=>new esm_g(t),getComponentProps:({scrollTop:t,scrollLeft:e,...r})=>r}),dist_esm_it=dist_esm_q.animated; +;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs +// src/index.ts + + + + +// src/applyAnimatedValues.ts +var isCustomPropRE = /^--/; +function dangerousStyleValue(name, value) { + if (value == null || typeof value === "boolean" || value === "") + return ""; + if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) + return value + "px"; + return ("" + value).trim(); +} +var attributeCache = {}; +function applyAnimatedValues(instance, props) { + if (!instance.nodeType || !instance.setAttribute) { + return false; + } + const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter"; + const { style, children, scrollTop, scrollLeft, viewBox, ...attributes } = props; + const values = Object.values(attributes); + const names = Object.keys(attributes).map( + (name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace( + /([A-Z])/g, + // Attributes are written in dash case + (n) => "-" + n.toLowerCase() + )) + ); + if (children !== void 0) { + instance.textContent = children; + } + for (const name in style) { + if (style.hasOwnProperty(name)) { + const value = dangerousStyleValue(name, style[name]); + if (isCustomPropRE.test(name)) { + instance.style.setProperty(name, value); + } else { + instance.style[name] = value; + } + } + } + names.forEach((name, i) => { + instance.setAttribute(name, values[i]); + }); + if (scrollTop !== void 0) { + instance.scrollTop = scrollTop; + } + if (scrollLeft !== void 0) { + instance.scrollLeft = scrollLeft; + } + if (viewBox !== void 0) { + instance.setAttribute("viewBox", viewBox); + } +} +var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true +}; +var prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1); +var prefixes = ["Webkit", "Ms", "Moz", "O"]; +isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => { + prefixes.forEach((prefix) => acc[prefixKey(prefix, prop)] = acc[prop]); + return acc; +}, isUnitlessNumber); + +// src/AnimatedStyle.ts + + +var domTransforms = /^(matrix|translate|scale|rotate|skew)/; +var pxTransforms = /^(translate)/; +var degTransforms = /^(rotate|skew)/; +var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value; +var isValueIdentity = (value, id) => is.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id; +var AnimatedStyle = class extends AnimatedObject { + constructor({ x, y, z, ...style }) { + const inputs = []; + const transforms = []; + if (x || y || z) { + inputs.push([x || 0, y || 0, z || 0]); + transforms.push((xyz) => [ + `translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, + // prettier-ignore + isValueIdentity(xyz, 0) + ]); + } + eachProp(style, (value, key) => { + if (key === "transform") { + inputs.push([value || ""]); + transforms.push((transform) => [transform, transform === ""]); + } else if (domTransforms.test(key)) { + delete style[key]; + if (is.und(value)) + return; + const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : ""; + inputs.push(toArray(value)); + transforms.push( + key === "rotate3d" ? ([x2, y2, z2, deg]) => [ + `rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, + isValueIdentity(deg, 0) + ] : (input) => [ + `${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, + isValueIdentity(input, key.startsWith("scale") ? 1 : 0) + ] + ); + } + }); + if (inputs.length) { + style.transform = new FluidTransform(inputs, transforms); + } + super(style); + } +}; +var FluidTransform = class extends FluidValue { + constructor(inputs, transforms) { + super(); + this.inputs = inputs; + this.transforms = transforms; + this._value = null; + } + get() { + return this._value || (this._value = this._get()); + } + _get() { + let transform = ""; + let identity = true; + react_spring_shared_modern_each(this.inputs, (input, i) => { + const arg1 = getFluidValue(input[0]); + const [t, id] = this.transforms[i]( + is.arr(arg1) ? arg1 : input.map(getFluidValue) + ); + transform += " " + t; + identity = identity && id; + }); + return identity ? "none" : transform; + } + // Start observing our inputs once we have an observer. + observerAdded(count) { + if (count == 1) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && addFluidObserver(value, this) + ) + ); + } + // Stop observing our inputs once we have no observers. + observerRemoved(count) { + if (count == 0) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && removeFluidObserver(value, this) + ) + ); + } + eventObserved(event) { + if (event.type == "change") { + this._value = null; + } + callFluidObservers(this, event); + } +}; + +// src/primitives.ts +var primitives = [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + // SVG + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "tspan" +]; + +// src/index.ts + +globals_exports.assign({ + batchedUpdates: external_ReactDOM_namespaceObject.unstable_batchedUpdates, + createStringInterpolator: createStringInterpolator2, + colors: colors2 +}); +var host = createHost(primitives, { + applyAnimatedValues, + createAnimatedStyle: (style) => new AnimatedStyle(style), + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props +}); +var animated = host.animated; + +//# sourceMappingURL=react-spring_web.modern.mjs.map ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-moving-animation/index.js /** * External dependencies @@ -16905,7 +35338,7 @@ function useMovingAnimation(_ref) { preserveScrollPosition(); } - esm_J({ + useSpring({ from: { x: transform.x, y: transform.y @@ -18499,7 +36932,7 @@ const withRegistryProvider = (0,external_wp_compose_namespaceObject.createHigher -const noop = () => {}; +const use_block_sync_noop = () => {}; /** * A function to call when the block value has been updated in the block-editor * store. @@ -18558,8 +36991,8 @@ function useBlockSync(_ref) { clientId = null, value: controlledBlocks, selection: controlledSelection, - onChange = noop, - onInput = noop + onChange = use_block_sync_noop, + onInput = use_block_sync_noop } = _ref; const registry = (0,external_wp_data_namespaceObject.useRegistry)(); const { @@ -20372,7 +38805,7 @@ function IframeIfReady(props, ref) { /* harmony default export */ var iframe = ((0,external_wp_element_namespaceObject.forwardRef)(IframeIfReady)); ;// CONCATENATED MODULE: ./node_modules/colord/index.mjs -var colord_r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},colord_u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},colord_i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},colord_h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},colord_b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},colord_g=function(r){return{h:colord_u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},colord_d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},colord_f=function(r){return colord_b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},colord_c=function(r){return{h:(t=colord_h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},colord_l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_y={string:[[function(r){var t=colord_i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=colord_v.exec(r)||colord_m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({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(t){var n=colord_l.exec(t)||colord_p.exec(t);if(!n)return null;var e,u,a=colord_g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(colord_r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return colord_f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=colord_g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return colord_f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:colord_u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return colord_b(h)},"hsv"]]},colord_N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return colord_d(colord_c(this.rgba))},r.prototype.toHslString=function(){return r=colord_d(colord_c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=colord_h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return colord_w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),colord_w(colord_M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),colord_w(colord_M(this.rgba,-r))},r.prototype.grayscale=function(){return colord_w(colord_M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),colord_w(colord_$(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),colord_w(colord_$(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?colord_w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=colord_c(this.rgba);return"number"==typeof r?colord_w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===colord_w(r).toHex()},r}(),colord_w=function(r){return r instanceof colord_j?r:new colord_j(r)},colord_S=[],colord_k=function(r){r.forEach(function(r){colord_S.indexOf(r)<0&&(r(colord_j,colord_y),colord_S.push(r))})},colord_E=function(){return new colord_j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({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(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; ;// CONCATENATED MODULE: ./node_modules/colord/plugins/names.mjs /* harmony default export */ function names(e,f){var a={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 d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u { @@ -21844,7 +40277,7 @@ function useDarkThemeBodyClassName(styles) { backgroundColor = defaultView.getComputedStyle(canvas, null).getPropertyValue('background-color'); } - const colordBackgroundColor = colord_w(backgroundColor); // If background is transparent, it should be treated as light color. + const colordBackgroundColor = w(backgroundColor); // If background is transparent, it should be treated as light color. if (colordBackgroundColor.luminance() > 0.5 || colordBackgroundColor.alpha() === 0) { body.classList.remove('is-dark-theme'); @@ -21888,7 +40321,7 @@ function getValuesFromColors() { a: [] }; colors.forEach(color => { - const rgbColor = colord_w(color).toRgb(); + const rgbColor = w(color).toRgb(); values.r.push(rgbColor.r / 255); values.g.push(rgbColor.g / 255); values.b.push(rgbColor.b / 255); @@ -32318,7 +50751,7 @@ const COMMON_PROPS = { // down the toolbar will stay on screen by adopting a sticky position at the // top of the viewport. -const DEFAULT_PROPS = { ...COMMON_PROPS, +const use_block_toolbar_popover_props_DEFAULT_PROPS = { ...COMMON_PROPS, flip: false, shift: true }; // When there isn't enough height between the top of the block and the editor @@ -32345,7 +50778,7 @@ const RESTRICTED_HEIGHT_PROPS = { ...COMMON_PROPS, function getProps(contentElement, selectedBlockElement, scrollContainer, toolbarHeight, isSticky) { if (!contentElement || !selectedBlockElement) { - return DEFAULT_PROPS; + return use_block_toolbar_popover_props_DEFAULT_PROPS; } // Get how far the content area has been scrolled. @@ -32364,7 +50797,7 @@ function getProps(contentElement, selectedBlockElement, scrollContainer, toolbar const isBlockTallerThanViewport = blockRect.height > viewportHeight - toolbarHeight; // Sticky blocks are treated as if they will never have enough space for the toolbar above. if (!isSticky && (hasSpaceForToolbarAbove || isBlockTallerThanViewport)) { - return DEFAULT_PROPS; + return use_block_toolbar_popover_props_DEFAULT_PROPS; } return RESTRICTED_HEIGHT_PROPS; @@ -34449,7 +52882,7 @@ function resetBorderRadius(_ref) { -colord_k([names, a11y]); +k([names, a11y]); /** * Provided an array of color objects as set by the theme or by the editor defaults, * and the values of the defined color or custom color returns a color object describing the color. @@ -34516,7 +52949,7 @@ function getColorClassName(colorContextName, colorSlug) { */ function getMostReadableColor(colors, colorValue) { - const colordColor = colord_w(colorValue); + const colordColor = w(colorValue); const getColorContrast = _ref => { let { @@ -35574,7 +54007,7 @@ function ColorGradientSettingsDropdown(_ref4) { -colord_k([names, a11y]); +k([names, a11y]); function ContrastChecker(_ref) { let { @@ -35609,7 +54042,7 @@ function ContrastChecker(_ref) { color: currentLinkColor, description: (0,external_wp_i18n_namespaceObject.__)('link color') }]; - const colordBackgroundColor = colord_w(currentBackgroundColor); + const colordBackgroundColor = w(currentBackgroundColor); const backgroundColorHasTransparency = colordBackgroundColor.alpha() < 1; const backgroundColorBrightness = colordBackgroundColor.brightness(); const isReadableOptions = { @@ -35625,7 +54058,7 @@ function ContrastChecker(_ref) { continue; } - const colordTextColor = colord_w(item.color); + const colordTextColor = w(item.color); const isColordTextReadable = colordTextColor.isReadable(colordBackgroundColor, isReadableOptions); const textHasTransparency = colordTextColor.alpha() < 1; // If the contrast is not readable. @@ -39062,7 +57495,7 @@ function DuotoneControl(_ref) { const duotone_EMPTY_ARRAY = []; -colord_k([names]); +k([names]); /** * SVG and stylesheet needed for rendering the duotone filter. * @@ -41418,7 +59851,7 @@ const listView = (0,external_wp_element_namespaceObject.createElement)(external_ */ -const AnimatedTreeGridRow = dist_esm_it(external_wp_components_namespaceObject.__experimentalTreeGridRow); +const AnimatedTreeGridRow = animated(external_wp_components_namespaceObject.__experimentalTreeGridRow); const ListViewLeaf = (0,external_wp_element_namespaceObject.forwardRef)((_ref, ref) => { let { isSelected, @@ -44544,7 +62977,7 @@ function restrictPosition(position, mediaSize, cropSize, zoom, rotation) { } function restrictPositionCoord(position, mediaSize, cropSize, zoom) { var maxPosition = mediaSize * zoom / 2 - cropSize / 2; - return clamp(position, -maxPosition, maxPosition); + return index_module_clamp(position, -maxPosition, maxPosition); } function getDistanceBetweenPoints(pointA, pointB) { return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2)); @@ -44615,7 +63048,7 @@ function noOp(_max, value) { function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) { var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea - var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom); + var zoom = index_module_clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom); var crop = { x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100), y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100) @@ -44640,7 +63073,7 @@ function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotat rotation = 0; } var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); - var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom); + var zoom = index_module_clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom); var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width; var crop = { x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom, @@ -44676,7 +63109,7 @@ function rotateSize(width, height, rotation) { /** * Clamp value between min and max */ -function clamp(value, min, max) { +function index_module_clamp(value, min, max) { return Math.min(Math.max(value, min), max); } /** @@ -45031,7 +63464,7 @@ var Cropper = /** @class */function (_super) { _c = _b.shouldUpdatePosition, shouldUpdatePosition = _c === void 0 ? true : _c; if (!_this.state.cropSize || !_this.props.onZoomChange) return; - var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom); + var newZoom = index_module_clamp(zoom, _this.props.minZoom, _this.props.maxZoom); if (shouldUpdatePosition) { var zoomPoint = _this.getPointOnContainer(point); var zoomTarget = _this.getPointOnMedia(zoomPoint); @@ -55567,7 +74000,7 @@ const Appender = (0,external_wp_element_namespaceObject.forwardRef)((_ref, ref) */ -const leaf_AnimatedTreeGridRow = dist_esm_it(external_wp_components_namespaceObject.__experimentalTreeGridRow); +const leaf_AnimatedTreeGridRow = animated(external_wp_components_namespaceObject.__experimentalTreeGridRow); function leaf_ListViewLeaf(_ref) { let { isSelected, diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index 9b87dd4f86..eb3d9df070 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -1,15 +1,10 @@ /*! This file is auto-generated */ -!function(){var e={6411:function(e,t){var n,o,r; +!function(){var e={480:function(e,t,n){"use strict";var r=n(5304)("ArrayBuffer.prototype.byteLength",!0),o=n(4602);e.exports=function(e){return o(e)?r?r(e):e.byteLength:NaN}},5304:function(e,t,n){"use strict";var r=n(3803),o=n(6427),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},6427:function(e,t,n){"use strict";var r=n(7870),o=n(3803),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},3303:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8040:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9063);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9063:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6411:function(e,t){var n,r,o; /*! autosize 4.0.4 license: MIT http://www.jacklmoore.com/autosize -*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:p}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(re.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function a(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=s+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=s&&m+1>=c)return a([{value:this.join(t),count:t.length}]);function g(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],g=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var f=d&&d.newPos+1=s&&g+1>=c)return a(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();g()||e()}),0)}();else for(;u<=d;){var f=g();if(f)return f}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,a=i-o,s=0;i+10?!0===i?o.scrollTop(t,k.top+_.top):!1===i?o.scrollTop(t,k.top+y.top):_.top<0?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top):l||((i=void 0===i||!!i)?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top)),r&&(_.left<0||y.left>0?!0===a?o.scrollLeft(t,k.left+_.left):!1===a?o.scrollLeft(t,k.left+y.left):_.left<0?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left):l||((a=void 0===a||!!a)?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tt},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||o},webkit:function(){return v()||r},safari:function(){return b.webkit()},chrome:function(){return v()||l},windows:function(){return v()||s},osx:function(){return v()||a},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||m||u||f},nativeApp:function(){return v()||g},android:function(){return v()||u},ipad:function(){return v()||m}};e.exports=b},7939:function(e,t,n){"use strict";var o,r=n(3110);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) +*/r=[e,t],n=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),d()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function p(){if(0!==e.scrollHeight){var r=u(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){p();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(r)r(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===a&&p?p.enumerable:!a,value:n,writable:null===s&&p?p.writable:!s});else{if(!u&&(a||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1198:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,l=t.length,a=0,s=0;ie.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var l=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,p=s+c,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&f+1>=c)return a([{value:this.join(t),count:t.length}]);function m(){for(var n=-1*u;n<=u;n+=2){var i=void 0,p=d[n-1],f=d[n+1],m=(f?f.newPos:0)-n;p&&(d[n-1]=void 0);var y=p&&p.newPos+1=s&&m+1>=c)return a(r(l,i.components,t,e,l.useLongestToken));d[n]=i}else d[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>p)return i();m()||e()}),0)}();else for(;u<=p;){var y=m();if(y)return y}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,l=e.newPos,a=l-r,s=0;l+10?!0===l?r.scrollTop(t,b.top+_.top):!1===l?r.scrollTop(t,b.top+k.top):_.top<0?r.scrollTop(t,b.top+_.top):r.scrollTop(t,b.top+k.top):i||((l=void 0===l||!!l)?r.scrollTop(t,b.top+_.top):r.scrollTop(t,b.top+k.top)),o&&(_.left<0||k.left>0?!0===a?r.scrollLeft(t,b.left+_.left):!1===a?r.scrollLeft(t,b.left+k.left):_.left<0?r.scrollLeft(t,b.left+_.left):r.scrollLeft(t,b.left+k.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,b.left+_.left):r.scrollLeft(t,b.left+k.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},4482:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(7457);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7457:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6788:function(e){"use strict";e.exports=EvalError},6716:function(e){"use strict";e.exports=Error},9204:function(e){"use strict";e.exports=RangeError},9908:function(e){"use strict";e.exports=ReferenceError},6724:function(e){"use strict";e.exports=SyntaxError},1642:function(e){"use strict";e.exports=TypeError},1451:function(e){"use strict";e.exports=URIError},7998:function(e,t,n){"use strict";var r=n(1642);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},5249:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(3777),i=n(5443),l=n(8659),a=n(3082),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,l,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(l=0;l1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(l(e)||a(e))&&(n="string"),s(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},5619:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var l=i[o];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},4843:function(e,t,n){"use strict";var r=n(5443),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,l=function(e,t,n){for(var r=0,o=e.length;r=3&&(i=n),"[object Array]"===o.call(e)?l(e,t,i):"string"==typeof e?a(e,t,i):s(e,t,i)}},3828:function(e,t,n){"use strict";var r=n(2473)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},8819:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5810:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1759);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1759:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8198:function(e,t,n){"use strict";var r=n(8918),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1856:function(e){"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9429:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(766);e.exports=i.call(r,o)},2075:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r-1?o(n):n}},4374:function(e,t,n){"use strict";var r=n(7410),o=n(3767),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1818:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6945:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6992);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6992:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5443:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=o?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(l(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8659:function(e){"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(r?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},5604:function(e,t,n){"use strict";var r=n(6131)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},6131:function(e,t,n){"use strict";var r=n(6254),o=n(7679),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7679:function(e,t,n){"use strict";var r=n(578),o=n(6254),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},901:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},2665:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2408);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2408:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3082:function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(9905)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},2527:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e){return!!r(e)}},9894:function(e,t,n){var r=n(4827);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,l=document.createElement(i);l.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&l.setAttribute("rows","1");var a=r(e,"font-size");l.style.fontSize=a,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},7970:function(e,t,n){e.exports=n(195)},3110:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:function(e){var t,n,r,o,i,l,a,s,c,u,p,d,f,m,y,g=!1;function h(){if(!g){g=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),m=/FBAN\/\w+;/i.exec(e),y=/Mobile/i.exec(e),p=!!/Win64/.exec(e),h){(t=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(e);l=b?parseFloat(b[1])+4:t,n=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(v){if(v[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);a=!_||parseFloat(_[1].replace("_","."))}else a=!1;s=!!v[2],c=!!v[3]}else a=s=c=!1}}var v={ie:function(){return h()||t},ieCompatibilityMode:function(){return h()||l>t},ie64:function(){return v.ie()&&p},firefox:function(){return h()||n},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return v.webkit()},chrome:function(){return h()||i},windows:function(){return h()||s},osx:function(){return h()||a},linux:function(){return h()||c},iphone:function(){return h()||d},mobile:function(){return h()||d||f||u||y},nativeApp:function(){return h()||m},android:function(){return h()||u},ipad:function(){return h()||f}};e.exports=v},7939:function(e,t,n){"use strict";var r,o=n(3110);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * @@ -23,7 +18,12 @@ * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT - */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},195:function(e,t,n){"use strict";var o=n(3812),r=n(7939);function l(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},5372:function(e,t,n){"use strict";var o=n(9567);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),C(r,e.slice(t,t+o),n)}const w=e=>e;function B(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),B(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((t=>{let{innerBlocks:r,...l}=t;n.push([l.clientId,e]),null!=r&&r.length&&o.push([l.clientId,r])}))}return n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function T(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}function M(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function N(e){return x(e,(e=>e.attributes))}function P(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&k()(e.clientIds,t.clientIds)&&function(e,t){return k()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function L(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=e.tree,r=new Set([]),l=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){l.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of l)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const A=(0,m.pipe)(g.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:l}=t.byClientId.get(r);"core/block"===l&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),L(o,n.blocks),R(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),R(o,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),R(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=T(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),L(o,n.blocks),R(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!o.byClientId.get(t.parents.get(e))||r.push(t.parents.get(e));R(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents.get(r)||""!==t.parents.get(r)&&!o.byClientId.get(t.parents.get(r))||e.push(t.parents.get(r));o.tree=new Map(o.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),R(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),R(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),R(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),R(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let l=r;if(n.blocks.length){l=e(l,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(l.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),l.order=r,l.tree=new Map(l.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&l.tree.set(n,t.tree.get(n))}))}return l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(M(n.blocks)),attributes:new Map(N(n.blocks)),order:B(n.blocks),parents:new Map(I(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),L(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(a=null==o?void 0:o.isPersistentChange)||void 0===a||a;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!P(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return M(t.blocks).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),M(t.blocks).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return N(t.blocks).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const l of t.clientIds){var n;const i=Object.entries(t.uniqueByBlock?t.attributes[l]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===i.length)continue;let a=!1;const s=e.get(l),c={};i.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),o=o||a,a&&r.set(l,{...s,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),N(t.blocks).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=B(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=B(t.blocks,n),{index:l=o.length}=t,i=new Map(e);return r.forEach(((e,t)=>{i.set(t,e)})),i.set(n,C(o,r.get(n),l)),i}case"MOVE_BLOCKS_TO_POSITION":{var o,r;const{fromRootClientId:n="",toRootClientId:l="",clientIds:i}=t,{index:a=e.get(l).length}=t;if(n===l){const t=e.get(l).indexOf(i[0]),n=new Map(e);return n.set(l,S(e.get(l),t,a,i.length)),n}const s=new Map(e);return s.set(n,null!==(o=null===(r=e.get(n))||void 0===r?void 0:r.filter((e=>!i.includes(e))))&&void 0!==o?o:[]),s.set(l,C(e.get(l),i,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e.get(o);if(!l.length||r===l[0])return e;const i=l.indexOf(r),a=new Map(e);return a.set(o,S(l,i,i-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e.get(o);if(!i.length||l===i[i.length-1])return e;const a=i.indexOf(r),s=new Map(e);return s.set(o,S(i,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=B(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const l=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,l)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const l=null!==(r=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];l.length!==e.length&&n.set(o,l)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return I(t.blocks).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return I(t.blocks,t.rootClientId||"").forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),I(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,o]=e;n.set(t,o)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function O(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var D=(0,g.combineReducers)({blocks:A,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,o;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;switch(l.type){case"SELECTION_CHANGE":return l.clientId?{selectionStart:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.startOffset},selectionEnd:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.endOffset}}:{selectionStart:l.start||r.selectionStart,selectionEnd:l.end||r.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:a}=l;return{selectionStart:i,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=l;return s===(null===(e=r.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=r.selectionEnd)||void 0===t?void 0:t.clientId)?r:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==r||null===(n=r.selectionStart)||void 0===n?void 0:n.clientId,d=null==r||null===(o=r.selectionEnd)||void 0===o?void 0:o.clientId;if(!u&&!d)return r;if(!l.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!l.blocks.some((e=>e.clientId===d)))return{...r,selectionEnd:r.selectionStart}}return{selectionStart:O(r.selectionStart,l),selectionEnd:O(r.selectionEnd,l)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...o}=e;return o}return e}return k()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:l}=t,i={rootClientId:n,index:o,__unstableWithInserter:r,operation:l};return k()(e,i)?e:i}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n,l=(0,g.select)(a.store).getActiveBlockVariation(r,o);let i=null!=l&&l.name?`${r}/${l.name}`:r;const s={name:i};return"core/block"===r&&(s.ref=o.ref,i+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[i]:{time:t.time,count:e.insertUsage[i]?e.insertUsage[i].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const o=n.blocks.map((e=>e.clientId));return{clientIds:o,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}}),z={};function F(e){return[e]}function V(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o(o,r)=>{let l,i;if("function"==typeof e?(l=e(o),i=e(r)):(l=o[e],i=r[e]),l>i)return"asc"===n?1:-1;if(i>l)return"asc"===n?-1:1;const a=t.findIndex((e=>e===o)),s=t.findIndex((e=>e===r));return a>s?1:s>a?-1:0};function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(q(t,e,n))}const Z=[];function Q(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==u.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`core/social-link-${r}`:o}return n?n.name:null}function X(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function J(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ee(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const te=H(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:J(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function ne(e,t){var n;const o=t&&Zt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(o))||void 0===n?void 0:n.innerBlocks)||Z}const oe=H(((e,t)=>({clientId:t,innerBlocks:re(e,t)})),(e=>[e.blocks.order])),re=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return $e(e,t).map((t=>oe(e,t)))}),(e=>[e.blocks.order])),le=H(((e,t)=>{const n=[];for(const o of t)for(const t of $e(e,o))n.push(t,...le(e,[t]));return n}),(e=>[e.blocks.order])),ie=H((e=>{const t=[];for(const n of $e(e))t.push(n,...le(e,[n]));return t}),(e=>[e.blocks.order])),ae=H(((e,t)=>{const n=ie(e);return t?n.reduce(((n,o)=>e.blocks.byClientId.get(o).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),se=H(((e,t)=>{if(!t)return Z;const n=ie(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:Z}),(e=>[e.blocks.order,e.blocks.byClientId])),ce=H(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ee(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ue=H(((e,t)=>ce(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ce(e,t)));function de(e,t){return $e(e,t).length}function pe(e){return e.selection.selectionStart}function me(e){return e.selection.selectionEnd}function ge(e){return e.selection.selectionStart.clientId}function fe(e){return e.selection.selectionEnd.clientId}function he(e){const t=Me(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function be(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ke(e){const t=be(e);return t?ee(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ye=H((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents.get(r);)r=e.blocks.parents.get(r),o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),Ee=H((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ye(e,t,o);return r.map((t=>({id:t,name:Q(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function Ce(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Se(e,t){const n=be(e),o=[...ye(e,t),t],r=[...ye(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=be(e)),void 0===t&&(t=n<0?Pe(e):Le(e)),!t)return null;const o=_e(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r.get(o),i=l.indexOf(t),a=i+1*n;return a<0||a===l.length?null:l[a]}function Be(e,t){return we(e,t,-1)}function Ie(e,t){return we(e,t,1)}function xe(e){return e.initialPosition}const Te=H((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return Z;if(t.clientId===n.clientId)return[t.clientId];const o=_e(e,t.clientId);if(null===o)return Z;const r=$e(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?Z:Te(e)}const Ne=H((e=>{const t=Me(e);return t.length?t.map((t=>ee(e,t))):Z}),(e=>[...Te.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Pe(e){return Me(e)[0]||null}function Le(e){const t=Me(e);return t[t.length-1]||null}function Re(e,t){return Pe(e)===t}function Ae(e,t){return-1!==Me(e).indexOf(t)}const Oe=H(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=_e(e,n),o=Ae(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function ze(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Fe(e){const t=pe(e),n=me(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Ve(e){const t=pe(e),n=me(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function He(e){return Te(e).some((t=>{const n=Q(e,t);return!(0,a.getBlockType)(n).merge}))}function Ge(e,t){const n=pe(e),o=me(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=_e(e,n.clientId);if(r!==_e(e,o.clientId))return!1;const l=$e(e,r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const c=t?s.clientId:i.clientId,u=t?i.clientId:s.clientId,d=Q(e,c);if(!(0,a.getBlockType)(d).merge)return!1;const p=ee(e,u);if(p.name===d)return!0;const m=(0,a.switchToBlockType)(p,d);return m&&m.length}const Ue=e=>{const t=pe(e),n=me(e);if(t.clientId===n.clientId)return Z;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return Z;const o=_e(e,t.clientId);if(o!==_e(e,n.clientId))return Z;const r=$e(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId),[s,c]=l>i?[n,t]:[t,n],u=ee(e,s.clientId),d=(0,a.getBlockType)(u.name),p=ee(e,c.clientId),m=(0,a.getBlockType)(p.name),g=u.attributes[s.attributeKey],f=p.attributes[c.attributeKey],h=d.attributes[s.attributeKey],v=m.attributes[c.attributeKey];let b=(0,$.create)({html:g,...K(h)}),k=(0,$.create)({html:f,...K(v)});return b=(0,$.remove)(b,0,s.offset),k=(0,$.remove)(k,c.offset,k.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,$.toHTMLString)({value:b,...K(h)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,$.toHTMLString)({value:k,...K(v)})}}]};function $e(e,t){return e.blocks.order.get(t||"")||Z}function je(e,t){return $e(e,_e(e,t)).indexOf(t)}function We(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return $e(e,t).some((t=>We(e,t)||Ae(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Me(e),o=n.indexOf(t);return o>-1&&ont(e,t)))}function rt(){return W()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const lt=H((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=_e(e,l)||void 0,n=je(e,r.clientId)+1):n=$e(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function it(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,o,r;return t?null!==(n=null===(o=Dt(e,t))||void 0===o?void 0:o.templateLock)&&void 0!==n&&n:null!==(r=e.settings.templateLock)&&void 0!==r&&r}const ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},dt=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:r}=zt(e),l=ut(r,t,!0);if(!l)return!1;const i=!!ct(e,o);if(i)return!1;const c=Dt(e,o);if(o&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,d=ut(u,t),p=n.parent,m=Q(e,o),g=ut(p,m);let f=!0;const h=n.ancestor;if(h){f=[o,...ye(e,o)].some((t=>ut(h,Q(e,t))))}const v=f&&(null===d&&null===g||!0===d||!0===g);return v?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,n,o,{getBlock:ee.bind(null,e),getBlockParentsByBlockName:Ee.bind(null,e)}):v},pt=H(dt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>pt(e,Q(e,t),n)))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=J(e,t);if(null===o)return!0;const{lock:r}=o,l=!!ct(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>gt(e,t,n)))}function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=J(e,t);if(null===o)return;const{lock:r}=o,l="all"===ct(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function vt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ht(e,t,n)))}function bt(e,t){const n=J(e,t);if(null===n)return!0;const{lock:o}=n;return!(null!=o&&o.edit)}function kt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function _t(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const yt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&dt(e,t.name,n),Et=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=_t(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Ct(r,l)}},Ct=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},St=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let r=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(r=ce(e,ie(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:l,count:i=0}=_t(e,o)||{},s={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:r,frecency:Ct(l,i)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},wt=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=St(e,{buildScope:"inserter"}),o=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,r=t=>{let n=U;if("web"===u.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,r=(0,a.getBlockType)(t+o);r&&(n=r.icon)}}const r=`core/block/${t.id}`,{time:l,count:i=0}=_t(e,r)||{},s=Ct(l,i);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},l=(0,a.getBlockTypes)().filter((n=>yt(e,n,t))).map(n),i=dt(e,"core/block",t)?$t(e).map(r):[],s=l.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=Et(e,n);t.push(...o.map(r))}return t}),[]),c=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=s.reduce(c,{core:[],noncore:[]}),m=[...d,...p];return[...m,...i]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,$t(e),(0,a.getBlockTypes)()])),Bt=H((function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=Array.isArray(t)?t:[t],[l]=r,i=St(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>yt(e,t,o))).map(i),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,_.__)("Unwrap"),icon:null===(n=c[null==l?void 0:l.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(r).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return Y(u,(e=>c[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),It=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,a.getBlockTypes)().some((n=>yt(e,n,t)));if(n)return!0;const o=dt(e,"core/block",t)&&$t(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,$t(e),(0,a.getBlockTypes)()])),xt=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,a.getBlockTypes)().filter((n=>yt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),Tt=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return W()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),xt(e,t)}),((e,t)=>[...xt.getDependants(e,t)])),Mt=H((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(ee(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Nt=H(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Pt=H((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=zt(e),o=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Nt(e,n)})),r=o.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return r}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Lt=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Pt(e),o=n.filter((n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return pt(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Rt=H((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Z;const o=Lt(e,n),r=Array.isArray(t)?t:[t],l=o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}));return 0===l.length?Z:l}),((e,t,n)=>[...Lt.getDependants(e,n)])),At=H((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return W()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Rt(e,t,n)}),((e,t,n)=>[...Lt.getDependants(e,n)])),Ot=H((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Z;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||Zt(e,n)})))return Z;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Rt(e,o,n)}),((e,t,n)=>[...Rt.getDependants(e,n)]));function Dt(e,t){return e.blockListSettings[t]}function zt(e){return e.settings}function Ft(e){return e.blocks.isPersistentChange}const Vt=H((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Ht=H(((e,t)=>{var n;const o=$t(e).find((e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[$t(e)]));function Gt(e){return e.blocks.isIgnoredChange}function Ut(e){return e.lastBlockAttributesChange}function $t(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Z}function jt(e){return"navigation"===e.editorMode}function Wt(e){return e.editorMode}function Kt(e){return e.hasBlockMovingClientId}function qt(e){return!!e.automaticChangeStatus}function Yt(e,t){return e.highlightedBlock===t}function Zt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Qt=H(((e,t)=>{if(!t.length)return null;const n=be(e);if(t.includes(Q(e,n)))return n;const o=Me(e),r=Ee(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Xt(e,t,n){var o;const{lastBlockInserted:r}=e;return(null===(o=r.clientIds)||void 0===o?void 0:o.includes(t))&&r.source===n}function Jt(e,t){var n,o;return null===(n=null===(o=e.blockVisibility)||void 0===o?void 0:o[t])||void 0===n||n}const en=H((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),tn=H(((e,t)=>{let n,o=t;for(;e.blocks.parents.has(o);)o=e.blocks.parents.get(o),o&&"contentOnly"===ct(e,o)&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function nn(e){return e.temporarilyEditingAsBlocks}function on(e,t){if(!bt(e,t))return!0;const n=Wt(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const o=(0,a.hasBlockSupport)(Q(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&Zt(e,t))&&!We(e,t)&&!Ke(e,t,!0)}function rn(e,t){let n=e.blocks.parents.get(t);for(;n;){if(on(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ln=["inserterMediaCategories","blockInspectorAnimation"];function an(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===u.Platform.OS){n={};for(const t in e)ln.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function sn(){return{type:"HIDE_BLOCK_INTERFACE"}}function cn(){return{type:"SHOW_BLOCK_INTERFACE"}}function un(e){return e.isBlockInterfaceHidden}function dn(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}var pn=window.wp.a11y;const mn="†";function gn(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(mn)}))}const fn=e=>Array.isArray(e)?e:[e],hn=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(vn(e))},vn=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getTemplate(),l=n.getTemplateLock(),i=!r||"all"!==l||(0,a.doBlocksMatchTemplate)(e,r);if(i!==n.isValidTemplate())return o.setTemplateValidity(i),i};function bn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function kn(e){return W()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function _n(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:fn(e),attributes:t,uniqueByBlock:n}}function yn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Cn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:o,dispatch:r}=n;const l=o.getPreviousBlockClientId(e);if(l)r.selectBlock(l,-1);else if(t){const t=o.getBlockRootClientId(e);t&&r.selectBlock(t,-1)}}},Sn=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function wn(){return{type:"START_MULTI_SELECT"}}function Bn(){return{type:"STOP_MULTI_SELECT"}}const In=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o=>{let{select:r,dispatch:l}=o;if(r.getBlockRootClientId(e)!==r.getBlockRootClientId(t))return;l({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=r.getSelectedBlockCount();(0,pn.speak)((0,_.sprintf)((0,_._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function xn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Tn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Mn(e,t){var n,o;const r=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,a.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:l={}}=e,i=r[n];return{...e,attributes:{...l,className:`${o||""} is-style-${i}`.trim()}}}))}const Nn=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:a}=l;e=fn(e),t=Mn(fn(t),i.getSettings());const s=i.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function Pn(e,t){return Nn(e,t)}const Ln=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:fn(t),rootClientId:n})},Rn=Ln("MOVE_BLOCKS_DOWN"),An=Ln("MOVE_BLOCKS_UP"),On=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function Dn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return On([e],t,n,o)}function zn(e,t,n,o,r){return Fn([e],t,n,o,0,r)}const Fn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:a,dispatch:s}=i;null!==r&&"object"==typeof r&&(l=r,r=0,W()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Mn(fn(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function Vn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o,operation:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r}}const Hn=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Gn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Un=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),r=t.getTemplate(),l=(0,a.synchronizeBlocksWithTemplate)(o,r);n.resetBlocks(l)},$n=e=>t=>{let{registry:n,select:o,dispatch:r}=t;const l=o.getSelectionStart(),i=o.getSelectionEnd();if(l.clientId===i.clientId)return;if(!l.attributeKey||!i.attributeKey||void 0===l.offset||void 0===i.offset)return!1;const s=o.getBlockRootClientId(l.clientId);if(s!==o.getBlockRootClientId(i.clientId))return;const c=o.getBlockOrder(s);let u,d;c.indexOf(l.clientId)>c.indexOf(i.clientId)?(u=i,d=l):(u=l,d=i);const p=e?d:u,m=o.getBlock(p.clientId),g=(0,a.getBlockType)(m.name);if(!g.merge)return;const f=u,h=d,v=o.getBlock(f.clientId),b=(0,a.getBlockType)(v.name),k=o.getBlock(h.clientId),_=(0,a.getBlockType)(k.name),y=v.attributes[f.attributeKey],E=k.attributes[h.attributeKey],C=b.attributes[f.attributeKey],S=_.attributes[h.attributeKey];let w=(0,$.create)({html:y,...K(C)}),B=(0,$.create)({html:E,...K(S)});w=(0,$.remove)(w,f.offset,w.text.length),B=(0,$.insert)(B,mn,0,h.offset);const I=(0,a.cloneBlock)(v,{[f.attributeKey]:(0,$.toHTMLString)({value:w,...K(C)})}),x=(0,a.cloneBlock)(k,{[h.attributeKey]:(0,$.toHTMLString)({value:B,...K(S)})}),T=e?I:x,M=v.name===k.name?[T]:(0,a.switchToBlockType)(T,g.name);if(!M||!M.length)return;let N;if(e){const e=M.pop();N=g.merge(e.attributes,x.attributes)}else{const e=M.shift();N=g.merge(I.attributes,e.attributes)}const P=gn(N),L=N[P],R=(0,$.create)({html:L,...K(g.attributes[P])}),A=R.text.indexOf(mn),O=(0,$.remove)(R,A,A+1),D=(0,$.toHTMLString)({value:O,...K(g.attributes[P])});N[P]=D;const z=o.getSelectedBlockClientIds(),F=[...e?M:[],{...m,attributes:{...m.attributes,...N}},...e?[]:M];n.batch((()=>{r.selectionChange(m.clientId,P,A,A),r.replaceBlocks(z,F,0,o.getSelectedBlocksInitialCaretPosition())}))},jn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();if(o.clientId===r.clientId)return;if(!o.attributeKey||!r.attributeKey||void 0===o.offset||void 0===r.offset)return;const l=t.getBlockRootClientId(o.clientId);if(l!==t.getBlockRootClientId(r.clientId))return;const i=t.getBlockOrder(l);let s,c;i.indexOf(o.clientId)>i.indexOf(r.clientId)?(s=r,c=o):(s=o,c=r);const u=s,d=c,p=t.getBlock(u.clientId),m=(0,a.getBlockType)(p.name),g=t.getBlock(d.clientId),f=(0,a.getBlockType)(g.name),h=p.attributes[u.attributeKey],v=g.attributes[d.attributeKey],b=m.attributes[u.attributeKey],k=f.attributes[d.attributeKey];let _=(0,$.create)({html:h,...K(b)}),y=(0,$.create)({html:v,...K(k)});_=(0,$.remove)(_,u.offset,_.text.length),y=(0,$.remove)(y,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...p,attributes:{...p.attributes,[u.attributeKey]:(0,$.toHTMLString)({value:_,...K(b)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...g,attributes:{...g.attributes,[d.attributeKey]:(0,$.toHTMLString)({value:y,...K(k)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Wn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();n.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},Kn=(e,t)=>n=>{let{registry:o,select:r,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[s,c]=i,u=r.getBlock(s),d=(0,a.getBlockType)(u.name);if(!d)return;const p=r.getBlock(c);if(d&&!d.merge){const e=(0,a.switchToBlockType)(p,d.name);if(1!==(null==e?void 0:e.length))return void l.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void l.selectBlock(u.clientId):void o.batch((()=>{l.insertBlocks(t.innerBlocks,void 0,s),l.removeBlock(c),l.selectBlock(t.innerBlocks[0].clientId)}))}const m=(0,a.getBlockType)(p.name),{clientId:g,attributeKey:f,offset:h}=r.getSelectionStart(),v=(g===s?d:m).attributes[f],b=(g===s||g===c)&&void 0!==f&&void 0!==h&&!!v;v||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof f):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const k=(0,a.cloneBlock)(u),_=(0,a.cloneBlock)(p);if(b){const e=g===s?k:_,t=e.attributes[f],n=(0,$.insert)((0,$.create)({html:t,...K(v)}),mn,h,h);e.attributes[f]=(0,$.toHTMLString)({value:n,...K(v)})}const y=u.name===p.name?[_]:(0,a.switchToBlockType)(_,u.name);if(!y||!y.length)return;const E=d.merge(k.attributes,y[0].attributes);if(b){const e=gn(E),t=E[e],n=(0,$.create)({html:t,...K(d.attributes[e])}),o=n.text.indexOf(mn),r=(0,$.remove)(n,o,o+1),i=(0,$.toHTMLString)({value:r,...K(d.attributes[e])});E[e]=i,l.selectionChange(u.clientId,e,o,o)}l.replaceBlocks([u.clientId,p.clientId],[{...u,attributes:{...u.attributes,...E}},...y.slice(1)],0)},qn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=fn(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0],t),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function Yn(e,t){return qn([e],t)}function Zn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Qn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Xn(){return{type:"START_TYPING"}}function Jn(){return{type:"STOP_TYPING"}}function eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function to(){return{type:"STOP_DRAGGING_BLOCKS"}}function no(){return W()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function oo(){return W()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ro(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const lo=(e,t,n)=>o=>{let{dispatch:r}=o;const l=(0,a.getDefaultBlockName)();if(!l)return;const i=(0,a.createBlock)(l,e);return r.insertBlock(i,n,t)};function io(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ao(e){return an(e,!0)}function so(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function co(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function uo(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const po=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},mo=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},go=e=>t=>{let{dispatch:n,select:o}=t;if("zoom-out"===e){const e=o.getBlockSelectionStart();e&&n.selectBlock(o.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,pn.speak)((0,_.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,pn.speak)((0,_.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,pn.speak)((0,_.__)("You are currently in zoom-out mode."))},fo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,pn.speak)((0,_.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},ho=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;const l=o.getBlocksByClientId(e);if(l.some((e=>!e)))return;const i=l.map((e=>e.name));if(i.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),c=fn(e),u=o.getBlockIndex(c[c.length-1]),d=l.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return r.insertBlocks(d,u+1,s,t),d.length>1&&t&&r.multiSelect(d[0].clientId,d[d.length-1].clientId),d.map((e=>e.clientId))}},vo=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l)},bo=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l+1)};function ko(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const _o=e=>async t=>{let{dispatch:n}=t;n(ko(e,!0)),await new Promise((e=>setTimeout(e,150))),n(ko(e,!1))};function yo(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Eo(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Co(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const So="core/block-editor";var wo=window.wp.privateApis;const{lock:Bo,unlock:Io}=(0,wo.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),xo={reducer:D,selectors:e,actions:l},To=(0,g.createReduxStore)(So,{...xo,persist:["preferences"]}),Mo=(0,g.registerStore)(So,{...xo,persist:["preferences"]});Io(Mo).registerPrivateActions(t),Io(Mo).registerPrivateSelectors(r);const No={name:"",isSelected:!1},Po=(0,u.createContext)(No),{Provider:Lo}=Po;function Ro(){return(0,u.useContext)(Po)}function Ao(){const{isSelected:e,clientId:t,name:n}=Ro();return(0,g.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(To);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function Oo(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:r=!1}=e;const l=function(e,t){const n=Ao(),{clientId:o}=Ro(),r=(0,g.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:r}=e(To),{hasBlockSupport:l}=e(a.store);return t&&l(n(o),"__experimentalExposeControlsToChildren",!1)&&r(o)}),[t,o]);var l;return n?null===(l=v[e])||void 0===l?void 0:l.Fill:r?v.parent.Fill:null}(t,r);return l?(0,u.createElement)(h.__experimentalStyleProvider,{document:document},(0,u.createElement)(l,null,(e=>{const r=(0,f.isEmpty)(e)?null:e;return(0,u.createElement)(h.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,u.createElement)(h.ToolbarGroup,{controls:n}),o)}))):null}function Do(e){let{group:t="default",...n}=e;const o=(0,u.useContext)(h.__experimentalToolbarContext),r=v[t].Slot,l=(0,h.__experimentalUseSlotFills)(r.__unstableName);return Boolean(l&&l.length)?"default"===t?(0,u.createElement)(r,c({},n,{bubblesVirtually:!0,fillProps:o})):(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(r,c({},n,{bubblesVirtually:!0,fillProps:o}))):null}const zo=Oo;zo.Slot=Do;const Fo=e=>(0,u.createElement)(Oo,c({group:"inline"},e));Fo.Slot=e=>(0,u.createElement)(Do,c({group:"inline"},e));var Vo=zo;var Ho=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var Go=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Uo=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var $o=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var jo=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var Wo=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 Ko=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function qo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Yo(e,t,n,o){var r,l;let i="";return null!=t&&null!==(r=t[n])&&void 0!==r&&null!==(l=r.spacingStyles)&&void 0!==l&&l.length&&o&&t[n].spacingStyles.forEach((t=>{i+=`${qo(e,t.selector.trim())} { `,i+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||o}`})).join("; "),i+="; }"})),i}function Zo(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},l=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return l.test(t)&&"constrained"===o&&(r.none=(0,_.sprintf)((0,_.__)("Max %s wide"),t)),l.test(n)&&(r.wide=(0,_.sprintf)((0,_.__)("Max %s wide"),n)),r}const Qo=(0,u.createContext)({refs:new Map,callbacks:new Map});function Xo(e){let{children:t}=e;const n=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,u.createElement)(Qo.Provider,{value:n},t)}function Jo(e){const{refs:t,callbacks:n}=(0,u.useContext)(Qo),o=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,m.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function er(e){const{refs:t}=(0,u.useContext)(Qo),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function tr(e){const{callbacks:t}=(0,u.useContext)(Qo),n=er(e),[o,r]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function nr(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function or(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function rr(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const lr={all:(0,_.__)("All sides"),top:(0,_.__)("Top"),bottom:(0,_.__)("Bottom"),left:(0,_.__)("Left"),right:(0,_.__)("Right"),mixed:(0,_.__)("Mixed"),vertical:(0,_.__)("Vertical"),horizontal:(0,_.__)("Horizontal")},ir={top:void 0,right:void 0,bottom:void 0,left:void 0},ar=["top","right","bottom","left"];function sr(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function cr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ar;return Object.values(e).length>=1&&Object.values(e).length1}function ur(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}var dr=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));const pr=["color","border","dimensions","typography","spacing"],mr={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},gr={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function fr(e){const{name:t,clientId:n}=Ro();return(0,g.useSelect)((o=>{if(pr.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let r=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==r)return r;const l=(e=>gr[e]||e)(e),i=[n,...o(To).getBlockParents(n,!0)];for(const e of i){const n=o(To).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=o(To).getBlockAttributes(e);if(r=null!==(c=(0,f.get)(n,`settings.blocks.${t}.${l}`))&&void 0!==c?c:(0,f.get)(n,`settings.${l}`),void 0!==r)break}}const u=o(To).getSettings();if(void 0===r){var d;const e=`__experimentalFeatures.${l}`,n=`__experimentalFeatures.blocks.${t}.${l}`;r=null!==(d=(0,f.get)(u,n))&&void 0!==d?d:(0,f.get)(u,e)}var p,m;if(void 0!==r)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[l]?null!==(p=null!==(m=r.custom)&&void 0!==m?m:r.theme)&&void 0!==p?p:r.default:r;const g=mr[l]?mr[l](u):void 0;return void 0!==g?g:"typography.dropCap"===l||void 0}),[t,n,e])}const hr={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function vr(e){var t,n,o,r,l;let{spacingSizes:i,value:a,side:s,onChange:c,isMixed:d=!1,type:m,minimumCustomValue:f,onMouseOver:v,onMouseOut:b}=e;a=function(e,t){if(nr(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(a,i);let k=i;const y=i.length<=8,E=(0,g.useSelect)((e=>{const t=e(To).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[C,S]=(0,u.useState)(!E&&void 0!==a&&!nr(a)),w=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["px","em","rem"]});let B=null;!y&&!C&&void 0!==a&&(!nr(a)||nr(a)&&d)?(k=[...i,{name:d?(0,_.__)("Mixed"):(0,_.sprintf)((0,_.__)("Custom (%s)"),a),slug:"custom",size:a}],B=k.length-1):d||(B=C?function(e,t){if(!nr(e))return e;const n=rr(e),o=t.find((e=>String(e.slug)===n));return null==o?void 0:o.size}(a,i):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":rr(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(a,i));const I=(0,u.useMemo)((()=>(0,h.__experimentalParseQuantityAndUnitFromRawValue)(B)),[B])[1]||w[0].value,x=e=>{var t;return void 0===a||null===(t=i[e])||void 0===t?void 0:t.name},T=parseFloat(B,10),M=(e,t)=>{var n;const o=parseInt(e,10);if("selectList"===t){if(0===o)return;if(1===o)return"0"}else if(0===o)return"0";return`var:preset|spacing|${null===(n=i[e])||void 0===n?void 0:n.slug}`},N=d?(0,_.__)("Mixed"):null,P=d?(0,_.__)("Mixed"):x(B),L=k.map(((e,t)=>({key:t,name:e.name}))),R=i.map(((e,t)=>({value:t,label:void 0}))),A=(0,_.sprintf)((0,_.__)("%1$s %2$s"),lr[s],null==m?void 0:m.toLowerCase()),O=y&&!C&&void 0!==P;return(0,u.createElement)(u.Fragment,null,"all"!==s&&(0,u.createElement)(h.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,u.createElement)(h.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},lr[s]),O&&(0,u.createElement)(h.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},P)),"all"===s&&O&&(0,u.createElement)(h.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},P),!E&&(0,u.createElement)(h.Button,{label:C?(0,_.__)("Use size preset"):(0,_.__)("Set custom size"),icon:dr,onClick:()=>{S(!C)},isPressed:C,isSmall:!0,className:p()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),C&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalUnitControl,{onMouseOver:v,onMouseOut:b,onFocus:v,onBlur:b,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:B,units:w,min:f,placeholder:N,disableUnits:d,label:A,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,u.createElement)(h.RangeControl,{onMouseOver:v,onMouseOut:b,onFocus:v,onBlur:b,value:T,min:0,max:null!==(t=null===(n=hr[I])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(o=null===(r=hr[I])||void 0===r?void 0:r.steps)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{c([e,I].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),y&&!C&&(0,u.createElement)(h.RangeControl,{onMouseOver:v,onMouseOut:b,className:"components-spacing-sizes-control__range-control",value:B,onChange:e=>c(M(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===a&&c("0")},withInputField:!1,"aria-valuenow":B,"aria-valuetext":null===(l=i[B])||void 0===l?void 0:l.name,renderTooltipContent:x,min:0,max:i.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:v,onBlur:b}),!y&&!C&&(0,u.createElement)(h.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:L.find((e=>e.key===B))||"",onChange:e=>{c(M(e.selectedItem.key,"selectList"))},options:L,label:A,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:v,onMouseOut:b,onFocus:v,onBlur:b}))}function br(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return sr(Object.values(e))}(n),d=ur(n)&&cr(n,o);return(0,u.createElement)(vr,{value:c,onChange:e=>{const r=(0,h.__experimentalApplyValueToSides)(n,e,o);t(r)},side:"all",spacingSizes:r,isMixed:d,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s})}function kr(e){let{values:t,sides:n,onChange:o,spacingSizes:r,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s}=e;const c=null!=n&&n.length?ar.filter((e=>n.includes(e))):ar,d=e=>n=>{const r={...t};r[e]=n,o(r)};return(0,u.createElement)(u.Fragment,null,c.map((e=>(0,u.createElement)(vr,{value:t[e],label:lr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:d(e),spacingSizes:r,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s}))))}const _r=["vertical","horizontal"];function yr(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s}=e;const c=e=>o=>{if(!t)return;const r={...n};"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},d=null!=o&&o.length?_r.filter((e=>o.includes(e))):_r;return(0,u.createElement)(u.Fragment,null,d.map((e=>{const t="vertical"===e?n.top:n.left;return(0,u.createElement)(vr,{value:t,onChange:c(e),label:lr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:r,type:l,minimumCustomValue:i,onMouseOver:a,onMouseOut:s})})))}var Er=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 Cr=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"}));function Sr(e){let{isLinked:t,onClick:n}=e;const o=t?(0,_.__)("Unlink sides"):(0,_.__)("Link sides");return(0,u.createElement)(h.Tooltip,{text:o},(0,u.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,u.createElement)(h.Button,{isSmall:!0,icon:t?Er:Cr,iconSize:24,"aria-label":o,onClick:n})))}function wr(e){let{inputProps:t,onChange:n,label:o=(0,_.__)("Spacing Control"),values:r,sides:l,splitOnAxis:i=!1,useSelect:a,minimumCustomValue:s=0,onMouseOver:d,onMouseOut:m}=e;const g=[{name:0,slug:"0",size:0},...fr("spacing.spacingSizes")||[]];g.length>8&&g.unshift({name:(0,_.__)("Default"),slug:"default",size:void 0});const f=r||ir,v=ur(r),b=1===(null==l?void 0:l.length),[k,y]=(0,u.useState)(!v||!cr(f,l)||b),E={...t,onChange:e=>{const t={...r,...e};n(t)},isLinked:k,sides:l,values:f,spacingSizes:g,useSelect:a,type:o,minimumCustomValue:s,onMouseOver:d,onMouseOut:m};return(0,u.createElement)("fieldset",{className:p()("component-spacing-sizes-control",{"is-unlinked":!k})},(0,u.createElement)(h.BaseControl.VisualLabel,{as:"legend"},o),!b&&(0,u.createElement)(Sr,{onClick:()=>{y(!k)},isLinked:k}),k&&(0,u.createElement)(br,c({"aria-label":o},E)),!k&&i&&(0,u.createElement)(yr,E),!k&&!i&&(0,u.createElement)(kr,E))}window.wp.warning;const Br=(0,h.createSlotFill)("InspectorControls"),Ir=(0,h.createSlotFill)("InspectorAdvancedControls"),xr=(0,h.createSlotFill)("InspectorControlsBorder"),Tr=(0,h.createSlotFill)("InspectorControlsColor"),Mr=(0,h.createSlotFill)("InspectorControlsDimensions"),Nr=(0,h.createSlotFill)("InspectorControlsPosition"),Pr=(0,h.createSlotFill)("InspectorControlsTypography");var Lr={default:Br,advanced:Ir,border:xr,color:Tr,dimensions:Mr,list:(0,h.createSlotFill)("InspectorControlsListView"),settings:Br,styles:(0,h.createSlotFill)("InspectorControlsStyles"),typography:Pr,position:Nr};function Rr(e){var t;let{children:n,group:o="default",__experimentalGroup:r}=e;r&&(W()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),o=r);const l=Ao(),i=null===(t=Lr[o])||void 0===t?void 0:t.Fill;return i?l?(0,u.createElement)(h.__experimentalStyleProvider,{document:document},(0,u.createElement)(i,null,(e=>{const t=(0,f.isEmpty)(e)?null:e;return(0,u.createElement)(h.__experimentalToolsPanelContext.Provider,{value:t},n)}))):null:("undefined"!=typeof process&&process.env,null)}const Ar=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,f.mapValues)(e,Ar)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,f.isEmpty)(t)?void 0:t};function Or(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,Or(n)]})))}:e}function Dr(e,t,n){const o=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),r=e?Or(e):{};return o.reduce(((e,t,r)=>(void 0===e[t]&&(e[t]={}),r===o.length-1&&(e[t]=n),e[t])),r),r}function zr(e,t,n,o,r,l){var i;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let a=null===(i=o[0])||void 0===i?void 0:i.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;var s;a=null===(s=o[r])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,o]=e;o&&t[n].forEach((e=>{const t=(0,f.get)(a,e);t&&(c={...c,attributes:Dr(c.attributes,e,t)})}))})),c}function Fr(e,t,n){const o=(0,a.getBlockSupport)(e,t),r=null==o?void 0:o.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function Vr(e){let{children:t,group:n,label:o}=e;const{updateBlockAttributes:r}=(0,g.useDispatch)(To),{getBlockAttributes:l,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,g.useSelect)(To),c=a(),d=(0,u.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?i():[c];n.forEach((n=>{const{style:o}=l(n);let r={style:o};e.forEach((e=>{r={...r,...e(r)}})),r={...r,style:Ar(r.style)},t[n]=r})),r(n,t,!0)}),[Ar,l,i,s,c,r]);return(0,u.createElement)(h.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:d,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function Hr(e){let{Slot:t,...n}=e;const o=(0,u.useContext)(h.__experimentalToolsPanelContext);return(0,u.createElement)(t,c({},n,{fillProps:o,bubblesVirtually:!0}))}function Gr(e){var t;let{__experimentalGroup:n,group:o="default",label:r,...l}=e;n&&(W()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),o=n);const i=null===(t=Lr[o])||void 0===t?void 0:t.Slot,a=(0,h.__experimentalUseSlot)(null==i?void 0:i.__unstableName),s=(0,h.__experimentalUseSlotFills)(null==i?void 0:i.__unstableName);if(!i||!a)return"undefined"!=typeof process&&process.env,null;return Boolean(s&&s.length)?r?(0,u.createElement)(Vr,{group:o,label:r},(0,u.createElement)(Hr,c({},l,{Slot:i}))):(0,u.createElement)(i,c({},l,{bubblesVirtually:!0})):null}const Ur=Rr;Ur.Slot=Gr;const $r=e=>(0,u.createElement)(Rr,c({},e,{group:"advanced"}));$r.Slot=e=>(0,u.createElement)(Gr,c({},e,{group:"advanced"})),$r.slotName="InspectorAdvancedControls";var jr=Ur,Wr=window.wp.isShallowEqual,Kr=n.n(Wr);var qr=function(e){return(0,m.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])};const Yr=Number.MAX_SAFE_INTEGER;var Zr=(0,u.forwardRef)((function(e,t){let{clientId:n,bottomClientId:o,children:r,__unstableRefreshSize:l,__unstableCoverTarget:i=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:d=!0,...g}=e;const f=tr(n),v=tr(null!=o?o:n),b=(0,m.useMergeRefs)([t,qr(s)]),[k,_]=(0,u.useReducer)((e=>(e+1)%Yr),0);(0,u.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(_);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]);const y=(0,u.useMemo)((()=>k<0||!f||v!==f?{}:{position:"absolute",width:f.offsetWidth,height:f.offsetHeight}),[f,v,l,k]),E=(0,u.useMemo)((()=>{if(!(k<0||!f||o&&!v))return{getBoundingClientRect(){var e,t,n,o;const r=f.getBoundingClientRect(),l=null==v?void 0:v.getBoundingClientRect(),i=Math.min(r.left,null!==(e=null==l?void 0:l.left)&&void 0!==e?e:1/0),a=Math.min(r.top,null!==(t=null==l?void 0:l.top)&&void 0!==t?t:1/0),s=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-a;return new window.DOMRect(i,a,s,c)},ownerDocument:f.ownerDocument}}),[o,v,f,k]);return!f||o&&!v?null:(0,u.createElement)(h.Popover,c({ref:b,animate:!1,focusOnMount:!1,anchor:E,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:d},g,{className:p()("block-editor-block-popover",g.className),variant:"unstyled"}),i&&(0,u.createElement)("div",{style:y},r),!i&&r)}));function Qr(e){const t=(0,a.getBlockSupport)(e,hl);return!!(!0===t||null!=t&&t.margin)}function Xr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!fr("spacing.margin"),n=!Cl(e,"margin");return!Qr(e)||t||n}function Jr(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l,onMouseOver:i,onMouseOut:a}=e,s=fr("spacing.spacingSizes"),c=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"]}),d=El(o,"margin"),p=d&&d.some((e=>bl.includes(e)));if(Xr(e))return null;const m=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};l({style:Ar(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(h.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:m,label:(0,_.__)("Margin"),sides:d,units:c,allowReset:!1,splitOnAxis:p,onMouseOver:i,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(wr,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.margin,onChange:m,label:(0,_.__)("Margin"),sides:d,units:c,allowReset:!1,splitOnAxis:!1,onMouseOver:i,onMouseOut:a})),native:null})}function el(e){var t,n;let{clientId:o,attributes:r,forceShow:l}=e;const i=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,a=(0,u.useMemo)((()=>{const e=null!=i&&i.top?or(null==i?void 0:i.top):0,t=null!=i&&i.right?or(null==i?void 0:i.right):0,n=null!=i&&i.bottom?or(null==i?void 0:i.bottom):0,o=null!=i&&i.left?or(null==i?void 0:i.left):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:e?`calc(${e} * -1)`:0,right:t?`calc(${t} * -1)`:0,bottom:n?`calc(${n} * -1)`:0,left:o?`calc(${o} * -1)`:0}}),[i]),[s,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(Kr()(i,d.current)||l||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,l]),s||l?(0,u.createElement)(Zr,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}const tl={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function nl(e){var t,n,o,r,l;let{label:i=(0,_.__)("Height"),onChange:a,value:s}=e;const c=parseFloat(s),d=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vh","vw"]}),p=(0,u.useMemo)((()=>(0,h.__experimentalParseQuantityAndUnitFromRawValue)(s)),[s])[1]||(null===(t=d[0])||void 0===t?void 0:t.value)||"px";return(0,u.createElement)("fieldset",{className:"block-editor-height-control"},(0,u.createElement)(h.BaseControl.VisualLabel,{as:"legend"},i),(0,u.createElement)(h.Flex,null,(0,u.createElement)(h.FlexItem,{isBlock:!0},(0,u.createElement)(h.__experimentalUnitControl,{value:s,units:d,onChange:a,onUnitChange:e=>{const[t,n]=(0,h.__experimentalParseQuantityAndUnitFromRawValue)(s);["em","rem"].includes(e)&&"px"===n?a((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?a(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&a(100+e)},min:0,size:"__unstable-large"})),(0,u.createElement)(h.FlexItem,{isBlock:!0},(0,u.createElement)(h.__experimentalSpacer,{marginX:2,marginBottom:0},(0,u.createElement)(h.RangeControl,{value:c,min:0,max:null!==(n=null===(o=tl[p])||void 0===o?void 0:o.max)&&void 0!==n?n:100,step:null!==(r=null===(l=tl[p])||void 0===l?void 0:l.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{a([e,p].join(""))},__nextHasNoMarginBottom:!0})))))}function ol(e){const t=(0,a.getBlockSupport)(e,fl);return!!(!0===t||null!=t&&t.minHeight)}function rl(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!fr("dimensions.minHeight");return!ol(e)||t}function ll(e){var t;const{attributes:{style:n},setAttributes:o}=e;if(rl(e))return null;return(0,u.createElement)(nl,{label:(0,_.__)("Min. height"),value:null==n||null===(t=n.dimensions)||void 0===t?void 0:t.minHeight,onChange:e=>{const t={...n,dimensions:{...null==n?void 0:n.dimensions,minHeight:e}};o({style:Ar(t)})}})}function il(e){const t=(0,a.getBlockSupport)(e,hl);return!!(!0===t||null!=t&&t.padding)}function al(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!fr("spacing.padding"),n=!Cl(e,"padding");return!il(e)||t||n}function sl(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l,onMouseOver:i,onMouseOut:a}=e,s=fr("spacing.spacingSizes"),c=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"]}),d=El(o,"padding"),p=d&&d.some((e=>bl.includes(e)));if(al(e))return null;const m=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};l({style:Ar(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(h.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:m,label:(0,_.__)("Padding"),sides:d,units:c,allowReset:!1,splitOnAxis:p,onMouseOver:i,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(wr,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.padding,onChange:m,label:(0,_.__)("Padding"),sides:d,units:c,allowReset:!1,splitOnAxis:p,onMouseOver:i,onMouseOut:a})),native:null})}function cl(e){var t,n;let{clientId:o,attributes:r,forceShow:l}=e;const i=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,a=(0,u.useMemo)((()=>({borderTopWidth:null!=i&&i.top?or(null==i?void 0:i.top):0,borderRightWidth:null!=i&&i.right?or(null==i?void 0:i.right):0,borderBottomWidth:null!=i&&i.bottom?or(null==i?void 0:i.bottom):0,borderLeftWidth:null!=i&&i.left?or(null==i?void 0:i.left):0})),[i]),[s,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(Kr()(i,d.current)||l||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,l]),s||l?(0,u.createElement)(Zr,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function ul(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,_.__)("Stretch to fill available space."):"fixed"===e?"horizontal"===n?(0,_.__)("Specify a fixed width."):(0,_.__)("Specify a fixed height."):(0,_.__)("Fit contents.")}function dl(e){let{attributes:t,setAttributes:n,__unstableParentLayout:o}=e;const{style:r={}}=t,{layout:l={}}=r,{selfStretch:i,flexSize:a}=l;return(0,u.useEffect)((()=>{"fixed"!==i||a||n({style:{...r,layout:{...l,selfStretch:"fit"}}})}),[]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:gl(o),value:i||"fit",help:ul(i,o),onChange:e=>{const t="fixed"!==e?null:a;n({style:{...r,layout:{...l,selfStretch:e,flexSize:t}}})},isBlock:!0},(0,u.createElement)(h.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,_.__)("Fit")}),(0,u.createElement)(h.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,_.__)("Fill")}),(0,u.createElement)(h.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,_.__)("Fixed")})),"fixed"===i&&(0,u.createElement)(h.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{n({style:{...r,layout:{...l,flexSize:e}}})},value:a}))}function pl(e){let{__unstableParentLayout:t={}}=e;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=t;return("flex"===o||"flex"===n)&&r}function ml(e){const t=!fr("layout");return!pl(e)||t}function gl(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,_.__)("Width"):(0,_.__)("Height")}const fl="dimensions",hl="spacing",vl=["top","right","bottom","left"],bl=["vertical","horizontal"];function kl(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=Io((0,g.useDispatch)(To));return{isMouseOver:e,onMouseOver:e=>{e.stopPropagation(),n(),t(!0)},onMouseOut:e=>{e.stopPropagation(),o(),t(!1)}}}function _l(e){const t=Il(e),n=al(e),o=Xr(e),r=rl(e),l=ml(e),i=yl(e),s=function(e){if("web"!==u.Platform.OS)return!1;const{name:t}=e;return Sl(t)||ol(t)||il(t)||Qr(t)||pl(e)}(e),d=fr("spacing.spacingSizes"),m=kl(),g=kl();if(i||!s)return null;const f=(0,a.getBlockSupport)(e.name,[fl,"__experimentalDefaultControls"]),v=(0,a.getBlockSupport)(e.name,[hl,"__experimentalDefaultControls"]),b=(e,t)=>n=>{var o;return{...n,style:{...n.style,[t]:{...null===(o=n.style)||void 0===o?void 0:o[t],[e]:void 0}}}},k=p()({"tools-panel-item-spacing":d&&d.length>0}),{__unstableParentLayout:y}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr,{group:"dimensions"},!n&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:k,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,_.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:b("padding","spacing"),isShownByDefault:null==v?void 0:v.padding,panelId:e.clientId},(0,u.createElement)(sl,c({onMouseOver:m.onMouseOver,onMouseOut:m.onMouseOut},e))),!o&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:k,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,_.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:b("margin","spacing"),isShownByDefault:null==v?void 0:v.margin,panelId:e.clientId},(0,u.createElement)(Jr,c({onMouseOver:g.onMouseOver,onMouseOut:g.onMouseOut},e))),!t&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:k,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,_.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:b("blockGap","spacing"),isShownByDefault:null==v?void 0:v.blockGap,panelId:e.clientId},(0,u.createElement)(xl,e)),!r&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.dimensions)||void 0===n?void 0:n.minHeight)}(e),label:(0,_.__)("Min. height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,dimensions:{...null==o?void 0:o.dimensions,minHeight:void 0}})})}(e),resetAllFilter:b("minHeight","dimensions"),isShownByDefault:null==f?void 0:f.minHeight,panelId:e.clientId},(0,u.createElement)(ll,e)),!l&&(0,u.createElement)(h.__experimentalVStack,{as:h.__experimentalToolsPanelItem,spacing:2,hasValue:()=>function(e){var t;return void 0!==(null===(t=e.attributes.style)||void 0===t?void 0:t.layout)}(e),label:gl(y),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,layout:void 0}})}(e),resetAllFilter:b("selfStretch","layout"),isShownByDefault:!1,panelId:e.clientId},(0,u.createElement)(dl,e))),!n&&(0,u.createElement)(cl,c({forceShow:m.isMouseOver},e)),!o&&(0,u.createElement)(el,c({forceShow:g.isMouseOver},e)))}const yl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Il(e),n=rl(e),o=al(e),r=Xr(e),l=ml(e);return t&&n&&o&&r&&l};function El(e,t){var n;const o=(0,a.getBlockSupport)(e,hl);if(o&&"boolean"!=typeof o[t])return Array.isArray(o[t])?o[t]:null!==(n=o[t])&&void 0!==n&&n.sides?o[t].sides:void 0}function Cl(e,t){const n=El(e,t);return!(n&&n.some((e=>vl.includes(e)))&&n.some((e=>bl.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Sl(e){const t=(0,a.getBlockSupport)(e,hl);return!!(!0===t||null!=t&&t.blockGap)}function wl(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Bl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=wl(e);if(!n)return null;const o=or(null==n?void 0:n.top)||t,r=or(null==n?void 0:n.left)||t;return o===r?o:`${o} ${r}`}function Il(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!fr("spacing.blockGap");return!Sl(e)||t}function xl(e){var t;const{clientId:n,attributes:{style:o},name:r,setAttributes:l}=e,i=fr("spacing.spacingSizes"),a=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"]}),s=El(r,"blockGap"),c=er(n);if(Il(e))return null;const d=s&&s.some((e=>bl.includes(e))),p=e=>{var t;let n=e;e&&d?n={...wl(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const r={...o,spacing:{...null==o?void 0:o.spacing,blockGap:n}};l({style:Ar(r)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;c.current&&i&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},m=wl(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),g=d?{...m,right:null==m?void 0:m.left,bottom:null==m?void 0:m.top}:{top:null==m?void 0:m.top};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(d?(0,u.createElement)(h.__experimentalBoxControl,{label:(0,_.__)("Block spacing"),min:0,onChange:p,units:a,sides:s,values:g,allowReset:!1,splitOnAxis:d}):(0,u.createElement)(h.__experimentalUnitControl,{label:(0,_.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:p,units:a,value:g})),(null==i?void 0:i.length)>0&&(0,u.createElement)(wr,{values:g,onChange:p,label:(0,_.__)("Block spacing"),sides:d?s:["top"],units:a,allowReset:!1,splitOnAxis:d})),native:null})}const Tl=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Ml=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Nl=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Pl=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Ll=(0,u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(h.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Rl={top:{icon:Nl,title:(0,_._x)("Align top","Block vertical alignment setting")},center:{icon:Ml,title:(0,_._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Tl,title:(0,_._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Pl,title:(0,_._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ll,title:(0,_._x)("Space between","Block vertical alignment setting")}},Al=["top","center","bottom"];var Ol=function(e){let{value:t,onChange:n,controls:o=Al,isCollapsed:r=!0,isToolbar:l}=e;const i=Rl[t],a=Rl.top,s=l?h.ToolbarGroup:h.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{popoverProps:{variant:"toolbar"}};return(0,u.createElement)(s,c({icon:i?i.icon:a.icon,label:(0,_._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Rl[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};const Dl=e=>(0,u.createElement)(Ol,c({},e,{isToolbar:!1})),zl=e=>(0,u.createElement)(Ol,c({},e,{isToolbar:!0})),Fl={left:Ho,center:Go,right:Uo,"space-between":$o,stretch:jo};var Vl=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:i}=e;const a=e=>{o(e===r?void 0:e)},s=r?Fl[r]:Fl.left,d=[{name:"left",icon:Ho,title:(0,_.__)("Justify items left"),isActive:"left"===r,onClick:()=>a("left")},{name:"center",icon:Go,title:(0,_.__)("Justify items center"),isActive:"center"===r,onClick:()=>a("center")},{name:"right",icon:Uo,title:(0,_.__)("Justify items right"),isActive:"right"===r,onClick:()=>a("right")},{name:"space-between",icon:$o,title:(0,_.__)("Space between items"),isActive:"space-between"===r,onClick:()=>a("space-between")},{name:"stretch",icon:jo,title:(0,_.__)("Stretch items"),isActive:"stretch"===r,onClick:()=>a("stretch")}],p=i?h.ToolbarGroup:h.ToolbarDropdownMenu,m=i?{isCollapsed:n}:{};return(0,u.createElement)(p,c({icon:s,popoverProps:l,label:(0,_.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},m))};const Hl=e=>(0,u.createElement)(Vl,c({},e,{isToolbar:!1})),Gl=e=>(0,u.createElement)(Vl,c({},e,{isToolbar:!0})),Ul={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},$l={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},jl={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},Wl=["wrap","nowrap"];var Kl={name:"flex",label:(0,_.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o={}}=e;const{allowOrientation:r=!0}=o;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Flex,null,(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(Yl,{layout:t,onChange:n})),(0,u.createElement)(h.FlexItem,null,r&&(0,u.createElement)(Ql,{layout:t,onChange:n}))),(0,u.createElement)(Zl,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;if(null!=o&&o.allowSwitching)return null;const{allowVerticalAlignment:r=!0}=o;return(0,u.createElement)(Vo,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Yl,{layout:t,onChange:n,isToolbar:!0}),r&&(0,u.createElement)(ql,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r,style:l,blockName:i,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=r,u=null!=l&&null!==(t=l.spacing)&&void 0!==t&&t.blockGap&&!Fr(i,"spacing","blockGap")?Bl(null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,d=Ul[r.justifyContent],p=Wl.includes(r.flexWrap)?r.flexWrap:"wrap",m=jl[r.verticalAlignment],g=$l[r.justifyContent]||$l.left;let f="";const h=[];return p&&"wrap"!==p&&h.push(`flex-wrap: ${p}`),"horizontal"===c?(m&&h.push(`align-items: ${m}`),d&&h.push(`justify-content: ${d}`)):(m&&h.push(`justify-content: ${m}`),h.push("flex-direction: column"),h.push(`align-items: ${g}`)),h.length&&(f=`${qo(o)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),a&&u&&(f+=Yo(o,s,"flex",u)),f},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function ql(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{orientation:r="horizontal"}=t,l="horizontal"===r?jl.center:jl.top,{verticalAlignment:i=l}=t,a=e=>{n({...t,verticalAlignment:e})};if(o)return(0,u.createElement)(Dl,{onChange:a,value:i,controls:"horizontal"===r?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,_.__)("Align items top")},{value:"center",label:(0,_.__)("Align items center")},{value:"flex-end",label:(0,_.__)("Align items bottom")}];return(0,u.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,u.createElement)("legend",null,(0,_.__)("Vertical alignment")),(0,u.createElement)("div",null,s.map(((e,t,n)=>(0,u.createElement)(h.Button,{key:e,label:n,icon:t,isPressed:i===e,onClick:()=>a(e)})))))}function Yl(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l?a.push("space-between"):a.push("stretch"),o)return(0,u.createElement)(Hl,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:Ho,label:(0,_.__)("Justify items left")},{value:"center",icon:Go,label:(0,_.__)("Justify items center")},{value:"right",icon:Uo,label:(0,_.__)("Justify items right")}];return"horizontal"===l?s.push({value:"space-between",icon:$o,label:(0,_.__)("Space between items")}):s.push({value:"stretch",icon:jo,label:(0,_.__)("Stretch items")}),(0,u.createElement)(h.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:o}=e;return(0,u.createElement)(h.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:o})})))}function Zl(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,u.createElement)(h.ToggleControl,{label:(0,_.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function Ql(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal",verticalAlignment:r,justifyContent:l}=t;return(0,u.createElement)(h.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,_.__)("Orientation"),value:o,onChange:e=>{let o=r,i=l;return"horizontal"===e?("space-between"===r&&(o="center"),"stretch"===l&&(i="left")):("stretch"===r&&(o="top"),"space-between"===l&&(i="left")),n({...t,orientation:e,verticalAlignment:o,justifyContent:i})}},(0,u.createElement)(h.__experimentalToggleGroupControlOptionIcon,{icon:Wo,value:"horizontal",label:(0,_.__)("Horizontal")}),(0,u.createElement)(h.__experimentalToggleGroupControlOptionIcon,{icon:Ko,value:"vertical",label:(0,_.__)("Vertical")}))}var Xl={name:"default",label:(0,_.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:o,blockName:r,hasBlockGapSupport:l,layoutDefinitions:i}=e;const a=Bl(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap);let s="";Fr(r,"spacing","blockGap")||(null!=a&&a.top?s=Bl(null==a?void 0:a.top):"string"==typeof a&&(s=Bl(a)));let c="";return l&&s&&(c+=Yo(n,i,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e,t){const n=Zo(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};var Jl=function(e){let{icon:t,size:n=24,...o}=e;return(0,u.cloneElement)(t,{width:n,height:n,...o})};var ei=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var ti=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),ni=window.wp.styleEngine,oi={name:"constrained",label:(0,_.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r,justifyContent:l="center"}=t,i=[{value:"left",icon:Ho,label:(0,_.__)("Justify items left")},{value:"center",icon:Go,label:(0,_.__)("Justify items center")},{value:"right",icon:Uo,label:(0,_.__)("Justify items right")}],a=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["%","px","em","rem","vw"]});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(h.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,u.createElement)(Jl,{icon:ei})),(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(h.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,u.createElement)(Jl,{icon:ti}))),(0,u.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,_.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,u.createElement)(h.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:l,onChange:e=>{n({...t,justifyContent:e})}},i.map((e=>{let{value:t,icon:n,label:o}=e;return(0,u.createElement)(h.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:o})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r={},style:l,blockName:i,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:d}=r,p=Bl(null==l||null===(t=l.spacing)||void 0===t?void 0:t.blockGap);let m="";Fr(i,"spacing","blockGap")||(null!=p&&p.top?m=Bl(null==p?void 0:p.top):"string"==typeof p&&(m=Bl(p)));const g="left"===d?"0 !important":"auto !important",f="right"===d?"0 !important":"auto !important";let h=c||u?`\n\t\t\t\t\t${qo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${g};\n\t\t\t\t\t\tmargin-right: ${f};\n\t\t\t\t\t}\n\t\t\t\t\t${qo(o,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${qo(o,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===d?h+=`${qo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${g}; }`:"right"===d&&(h+=`${qo(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${f}; }`),null!=l&&null!==(n=l.spacing)&&void 0!==n&&n.padding){(0,ni.getCSSRules)(l).forEach((e=>{"paddingRight"===e.key?h+=`\n\t\t\t\t\t${qo(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(h+=`\n\t\t\t\t\t${qo(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&m&&(h+=Yo(o,s,"constrained",m)),h},getOrientation(){return"vertical"},getAlignments(e){const t=Zo(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const ri=[Xl,Kl,oi];function li(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ri.find((t=>t.name===e))}const ii={type:"default"},ai=(0,u.createContext)(ii),si=ai.Provider;function ci(){return(0,u.useContext)(ai)}function ui(e){let{layout:t={},css:n,...o}=e;const r=li(t.type),l=null!==fr("spacing.blockGap");if(r){var i;if(n)return(0,u.createElement)("style",null,n);const e=null===(i=r.getLayoutStyle)||void 0===i?void 0:i.call(r,{hasBlockGapSupport:l,layout:t,...o});if(e)return(0,u.createElement)("style",null,e)}return null}const di=[],pi=["none","left","center","right","wide","full"],mi=["wide","full"];function gi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(To),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),r=ci(),l=li(null==r?void 0:r.type),i=l.getAlignments(r,o);if(n){const t=i.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?di:t}if("default"!==l.name&&"constrained"!==l.name)return di;const{alignments:a=pi}=r,s=e.filter((e=>(r.alignments||t||!mi.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?di:s}var fi=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var hi=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var vi=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var bi=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const ki={none:{icon:fi,title:(0,_._x)("None","Alignment option")},left:{icon:hi,title:(0,_.__)("Align left")},center:{icon:ei,title:(0,_.__)("Align center")},right:{icon:vi,title:(0,_.__)("Align right")},wide:{icon:ti,title:(0,_.__)("Wide width")},full:{icon:bi,title:(0,_.__)("Full width")}},_i={variant:"toolbar"};var yi=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const i=gi(o);if(!!!i.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=ki[t],d=ki.none,m=r?h.ToolbarGroup:h.ToolbarDropdownMenu,g={icon:s?s.icon:d.icon,label:(0,_.__)("Align")},f=r?{isCollapsed:l,controls:i.map((e=>{let{name:n}=e;return{...ki[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,_.__)("Change alignment")},popoverProps:_i,children:e=>{let{onClose:n}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},i.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=ki[o],s=o===t||!t&&"none"===o;return(0,u.createElement)(h.MenuItem,{key:o,icon:l,iconPosition:"left",className:p()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,u.createElement)(m,c({},g,f))};const Ei=e=>(0,u.createElement)(yi,c({},e,{isToolbar:!1})),Ci=e=>(0,u.createElement)(yi,c({},e,{isToolbar:!0})),Si=["left","center","right","wide","full"],wi=["wide","full"];function Bi(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Si.filter((t=>e.includes(t))):!0===e?[...Si]:[],!o||!0===e&&!n?t.filter((e=>!wi.includes(e))):t}const Ii=(0,m.createHigherOrderComponent)((e=>t=>{const n=(0,u.createElement)(e,t),{name:o}=t,r=gi(Bi((0,a.getBlockSupport)(o,"align"),(0,a.hasBlockSupport)(o,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),l=(0,g.useSelect)((e=>e(To).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!r.length||l)return n;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vo,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Ei,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const r=(0,a.getBlockType)(t.name);(null==r||null===(n=r.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:r})),n)}),"withToolbarControls"),xi=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,l=gi(Bi((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return(0,u.createElement)(e,t);let i=t.wrapperProps;return l.some((e=>e.name===r))&&(i={...i,"data-align":r}),(0,u.createElement)(e,c({},t,{wrapperProps:i}))}));(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Si,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",xi),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Ii),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Bi((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=p()(`align${o}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Ti=/[\s#]/g,Mi={type:"string",source:"attribute",attribute:"id",selector:"*"};const Ni=(0,m.createHigherOrderComponent)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===u.Platform.OS,o=(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,_.__)("HTML anchor"),help:(0,u.createElement)(u.Fragment,null,(0,_.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,u.createElement)(h.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/page-jumps/")},(0,_.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,_.__)("Add an anchor"),onChange:e=>{e=e.replace(Ti,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&(0,u.createElement)(jr,{group:"advanced"},o),!n&&"core/heading"===t.name&&(0,u.createElement)(jr,null,(0,u.createElement)(h.PanelBody,{title:(0,_.__)("Heading settings")},o)))}return(0,u.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Mi}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Ni),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Pi={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Pi}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Li=(0,m.createHigherOrderComponent)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),(0,u.createElement)(jr,{group:"advanced"},(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,_.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,_.__)("Separate multiple classes with spaces.")}))):(0,u.createElement)(e,t)),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Li),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=p()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){var r;const o=null===(r=t[n])||void 0===r?void 0:r.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var Ri=window.wp.dom;const Ai=(0,u.createContext)({});function Oi(e){let{value:t,children:n}=e;const o=(0,u.useContext)(Ai),r=(0,u.useMemo)((()=>({...o,...t})),[o,t]);return(0,u.createElement)(Ai.Provider,{value:r,children:n})}var Di=Ai;const zi={};var Fi=(0,h.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,a.getBlockType)(n),r=(0,u.useContext)(Di),l=(0,u.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((e=>{let[t]=e;return o.usesContext.includes(t)}))):zi),[o,r]);if(!o)return null;const i=o.edit||o.save;if(o.apiVersion>1)return(0,u.createElement)(i,c({},e,{context:l}));const s=(0,a.hasBlockSupport)(o,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,d=p()(s,t.className,e.className);return(0,u.createElement)(i,c({},e,{context:l,className:d}))}));function Vi(e){const{name:t,isSelected:n,clientId:o,attributes:r={},__unstableLayoutClassNames:l}=e,{layout:i=null}=r,s={name:t,isSelected:n,clientId:o,layout:(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?i:null,__unstableLayoutClassNames:l};return(0,u.createElement)(Lo,{value:(0,u.useMemo)((()=>s),Object.values(s))},(0,u.createElement)(Fi,e))}var Hi=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Gi=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,u.createElement)("div",{style:{display:"contents",all:"initial"}},(0,u.createElement)("div",{className:p()(t,"block-editor-warning")},(0,u.createElement)("div",{className:"block-editor-warning__contents"},(0,u.createElement)("p",{className:"block-editor-warning__message"},o),(u.Children.count(n)>0||r)&&(0,u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,((e,t)=>(0,u.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,u.createElement)(h.DropdownMenu,{className:"block-editor-warning__secondary",icon:Hi,label:(0,_.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,u.createElement)(h.MenuGroup,null,r.map(((e,t)=>(0,u.createElement)(h.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Ui=n(1973);function $i(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,u.createElement)("div",{className:i},(0,u.createElement)("div",{className:"block-editor-block-compare__content"},(0,u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,u.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,u.createElement)(u.RawHTML,null,(0,Ri.safeHTML)(o)))),(0,u.createElement)("div",{className:"block-editor-block-compare__action"},(0,u.createElement)(h.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var ji=function(e){let{block:t,onKeep:n,onConvert:o,convertor:r,convertButtonText:l}=e;const i=(s=r(t),(Array.isArray(s)?s:[s]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const c=(d=t.originalContent,m=i,(0,Ui.Kx)(d,m).map(((e,t)=>{const n=p()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,u.createElement)("span",{key:t,className:n},e.value)})));var d,m;return(0,u.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,u.createElement)($i,{title:(0,_.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,_.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,u.createElement)($i,{title:(0,_.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:l,rawContent:c,renderedContent:i}))};const Wi=e=>(0,a.rawHandler)({HTML:e.originalContent});var Ki=(0,m.compose)([(0,g.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(To).getBlock(n)}})),(0,g.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(To);return{convertToClassic(){o(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,Wi(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,a.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:r,block:l}=e;const i=!!(0,a.getBlockType)("core/html"),s=!!(0,a.getBlockType)("core/freeform"),[c,d]=(0,u.useState)(!1),p=(0,u.useCallback)((()=>d(!0)),[]),m=(0,u.useCallback)((()=>d(!1)),[]),g=(0,u.useMemo)((()=>[{title:(0,_._x)("Resolve","imperative verb"),onClick:p},i&&{title:(0,_.__)("Convert to HTML"),onClick:t},s&&{title:(0,_.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[p,i,t,s,o]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Gi,{actions:[(0,u.createElement)(h.Button,{key:"recover",onClick:r,variant:"primary"},(0,_.__)("Attempt Block Recovery"))],secondaryActions:g},(0,_.__)("This block contains unexpected or invalid content.")),c&&(0,u.createElement)(h.Modal,{title:(0,_.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,u.createElement)(ji,{block:l,onKeep:t,onConvert:n,convertor:Wi,convertButtonText:(0,_.__)("Convert to Blocks")})))}));const qi=(0,u.createElement)(Gi,{className:"block-editor-block-list__block-crash-warning"},(0,_.__)("This block has encountered an error and cannot be previewed."));var Yi=()=>qi;class Zi extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Qi=Zi,Xi=n(773);var Ji=function(e){let{clientId:t}=e;const[n,o]=(0,u.useState)(""),r=(0,g.useSelect)((e=>e(To).getBlock(t)),[t]),{updateBlock:l}=(0,g.useDispatch)(To);return(0,u.useEffect)((()=>{o((0,a.getBlockContent)(r))}),[r]),(0,u.createElement)(Xi.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(r.name);if(!e)return;const i=(0,a.getBlockAttributes)(e,n,r.attributes),s=n||(0,a.getSaveContent)(e,i),[c]=n?(0,a.validateBlock)({...r,attributes:i,originalContent:s}):[!0];l(t,{attributes:i,originalContent:s,isValid:c}),n||o({content:s})},onChange:e=>o(e.target.value)})},ea=ha(),ta=e=>pa(e,ea),na=ha();ta.write=e=>pa(e,na);var oa=ha();ta.onStart=e=>pa(e,oa);var ra=ha();ta.onFrame=e=>pa(e,ra);var la=ha();ta.onFinish=e=>pa(e,la);var ia=[];ta.setTimeout=(e,t)=>{let n=ta.now()+t,o=()=>{let e=ia.findIndex((e=>e.cancel==o));~e&&ia.splice(e,1),ua-=~e?1:0},r={time:n,handler:e,cancel:o};return ia.splice(aa(n),0,r),ua+=1,ma(),r};var aa=e=>~(~ia.findIndex((t=>t.time>e))||~ia.length);ta.cancel=e=>{oa.delete(e),ra.delete(e),la.delete(e),ea.delete(e),na.delete(e)},ta.sync=e=>{da=!0,ta.batchedUpdates(e),da=!1},ta.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,ta.onStart(n)}return o.handler=e,o.cancel=()=>{oa.delete(n),t=null},o};var sa=typeof window<"u"?window.requestAnimationFrame:()=>{};ta.use=e=>sa=e,ta.now=typeof performance<"u"?()=>performance.now():Date.now,ta.batchedUpdates=e=>e(),ta.catch=console.error,ta.frameLoop="always",ta.advance=()=>{"demand"!==ta.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):fa()};var ca=-1,ua=0,da=!1;function pa(e,t){da?(t.delete(e),e(0)):(t.add(e),ma())}function ma(){ca<0&&(ca=0,"demand"!==ta.frameLoop&&sa(ga))}function ga(){~ca&&(sa(ga),ta.batchedUpdates(fa))}function fa(){let e=ca;ca=ta.now();let t=aa(ca);t&&(va(ia.splice(0,t),(e=>e.handler())),ua-=t),ua?(oa.flush(),ea.flush(e?Math.min(64,ca-e):16.667),ra.flush(),na.flush(),la.flush()):ca=-1}function ha(){let e=new Set,t=e;return{add(n){ua+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ua-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ua-=t.size,va(t,(t=>t(n)&&e.add(t))),ua+=e.size,t=e)}}}function va(e,t){e.forEach((e=>{try{t(e)}catch(e){ta.catch(e)}}))}var ba=n(9196),ka=n.n(ba),_a=Object.defineProperty,ya={};function Ea(){}((e,t)=>{for(var n in t)_a(e,n,{get:t[n],enumerable:!0})})(ya,{assign:()=>Oa,colors:()=>La,createStringInterpolator:()=>Ta,skipAnimation:()=>Ra,to:()=>Ma,willAdvance:()=>Aa});var Ca={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Sa(e,t){if(Ca.arr(e)){if(!Ca.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ba(e,t,n){if(Ca.arr(e))for(let o=0;oCa.und(e)?[]:Ca.arr(e)?e:[e];function xa(e,t){if(e.size){let n=Array.from(e);e.clear(),wa(n,t)}}var Ta,Ma,Na=(e,...t)=>xa(e,(e=>e(...t))),Pa=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),La=null,Ra=!1,Aa=Ea,Oa=e=>{e.to&&(Ma=e.to),e.now&&(ta.now=e.now),void 0!==e.colors&&(La=e.colors),null!=e.skipAnimation&&(Ra=e.skipAnimation),e.createStringInterpolator&&(Ta=e.createStringInterpolator),e.requestAnimationFrame&&ta.use(e.requestAnimationFrame),e.batchedUpdates&&(ta.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Aa=e.willAdvance),e.frameLoop&&(ta.frameLoop=e.frameLoop)},Da=new Set,za=[],Fa=[],Va=0,Ha={get idle(){return!Da.size&&!za.length},start(e){Va>e.priority?(Da.add(e),ta.onStart(Ga)):(Ua(e),ta(ja))},advance:ja,sort(e){if(Va)ta.onFrame((()=>Ha.sort(e)));else{let t=za.indexOf(e);~t&&(za.splice(t,1),$a(e))}},clear(){za=[],Da.clear()}};function Ga(){Da.forEach(Ua),Da.clear(),ta(ja)}function Ua(e){za.includes(e)||$a(e)}function $a(e){za.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(za,(t=>t.priority>e.priority)),0,e)}function ja(e){let t=Fa;for(let n=0;n0}var Wa="[-+]?\\d*\\.?\\d+",Ka=Wa+"%";function qa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ya=new RegExp("rgb"+qa(Wa,Wa,Wa)),Za=new RegExp("rgba"+qa(Wa,Wa,Wa,Wa)),Qa=new RegExp("hsl"+qa(Wa,Ka,Ka)),Xa=new RegExp("hsla"+qa(Wa,Ka,Ka,Wa)),Ja=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,es=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ts=/^#([0-9a-fA-F]{6})$/,ns=/^#([0-9a-fA-F]{8})$/;function os(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rs(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=os(r,o,e+1/3),i=os(r,o,e),a=os(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ls(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function is(e){return(parseFloat(e)%360+360)%360/360}function as(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ss(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function cs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ts.exec(e))?parseInt(t[1]+"ff",16)>>>0:La&&void 0!==La[e]?La[e]:(t=Ya.exec(e))?(ls(t[1])<<24|ls(t[2])<<16|ls(t[3])<<8|255)>>>0:(t=Za.exec(e))?(ls(t[1])<<24|ls(t[2])<<16|ls(t[3])<<8|as(t[4]))>>>0:(t=Ja.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ns.exec(e))?parseInt(t[1],16)>>>0:(t=es.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qa.exec(e))?(255|rs(is(t[1]),ss(t[2]),ss(t[3])))>>>0:(t=Xa.exec(e))?(rs(is(t[1]),ss(t[2]),ss(t[3]))|as(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var us=(e,t,n)=>{if(Ca.fun(e))return e;if(Ca.arr(e))return us({range:e,output:t,extrapolate:n});if(Ca.str(e.output[0]))return Ta(e);let o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",a=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],s,i,a,o.map)}};var ds=1.70158,ps=1.525*ds,ms=ds+1,gs=2*Math.PI/3,fs=2*Math.PI/4.5,hs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,vs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ms*e*e*e-ds*e*e,easeOutBack:e=>1+ms*Math.pow(e-1,3)+ds*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(ps+1)*e-ps)/2:(Math.pow(2*e-2,2)*((ps+1)*(2*e-2)+ps)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*gs),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*gs)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*fs)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*fs)/2+1,easeInBounce:e=>1-hs(1-e),easeOutBounce:hs,easeInOutBounce:e=>e<.5?(1-hs(1-2*e))/2:(1+hs(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(o):Math.ceil(o))/e)}},bs=Symbol.for("FluidValue.get"),ks=Symbol.for("FluidValue.observers"),_s=e=>!(!e||!e[bs]),ys=e=>e&&e[bs]?e[bs]():e,Es=e=>e[ks]||null;function Cs(e,t){let n=e[ks];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ss=class{[bs];[ks];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ws(this,e)}},ws=(e,t)=>Ts(e,bs,t);function Bs(e,t){if(e[bs]){let n=e[ks];n||Ts(e,ks,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Is(e,t){let n=e[ks];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[ks]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var xs,Ts=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ms=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ns=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ps=new RegExp(`(${Ms.source})(%|[a-z]+)`,"i"),Ls=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Rs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,As=e=>{let[t,n]=Os(e);if(!t||Pa())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Rs.test(n)?As(n):n||e},Os=e=>{let t=Rs.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},Ds=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,zs=e=>{xs||(xs=La?new RegExp(`(${Object.keys(La).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ys(e).replace(Rs,As).replace(Ns,cs).replace(xs,cs))),n=t.map((e=>e.match(Ms).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>us({...e,output:t})));return e=>{let n=!Ps.test(t[0])&&t.find((e=>Ps.test(e)))?.replace(Ms,""),r=0;return t[0].replace(Ms,(()=>`${o[r++](e)}${n||""}`)).replace(Ls,Ds)}},Fs="react-spring: ",Vs=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${Fs}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Hs=Vs(console.warn);var Gs=Vs(console.warn);function Us(e){return Ca.str(e)&&("#"==e[0]||/\d/.test(e)||!Pa()&&Rs.test(e)||e in(La||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var $s=Pa()?ba.useEffect:ba.useLayoutEffect;function js(){let e=(0,ba.useState)()[1],t=(()=>{let e=(0,ba.useRef)(!1);return $s((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var Ws=e=>(0,ba.useEffect)(e,Ks),Ks=[];function qs(e){let t=(0,ba.useRef)();return(0,ba.useEffect)((()=>{t.current=e})),t.current}var Ys=Symbol.for("Animated:node"),Zs=e=>e&&e[Ys],Qs=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Ys,t),Xs=e=>e&&e[Ys]&&e[Ys].getPayload(),Js=class{payload;constructor(){Qs(this,this)}getPayload(){return this.payload||[]}},ec=class extends Js{constructor(e){super(),this._value=e,Ca.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ca.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Ca.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},tc=class extends ec{_string=null;_toString;constructor(e){super(0),this._toString=us({output:[e,e]})}static create(e){return new tc(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Ca.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=us({output:[this.getValue(),e]})),this._value=0,super.reset()}},nc={dependencies:null},oc=class extends Js{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Ba(this.source,((n,o)=>{(e=>!!e&&e[Ys]===e)(n)?t[o]=n.getValue(e):_s(n)?t[o]=ys(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&wa(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Ba(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){nc.dependencies&&_s(e)&&nc.dependencies.add(e);let t=Xs(e);t&&wa(t,(e=>this.add(e)))}},rc=class extends oc{constructor(e){super(e)}static create(e){return new rc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(lc)),!0)}};function lc(e){return(Us(e)?tc:ec).create(e)}function ic(e){let t=Zs(e);return t?t.constructor:Ca.arr(e)?rc:Us(e)?tc:ec}var ac=(e,t)=>{let n=!Ca.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ba.forwardRef)(((o,r)=>{let l=(0,ba.useRef)(null),i=n&&(0,ba.useCallback)((e=>{l.current=function(e,t){return e&&(Ca.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[a,s]=function(e,t){let n=new Set;return nc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new oc(e),nc.dependencies=null,[e,n]}(o,t),c=js(),u=()=>{let e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new sc(u,s),p=(0,ba.useRef)();$s((()=>(p.current=d,wa(s,(e=>Bs(e,d))),()=>{p.current&&(wa(p.current.deps,(e=>Is(e,p.current))),ta.cancel(p.current.update))}))),(0,ba.useEffect)(u,[]),Ws((()=>()=>{let e=p.current;wa(e.deps,(t=>Is(t,e)))}));let m=t.getComponentProps(a.getValue());return ba.createElement(e,{...m,ref:i})}))},sc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ta.write(this.update)}};var cc=Symbol.for("AnimatedComponent"),uc=e=>Ca.str(e)?e:e&&Ca.str(e.displayName)?e.displayName:Ca.fun(e)&&e.name||null;function dc(e,...t){return Ca.fun(e)?e(...t):e}var pc=(e,t)=>!0===e||!!(t&&e&&(Ca.fun(e)?e(t):Ia(e).includes(t))),mc=(e,t)=>Ca.obj(e)?t&&e[t]:e,gc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,fc=e=>e,hc=(e,t=fc)=>{let n=vc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);Ca.und(n)||(o[r]=n)}return o},vc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],bc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function kc(e){let t=function(e){let t={},n=0;if(Ba(e,((e,o)=>{bc[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Ba(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function _c(e){return e=ys(e),Ca.arr(e)?e.map(_c):Us(e)?ya.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yc(e){for(let t in e)return!0;return!1}function Ec(e){return Ca.fun(e)||Ca.arr(e)&&Ca.obj(e[0])}function Cc(e,t){e.ref?.delete(e),t?.delete(e)}function Sc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var wc={tension:170,friction:26,mass:1,damping:1,easing:vs.linear,clamp:!1};function Bc(e,t){if(Ca.und(t.decay)){let n=!Ca.und(t.tension)||!Ca.und(t.friction);(n||!Ca.und(t.frequency)||!Ca.und(t.damping)||!Ca.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ic=[];function xc(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,a)=>{let s,c,u=pc(n.cancel??o?.cancel,t);if(u)m();else{Ca.und(n.pause)||(r.paused=pc(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||pc(e,t)),s=dc(n.delay||0,t),e?(r.resumeQueue.add(p),l.pause()):(l.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),s=c.time-ta.now()}function p(){s>0&&!ya.skipAnimation?(r.delayed=!0,c=ta.setTimeout(m,s),r.pauseQueue.add(d),r.timeouts.add(c)):m()}function m(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{l.start({...n,callId:e,cancel:u},i)}catch(e){a(e)}}}))}var Tc=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Pc(e.get()):t.every((e=>e.noop))?Mc(e.get()):Nc(e.get(),t.every((e=>e.finished))),Mc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Nc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Pc=e=>({value:e,cancelled:!0,finished:!1});function Lc(e,t,n,o){let{callId:r,parentId:l,onRest:i}=t,{asyncTo:a,promise:s}=n;return l||e!==a||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=hc(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&Pc(o)||r!==n.asyncId&&Nc(o,!1);if(t)throw e.result=t,u(e),e},f=(e,t)=>{let l=new Ac,i=new Oc;return(async()=>{if(ya.skipAnimation)throw Rc(n),i.result=Nc(o,!1),u(i),i;g(l);let a=Ca.obj(e)?{...e}:{...t,to:e};a.parentId=r,Ba(p,((e,t)=>{Ca.und(a[t])&&(a[t]=e)}));let s=await o.start(a);return g(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};if(ya.skipAnimation)return Rc(n),Nc(o,!1);try{let t;t=Ca.arr(e)?(async e=>{for(let t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(c),m]),d=Nc(o.get(),!0,!1)}catch(e){if(e instanceof Ac)d=e.result;else{if(!(e instanceof Oc))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?a:void 0,n.promise=l?s:void 0)}return Ca.fun(i)&&ta.batchedUpdates((()=>{i(d,o,o.item)})),d})():s}function Rc(e,t){xa(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ac=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Oc=class extends Error{result;constructor(){super("SkipAnimationSignal")}},Dc=e=>e instanceof Fc,zc=1,Fc=class extends Ss{id=zc++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Zs(this);return e&&e.getValue()}to(...e){return ya.to(this,e)}interpolate(...e){return Hs(`${Fs}The "interpolate" function is deprecated in v9 (use "to" instead)`),ya.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Cs(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ha.sort(this),Cs(this,{type:"priority",parent:this,priority:e})}},Vc=Symbol.for("SpringPhase"),Hc=e=>(1&e[Vc])>0,Gc=e=>(2&e[Vc])>0,Uc=e=>(4&e[Vc])>0,$c=(e,t)=>t?e[Vc]|=3:e[Vc]&=-3,jc=(e,t)=>t?e[Vc]|=4:e[Vc]&=-5,Wc=class extends Fc{key;animation=new class{changed=!1;values=Ic;toValues=null;fromValues=Ic;to;from;config=new class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,wc)}};immediate=!1};queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Ca.und(e)||!Ca.und(t)){let n=Ca.obj(e)?{...e}:{...t,from:e};Ca.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Gc(this)||this._state.asyncTo)||Uc(this)}get goal(){return ys(this.animation.to)}get velocity(){let e=Zs(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Hc(this)}get isAnimating(){return Gc(this)}get isPaused(){return Uc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{toValues:r}=o,{config:l}=o,i=Xs(o.to);!i&&_s(o.to)&&(r=Ia(ys(o.to))),o.values.forEach(((a,s)=>{if(a.done)return;let c=a.constructor==tc?1:i?i[s].lastPosition:r[s],u=o.immediate,d=c;if(!u){if(d=a.lastPosition,l.tension<=0)return void(a.done=!0);let t,n=a.elapsedTime+=e,r=o.fromValues[s],i=null!=a.v0?a.v0:a.v0=Ca.arr(l.velocity)?l.velocity[s]:l.velocity,p=l.precision||(r==c?.005:Math.min(1,.001*Math.abs(c-r)));if(Ca.und(l.duration))if(l.decay){let e=!0===l.decay?.998:l.decay,o=Math.exp(-(1-e)*n);d=r+i/(1-e)*(1-o),u=Math.abs(a.lastPosition-d)<=p,t=i*o}else{t=null==a.lastVelocity?i:a.lastVelocity;let n,o=l.restVelocity||p/10,s=l.clamp?0:l.bounce,m=!Ca.und(s),g=r==c?a.v0>0:ro,n||(u=Math.abs(c-d)<=p,!u));++e){m&&(f=d==c||d>c==g,f&&(t=-t*s,d=c)),t+=(1e-6*-l.tension*(d-c)+.001*-l.friction*t)/l.mass*h,d+=t*h}}else{let o=1;l.duration>0&&(this._memoizedDuration!==l.duration&&(this._memoizedDuration=l.duration,a.durationProgress>0&&(a.elapsedTime=l.duration*a.durationProgress,n=a.elapsedTime+=e)),o=(l.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,a.durationProgress=o),d=r+l.easing(o)*(c-r),t=(d-a.lastPosition)/e,u=1==o}a.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,l.round)&&(n=!0)}));let a=Zs(this),s=a.getValue();if(t){let e=ys(o.to);s===e&&!n||l.decay?n&&l.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ta.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Gc(this)){let{to:e,config:t}=this.animation;ta.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Ca.und(e)?(n=this.queue||[],this.queue=[]):n=[Ca.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Tc(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Rc(this._state,e&&this._lastCallId),ta.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:o}=e;n=Ca.obj(n)?n[t]:n,(null==n||Ec(n))&&(n=void 0),o=Ca.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return Hc(this)||(e.reverse&&([n,o]=[o,n]),o=ys(o),Ca.und(o)?Zs(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,hc(e,((e,t)=>/^on/.test(t)?mc(e,n):e))),Jc(this,e,"onProps"),eu(this,"onProps",e,this);let r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let l=this._state;return xc(++this._lastCallId,{key:n,props:e,defaultProps:o,state:l,actions:{pause:()=>{Uc(this)||(jc(this,!0),Na(l.pauseQueue),eu(this,"onPause",Nc(this,Kc(this,this.animation.to)),this))},resume:()=>{Uc(this)&&(jc(this,!1),Gc(this)&&this._resume(),Na(l.resumeQueue),eu(this,"onResume",Nc(this,Kc(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=qc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Pc(this));let o=!Ca.und(e.to),r=!Ca.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(Pc(this));this._lastToId=t.callId}let{key:l,defaultProps:i,animation:a}=this,{to:s,from:c}=a,{to:u=s,from:d=c}=e;r&&!o&&(!t.default||Ca.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Sa(d,c);p&&(a.from=d),d=ys(d);let m=!Sa(u,s);m&&this._focus(u);let g=Ec(t.to),{config:f}=a,{decay:h,velocity:v}=f;(o||r)&&(f.velocity=0),t.config&&!g&&function(e,t,n){n&&(Bc(n={...n},t),t={...n,...t}),Bc(e,t),Object.assign(e,t);for(let t in wc)null==e[t]&&(e[t]=wc[t]);let{frequency:o,damping:r}=e,{mass:l}=e;Ca.und(o)||(o<.01&&(o=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/o,2)*l,e.friction=4*Math.PI*r*l/o)}(f,dc(t.config,l),t.config!==i.config?dc(i.config,l):void 0);let b=Zs(this);if(!b||Ca.und(u))return n(Nc(this,!0));let k=Ca.und(t.reset)?r&&!t.default:!Ca.und(d)&&pc(t.reset,l),_=k?d:this.get(),y=_c(u),E=Ca.num(y)||Ca.arr(y)||Us(y),C=!g&&(!E||pc(i.immediate||t.immediate,l));if(m){let e=ic(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}let S=b.constructor,w=_s(u),B=!1;if(!w){let e=k||!Hc(this)&&p;(m||e)&&(B=Sa(_c(_),y),w=!B),(!Sa(a.immediate,C)&&!C||!Sa(f.decay,h)||!Sa(f.velocity,v))&&(w=!0)}if(B&&Gc(this)&&(a.changed&&!k?w=!0:w||this._stop(s)),!g&&((w||_s(s))&&(a.values=b.getPayload(),a.toValues=_s(u)?null:S==tc?[1]:Ia(y)),a.immediate!=C&&(a.immediate=C,!C&&!k&&this._set(s)),w)){let{onRest:e}=a;wa(Xc,(e=>Jc(this,t,e)));let o=Nc(this,Kc(this,s));Na(this._pendingCalls,o),this._pendingCalls.add(n),a.changed&&ta.batchedUpdates((()=>{a.changed=!k,e?.(o,this),k?dc(i.onRest,o):a.onStart?.(o,this)}))}k&&this._set(_),g?n(Lc(t.to,t,this._state,this)):w?this._start():Gc(this)&&!m?this._pendingCalls.add(n):n(Mc(_))}_focus(e){let t=this.animation;e!==t.to&&(Es(this)&&this._detach(),t.to=e,Es(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;_s(t)&&(Bs(t,this),Dc(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;_s(e)&&Is(e,this)}_set(e,t=!0){let n=ys(e);if(!Ca.und(n)){let e=Zs(this);if(!e||!Sa(n,e.getValue())){let o=ic(n);e&&e.constructor==o?e.setValue(n):Qs(this,o.create(n)),e&&ta.batchedUpdates((()=>{this._onChange(n,t)}))}}return Zs(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,eu(this,"onStart",Nc(this,Kc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),dc(this.animation.onChange,e,this)),dc(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Zs(this).reset(ys(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Gc(this)||($c(this,!0),Uc(this)||this._resume())}_resume(){ya.skipAnimation?this.finish():Ha.start(this)}_stop(e,t){if(Gc(this)){$c(this,!1);let n=this.animation;wa(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Cs(this,{type:"idle",parent:this});let o=t?Pc(this.get()):Nc(this.get(),Kc(this,e??n.to));Na(this._pendingCalls,o),n.changed&&(n.changed=!1,eu(this,"onRest",o,this))}}};function Kc(e,t){let n=_c(t);return Sa(_c(e.get()),n)}function qc(e,t=e.loop,n=e.to){let o=dc(t);if(o){let r=!0!==o&&kc(o),l=(r||e).reverse,i=!r||r.reset;return Yc({...e,loop:t,default:!1,pause:void 0,to:!l||Ec(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function Yc(e){let{to:t,from:n}=e=kc(e),o=new Set;return Ca.obj(t)&&Qc(t,o),Ca.obj(n)&&Qc(n,o),e.keys=o.size?Array.from(o):null,e}function Zc(e){let t=Yc(e);return Ca.und(t.default)&&(t.default=hc(t)),t}function Qc(e,t){Ba(e,((e,n)=>null!=e&&t.add(n)))}var Xc=["onStart","onRest","onChange","onPause","onResume"];function Jc(e,t,n){e.animation[n]=t[n]!==gc(t,n)?mc(t[n],e.key):void 0}function eu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var tu=["onStart","onChange","onRest"],nu=1,ou=class{id=nu++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Ca.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Yc(e)),this}start(e){let{queue:t}=this;return e?t=Ia(e).map(Yc):this.queue=[],this._flush?this._flush(this,t):(uu(this,t),ru(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;wa(Ia(t),(t=>n[t].stop(!!e)))}else Rc(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Ca.und(e))this.start({pause:!0});else{let t=this.springs;wa(Ia(e),(e=>t[e].pause()))}return this}resume(e){if(Ca.und(e))this.start({pause:!1});else{let t=this.springs;wa(Ia(e),(e=>t[e].resume()))}return this}each(e){Ba(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,xa(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&xa(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,xa(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ta.onFrame(this._onFrame)}};function ru(e,t){return Promise.all(t.map((t=>lu(e,t)))).then((t=>Tc(e,t)))}async function lu(e,t,n){let{keys:o,to:r,from:l,loop:i,onRest:a,onResolve:s}=t,c=Ca.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);let u=Ca.arr(r)||Ca.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):wa(tu,(n=>{let o=t[n];if(Ca.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,Na(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===gc(t,"cancel");(u||m&&d.asyncId)&&p.push(xc(++e._lastAsyncId,{props:t,state:d,actions:{pause:Ea,resume:Ea,start(t,n){m?(Rc(d,e._lastAsyncId),n(Pc(e))):(t.onRest=a,n(Lc(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=Tc(e,await Promise.all(p));if(i&&g.finished&&(!n||!g.noop)){let n=qc(t,i,r);if(n)return uu(e,[n]),lu(e,n,!0)}return s&&ta.batchedUpdates((()=>s(g,e,e.item))),g}function iu(e,t){let n={...e.springs};return t&&wa(Ia(t),(e=>{Ca.und(e.keys)&&(e=Yc(e)),Ca.obj(e.to)||(e={...e,to:void 0}),cu(n,e,(e=>su(e)))})),au(e,n),n}function au(e,t){Ba(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Bs(t,e))}))}function su(e,t){let n=new Wc;return n.key=e,t&&Bs(n,t),n}function cu(e,t,n){t.keys&&wa(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function uu(e,t){wa(t,(t=>{cu(e.springs,t,(t=>su(t,e)))}))}var du=({children:e,...t})=>{let n=(0,ba.useContext)(pu),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,ba.useState)((()=>({inputs:t,result:e()}))),o=(0,ba.useRef)(),r=o.current,l=r;return l?t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:l}=pu;return ba.createElement(l,{value:t},e)},pu=function(e,t){return Object.assign(e,ba.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(du,{});du.Provider=pu.Provider,du.Consumer=pu.Consumer;var mu=()=>{let e=[],t=function(t){Gs(`${Fs}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let o=[];return wa(e,((e,r)=>{if(Ca.und(t))o.push(e.start());else{let l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return wa(e,(e=>e.pause(...arguments))),this},t.resume=function(){return wa(e,(e=>e.resume(...arguments))),this},t.set=function(t){wa(e,((e,n)=>{let o=Ca.fun(t)?t(n,e):t;o&&e.set(o)}))},t.start=function(t){let n=[];return wa(e,((e,o)=>{if(Ca.und(t))n.push(e.start());else{let r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return wa(e,(e=>e.stop(...arguments))),this},t.update=function(t){return wa(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};let n=function(e,t,n){return Ca.fun(e)?e(n,t):e};return t._getProps=n,t};function gu(e,t,n){let o=Ca.fun(t)&&t;o&&!n&&(n=[]);let r=(0,ba.useMemo)((()=>o||3==arguments.length?mu():void 0),[]),l=(0,ba.useRef)(0),i=js(),a=(0,ba.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=iu(e,t);return l.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ru(e,t):new Promise((o=>{au(e,n),a.queue.push((()=>{o(ru(e,t))})),i()}))}})),[]),s=(0,ba.useRef)([...a.ctrls]),c=[],u=qs(e)||0;function d(e,n){for(let r=e;r{wa(s.current.slice(e,u),(e=>{Cc(e,r),e.stop(!0)})),s.current.length=e,d(u,e)}),[e]),(0,ba.useMemo)((()=>{d(0,Math.min(u,e))}),n);let p=s.current.map(((e,t)=>iu(e,c[t]))),m=(0,ba.useContext)(du),g=qs(m),f=m!==g&&yc(m);$s((()=>{l.current++,a.ctrls=s.current;let{queue:e}=a;e.length&&(a.queue=[],wa(e,(e=>e()))),wa(s.current,((e,t)=>{r?.add(e),f&&e.start({default:m});let n=c[t];n&&(Sc(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ws((()=>()=>{wa(a.ctrls,(e=>e.stop(!0)))}));let h=p.map((e=>({...e})));return r?[h,r]:h}function fu(e,t){let n=Ca.fun(e),[[o],r]=gu(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[o,r]:o}var hu=class extends Fc{constructor(e,t){super(),this.source=e,this.calc=us(...t);let n=this._get(),o=ic(n);Qs(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Sa(t,this.get())||(Zs(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&bu(this._active)&&ku(this)}_get(){let e=Ca.arr(this.source)?this.source.map(ys):Ia(ys(this.source));return this.calc(...e)}_start(){this.idle&&!bu(this._active)&&(this.idle=!1,wa(Xs(this),(e=>{e.done=!1})),ya.skipAnimation?(ta.batchedUpdates((()=>this.advance())),ku(this)):Ha.start(this))}_attach(){let e=1;wa(Ia(this.source),(t=>{_s(t)&&Bs(t,this),Dc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){wa(Ia(this.source),(e=>{_s(e)&&Is(e,this)})),this._active.clear(),ku(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Ia(this.source).reduce(((e,t)=>Math.max(e,(Dc(t)?t.priority:0)+1)),0))}};function vu(e){return!1!==e.idle}function bu(e){return!e.size||Array.from(e).every(vu)}function ku(e){e.idle||(e.idle=!0,wa(Xs(e),(e=>{e.done=!0})),Cs(e,{type:"idle",parent:e}))}ya.assign({createStringInterpolator:zs,to:(e,t)=>new hu(e,t)});Ha.advance;var _u=window.ReactDOM,yu=/^--/;function Eu(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||yu.test(e)||Su.hasOwnProperty(e)&&Su[e]?(""+t).trim():t+"px"}var Cu={};var Su={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wu=["Webkit","Ms","Moz","O"];Su=Object.keys(Su).reduce(((e,t)=>(wu.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Su);var Bu=/^(matrix|translate|scale|rotate|skew)/,Iu=/^(translate)/,xu=/^(rotate|skew)/,Tu=(e,t)=>Ca.num(e)&&0!==e?e+t:e,Mu=(e,t)=>Ca.arr(e)?e.every((e=>Mu(e,t))):Ca.num(e)?e===t:parseFloat(e)===t,Nu=class extends oc{constructor({x:e,y:t,z:n,...o}){let r=[],l=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),l.push((e=>[`translate3d(${e.map((e=>Tu(e,"px"))).join(",")})`,Mu(e,0)]))),Ba(o,((e,t)=>{if("transform"===t)r.push([e||""]),l.push((e=>[e,""===e]));else if(Bu.test(t)){if(delete o[t],Ca.und(e))return;let n=Iu.test(t)?"px":xu.test(t)?"deg":"";r.push(Ia(e)),l.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Tu(r,n)})`,Mu(r,0)]:e=>[`${t}(${e.map((e=>Tu(e,n))).join(",")})`,Mu(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new Pu(r,l)),super(o)}},Pu=class extends Ss{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return wa(this.inputs,((n,o)=>{let r=ys(n[0]),[l,i]=this.transforms[o](Ca.arr(r)?r:n.map(ys));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&wa(this.inputs,(e=>wa(e,(e=>_s(e)&&Bs(e,this)))))}observerRemoved(e){0==e&&wa(this.inputs,(e=>wa(e,(e=>_s(e)&&Is(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Cs(this,e)}};ya.assign({batchedUpdates:_u.unstable_batchedUpdates,createStringInterpolator:zs,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Lu=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new oc(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{let t=uc(e)||"Anonymous";return(e=Ca.str(e)?l[e]||(l[e]=ac(e,r)):e[cc]||(e[cc]=ac(e,r))).displayName=`Animated(${t})`,e};return Ba(e,((t,n)=>{Ca.arr(e)&&(n=uc(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:l,scrollLeft:i,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cu[t]||(Cu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=Eu(t,o[t]);yu.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==l&&(e.scrollTop=l),void 0!==i&&(e.scrollLeft=i),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Nu(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ru=Lu.animated;const Au=e=>e+1,Ou=e=>({top:e.offsetTop,left:e.offsetLeft});var Du=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,u.useRef)(),i=(0,m.useReducedMotion)()||!o,[a,s]=(0,u.useReducer)(Au,0),[c,d]=(0,u.useReducer)(Au,0),[p,g]=(0,u.useState)({x:0,y:0}),f=(0,u.useMemo)((()=>l.current?Ou(l.current):null),[r]),h=(0,u.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,Ri.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);return(0,u.useLayoutEffect)((()=>{a&&d()}),[a]),(0,u.useLayoutEffect)((()=>{if(!f)return;if(i)return void h();l.current.style.transform=void 0;const e=Ou(l.current);s(),g({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[r]),fu({from:{x:p.x,y:p.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:function(e){let{value:n}=e;if(!l.current)return;let{x:o,y:r}=n;o=Math.round(o),r=Math.round(r);const i=0===o&&0===r;l.current.style.transformOrigin="center center",l.current.style.transform=i?void 0:`translate3d(${o}px,${r}px,0)`,l.current.style.zIndex=t?"1":"",h()}}),l};const zu=".block-editor-block-list__block",Fu=".block-list-appender",Vu=".block-editor-button-block-appender";function Hu(e,t){return t.closest([zu,Fu,Vu].join(","))===e}function Gu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(zu);return t?t.id.slice("block-".length):void 0}function Uu(e){const t=(0,u.useRef)(),n=function(e){return(0,g.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:o,isBlockSelected:r}=t(To);if(r(e)&&"edit"===o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:r}=(0,g.useSelect)(To);return(0,u.useEffect)((()=>{if(!o(e)||r())return;if(null==n)return;if(!t.current)return;const{ownerDocument:l}=t.current;if(Hu(t.current,l.activeElement))return;const i=Ri.focus.tabbable.find(t.current).filter((e=>(0,Ri.isTextField)(e))),a=-1===n,s=i[a?i.length-1:0]||t.current;if(Hu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Ri.focus.tabbable.findNext(t.current);if(e&&Hu(t.current,e)&&(0,Ri.isFormElement)(e))return void e.focus()}(0,Ri.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function $u(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ju(){const e=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return t().outlineMode}),[]);return(0,m.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",$u),t.addEventListener("mouseover",$u),()=>{t.removeEventListener("mouseout",$u),t.removeEventListener("mouseover",$u),t.classList.remove("is-hovered")}}),[e])}function Wu(e){return(0,g.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:l,getBlockName:i,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:d,__unstableSelectionHasUnmergeableBlock:m}=t(To),{outlineMode:g}=s(),f=n(e),h=r(e),v=i(e),b=c(e,!0),k=l(e);return p()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":k,"is-partially-selected":k&&!d()&&!m(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(v)),"is-dragging":f,"has-child-selected":b,"remove-outline":h&&g&&u()})}),[e])}function Ku(e){return(0,g.useSelect)((t=>{const n=t(To).getBlockName(e),o=(0,a.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function qu(e){return(0,g.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(To),r=o(e);if(null==r||!r.className)return;const l=(0,a.getBlockType)(n(e));return(null==l?void 0:l.apiVersion)>1?r.className:void 0}),[e])}function Yu(e){return(0,g.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(To);if(!i(e))return;const a=n();return a?p()("is-block-moving-mode",{"can-insert-moving-block":o(r(a),l(e))}):void 0}),[e])}function Zu(e){const{isBlockSelected:t}=(0,g.useSelect)(To),{selectBlock:n,selectionChange:o}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):Hu(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var Qu=window.wp.keycodes;function Xu(e){const t=(0,g.useSelect)((t=>t(To).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,g.useSelect)(To),{insertDefaultBlock:r,removeBlock:l}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",a),i.addEventListener("dragstart",s),()=>{i.removeEventListener("keydown",a),i.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Qu.ENTER&&a!==Qu.BACKSPACE&&a!==Qu.DELETE||s!==i||(0,Ri.isTextField)(s)||(t.preventDefault(),a===Qu.ENTER?r({},n(e),o(e)+1):l(e))}function s(e){e.preventDefault()}}),[e,t,n,o,r,l])}function Ju(e){const{isNavigationMode:t,isBlockSelected:n}=(0,g.useSelect)(To),{setNavigationMode:o,selectBlock:r}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}function ed(){const e=(0,u.useContext)($v);return(0,m.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function td(e){return(0,g.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(To);return n(e)}),[e])}function nd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:r={},isAligned:l}=(0,u.useContext)(od),{index:i,mode:s,name:c,blockApiVersion:d,blockTitle:f,isPartOfSelection:h,adjustScrolling:v,enableAnimation:b}=(0,g.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:o,getBlockMode:r,getBlockName:l,isTyping:i,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(To),{getActiveBlockVariation:m}=e(a.store),g=c(n),f=u(n)||d(n),h=l(n),v=(0,a.getBlockType)(h),b=m(h,t(n));return{index:o(n),mode:r(n),name:h,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:(null==b?void 0:b.title)||(null==v?void 0:v.title),isPartOfSelection:g||f,adjustScrolling:g||p(n),enableAnimation:!i()&&s()<=200}}),[n]),k=td(n),y=(0,_.sprintf)((0,_.__)("Block: %s"),f),E="html"!==s||t?"":"-visual",C=(0,m.useMergeRefs)([e.ref,Uu(n),Jo(n),Zu(n),Xu(n),Ju(n),ju(),ed(),Du({isSelected:h,adjustScrolling:v,enableAnimation:b,triggerAnimationOnChange:i}),(0,m.useDisabled)({isDisabled:!k})]),S=Ro();return d<2&&n===S.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...r,...e,ref:C,id:`block-${n}${E}`,role:"document","aria-label":y,"data-block":n,"data-type":c,"data-title":f,className:p()(p()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":k}),o,e.className,r.className,Wu(n),Ku(n),qu(n),Yu(n)),style:{...r.style,...e.style}}}nd.save=a.__unstableGetBlockProps;const od=(0,u.createContext)();function rd(e){let{children:t,isHtml:n,...o}=e;return(0,u.createElement)("div",nd(o,{__unstableIsHtml:n}),t)}const ld=(0,g.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(To),d=s(n),p=r(n),m=a(o),g=c(n,o),f=u(n,o),{name:h,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:g,canMove:f,block:d,name:h,attributes:v,isValid:b,isSelected:p}})),id=(0,g.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d}=e(To);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(To),l=r(),{clientId:i}=t,a=l.length?l:[i];o(a,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n.select(To),a=i(o);r(e,a+1,l)},onMerge(e){const{clientId:o,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:p,getBlockAttributes:m,getBlockName:g,getBlockOrder:f,getBlockIndex:h,getBlockRootClientId:v,canInsertBlockType:b}=n.select(To);function k(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=v(e),l=f(e),[i]=l;if(1===l.length&&(0,a.isUnmodifiedBlock)(p(i)))d(e);else{if(b(g(i),o))u([i],e,o,h(e));else{const l=(0,a.switchToBlockType)(p(i),(0,a.getDefaultBlockName)());l&&l.length&&n.batch((()=>{r(l,h(e),o,t),d(i,!1)}))}!f(e).length&&(0,a.isUnmodifiedBlock)(p(e))&&d(e,!1)}}if(e){if(i){const e=c(i);if(e){if(g(i)!==g(e))return void l(i,e);{const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(f(e),e,i),d(e,!1)}))}}}const e=c(o);if(!e)return;f(e).length?k(e,!1):l(o,e)}else{const e=s(o);if(e)l(e,o);else if(i){const e=s(i);if(e&&g(i)===g(e)){const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(f(i),i,e),d(i,!1)}))}k(i)}}},onReplace(e,n,o){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),i([t.clientId],e,n,o)},toggleSelection(e){s(e)}}}));var ad=(0,m.compose)(m.pure,ld,id,(0,m.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,h.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:o,isLocked:r,canRemove:l,clientId:i,isSelected:s,isSelectionEnabled:c,className:d,__unstableLayoutClassNames:m,name:f,isValid:h,attributes:v,wrapperProps:b,setAttributes:k,onReplace:_,onInsertBlocksAfter:y,onMerge:E,toggleSelection:C}=e;const{themeSupportsLayout:S,hasContentLockedParent:w,isContentBlock:B,isContentLocking:I,isTemporarilyEditingAsBlocks:x}=(0,g.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=e(To),l=!!n(i);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(a.store).__experimentalHasContentRoleAttribute(f),hasContentLockedParent:l,isContentLocking:"contentOnly"===o(i)&&!l,isTemporarilyEditingAsBlocks:r()===i}}),[f,i]),{removeBlock:T}=(0,g.useDispatch)(To),M=(0,u.useCallback)((()=>T(i)),[i]),N=ci()||{};let P=(0,u.createElement)(Vi,{name:f,isSelected:s,attributes:v,setAttributes:k,insertBlocksAfter:r?void 0:y,onReplace:l?_:void 0,onRemove:l?M:void 0,mergeBlocks:l?E:void 0,clientId:i,isSelectionEnabled:c,toggleSelection:C,__unstableLayoutClassNames:m,__unstableParentLayout:Object.keys(N).length?N:void 0});const L=(0,a.getBlockType)(f);w&&!B&&(b={...b,tabIndex:-1}),null!=L&&L.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=p()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(b,L.getEditWrapperProps(v)));const R=b&&!!b["data-align"]&&!S;let A;if(R&&(P=(0,u.createElement)("div",{className:"wp-block","data-align":b["data-align"]},P)),h)A="html"===o?(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{display:"none"}},P),(0,u.createElement)(rd,{isHtml:!0},(0,u.createElement)(Ji,{clientId:i}))):(null==L?void 0:L.apiVersion)>1?P:(0,u.createElement)(rd,b,P);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(L,v);A=(0,u.createElement)(rd,{className:"has-warning"},(0,u.createElement)(Ki,{clientId:i}),(0,u.createElement)(u.RawHTML,null,(0,Ri.safeHTML)(e)))}const{"data-align":O,...D}=null!==(t=b)&&void 0!==t?t:{},z={clientId:i,className:p()({"is-content-locked":I,"is-content-locked-temporarily-editing-as-blocks":x,"is-content-block":w&&B},O&&S&&`align${O}`,d),wrapperProps:D,isAligned:R},F=(0,u.useMemo)((()=>z),Object.values(z));return(0,u.createElement)(od.Provider,{value:F},(0,u.createElement)(Qi,{fallback:(0,u.createElement)(rd,{className:"has-warning"},(0,u.createElement)(Yi,null))},A))})),sd=window.wp.htmlEntities;var cd=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const ud=[(0,u.createInterpolateElement)((0,_.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,_.__)("Drag files into the editor to automatically insert media blocks."),(0,_.__)("Change a block's type by pressing the block icon on the toolbar.")];var dd=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*ud.length));return(0,u.createElement)(h.Tip,null,ud[e])};var pd=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var md=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gd=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));var fd=(0,u.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r,context:l}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:gd});const i=(0,u.createElement)(h.Icon,{icon:n&&n.src?n.src:n,context:l}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,u.createElement)("span",{style:a,className:p()("block-editor-block-icon",r,{"has-colors":o})},i)}));var hd=function(e){let{title:t,icon:n,description:o,blockType:r,className:l}=e;r&&(W()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r));const{parentNavBlockClientId:i}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(To);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,g.useDispatch)(To);return(0,u.createElement)("div",{className:p()("block-editor-block-card",l)},i&&(0,u.createElement)(h.Button,{onClick:()=>a(i),label:(0,_.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?pd:md,isSmall:!0}),(0,u.createElement)(fd,{icon:n,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-block-card__content"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,u.createElement)("span",{className:"block-editor-block-card__description"},o)))};const vd=(0,m.createHigherOrderComponent)((e=>(0,g.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,u.createElement)(e,c({registry:o},r));const[l,i]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,g.createRegistry)({},o);e.registerStore(So,xo),i(e)}),[o]),l?(0,u.createElement)(g.RegistryProvider,{value:l},(0,u.createElement)(e,c({registry:l},r))):null}))),"withRegistryProvider");const bd=()=>{};function kd(e){let{clientId:t=null,value:n,selection:o,onChange:r=bd,onInput:l=bd}=e;const i=(0,g.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:m}=i.dispatch(To),{getBlockName:f,getBlocks:h}=i.select(To),v=(0,g.useSelect)((e=>!t||e(To).areInnerBlocksControlled(t)),[t]),b=(0,u.useRef)({incoming:null,outgoing:[]}),k=(0,u.useRef)(!1),_=()=>{n&&(m(),t?i.batch((()=>{p(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));k.current&&(b.current.incoming=e),m(),d(t,e)})):(k.current&&(b.current.incoming=n),s(n)))},y=(0,u.useRef)(l),E=(0,u.useRef)(r);(0,u.useEffect)((()=>{y.current=l,E.current=r}),[l,r]),(0,u.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):h(t)!==n&&(b.current.outgoing=[],_(),o&&c(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,u.useEffect)((()=>{v||(b.current.outgoing=[],_())}),[v]),(0,u.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l,areInnerBlocksControlled:a}=i.select(To);let s=h(t),c=r(),u=!1;k.current=!0;const d=i.subscribe((()=>{if(null!==t&&null===f(t))return;if(!(!t||a(t)))return;const i=r(),d=h(t),p=d!==s;if(s=d,p&&(b.current.incoming||l()))return b.current.incoming=null,void(c=i);if(p||u&&!p&&i&&!c){c=i,b.current.outgoing.push(s);(c?E.current:y.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})}u=p}));return()=>{k.current=!1,d()}}),[i,t])}const _d=vd((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=Io((0,g.useDispatch)(To));return(0,u.useEffect)((()=>{r({...n,__internalIsInitialized:!0},o)}),[n]),kd(e),(0,u.createElement)(Xo,null,t)}));var yd=e=>(0,u.createElement)(_d,c({},e,{stripExperimentalSettings:!0}),e.children);function Ed(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,g.useSelect)(To),{clearSelectedBlock:o}=(0,g.useDispatch)(To),{clearBlockSelection:r}=e();return(0,m.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",l),()=>{e.removeEventListener("mousedown",l)};function l(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function Cd(e){return(0,u.createElement)("div",c({ref:Ed()},e))}function Sd(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(To);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function wd(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,g.useSelect)(Sd,[]);return(0,m.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:a}=i;if(null==e)return;if(!o||t)return;const{length:s}=n;s<2||l&&(r.contentEditable=!0,r.focus(),a.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function Bd(e,t,n,o){let r,l=Ri.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(zu)===t.closest(zu)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Ri.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function Id(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,g.useSelect)(To),{selectBlock:l}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((i=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:g}=s,f=c===Qu.UP,h=c===Qu.DOWN,v=c===Qu.LEFT,b=c===Qu.RIGHT,k=f||v,_=v||b,y=f||h,E=_||y,C=d||p||m||g,S=y?Ri.isVerticalEdge:Ri.isHorizontalEdge,{ownerDocument:w}=i,{defaultView:B}=w;if(!E)return;if(o()){if(d)return;if(!r())return;return s.preventDefault(),void(k?l(e()):l(t(),-1))}if(!function(e,t,n){if((t===Qu.UP||t===Qu.DOWN)&&!n)return!0;const{tagName:o}=e;if("INPUT"===o)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==o}(u,c,C))return;y?a||(a=(0,Ri.computeCaretRect)(B)):a=null;const I=(0,Ri.isRTL)(u)?!k:k,{keepCaretInsideBlock:x}=n();if(d)(function(e,t){const n=Bd(e,t,i);return n&&Gu(n)})(u,k)&&S(u,k)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,Ri.isVerticalEdge)(u,k)||m&&!(0,Ri.isHorizontalEdge)(u,I)||x){if(_&&B.getSelection().isCollapsed&&(0,Ri.isHorizontalEdge)(u,I)&&!x){const e=Bd(u,I,i);(0,Ri.placeCaretAtHorizontalEdge)(e,k),s.preventDefault()}}else{const e=Bd(u,k,i,!0);e&&((0,Ri.placeCaretAtVerticalEdge)(e,m?!k:k,m?void 0:a),s.preventDefault())}}return i.addEventListener("mousedown",s),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",s),i.removeEventListener("keydown",c)}}),[])}var xd=window.wp.keyboardShortcuts;function Td(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,g.useSelect)(To),{multiSelect:o,selectBlock:r}=(0,g.useDispatch)(To),l=(0,xd.__unstableUseShortcutEventMatch)();return(0,m.useRefEffect)((i=>{function a(a){if(!l("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ri.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),d=e(u);s.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}}),[])}function Md(e,t){e.contentEditable=t,t&&e.focus()}function Nd(){const{startMultiSelect:e,stopMultiSelect:t}=(0,g.useDispatch)(To),{isSelectionEnabled:n,hasMultiSelection:o,isDraggingBlocks:r}=(0,g.useSelect)(To);return(0,m.useRefEffect)((l=>{const{ownerDocument:i}=l,{defaultView:a}=i;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(o())return;Md(l,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function d(t){let{buttons:o,target:c}=t;r()||1===o&&c.getAttribute("contenteditable")&&n()&&(s=i.activeElement,e(),a.addEventListener("mouseup",u),Md(l,!0))}return l.addEventListener("mouseout",d),()=>{l.removeEventListener("mouseout",d),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,o])}function Pd(e,t){e.contentEditable=t,t&&e.focus()}function Ld(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,g.useDispatch)(To),{getBlockParents:o,getBlockSelectionStart:r}=(0,g.useSelect)(To);return(0,m.useRefEffect)((n=>{const{ownerDocument:l}=n,{defaultView:i}=l;function a(l){const a=i.getSelection();if(!a.rangeCount)return;const s=l.shiftKey&&"mouseup"===l.type;if(a.isCollapsed&&!s)return void Pd(n,!1);let c=Gu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Gu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=r(),t=Gu(l.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Pd(n,!1);if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],r=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[r],n[r])}}function s(){l.addEventListener("selectionchange",a),i.addEventListener("mouseup",a)}function c(){l.removeEventListener("selectionchange",a),i.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function Rd(){const{selectBlock:e}=(0,g.useDispatch)(To),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,g.useSelect)(To);return(0,m.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),a=Gu(l.target);l.shiftKey?i!==a&&(r.contentEditable=!0,r.focus()):o()&&e(a)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function Ad(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,g.useSelect)(To),{replaceBlocks:r,__unstableSplitSelection:l,removeBlocks:i,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((u=>{function d(e){var t;o()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===Qu.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):l()):d.keyCode===Qu.BACKSPACE||d.keyCode===Qu.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?i(t()):n()?s(d.keyCode===Qu.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===Qu.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function Od(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),o=(0,u.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,g.useSelect)(To),{setNavigationMode:a}=(0,g.useDispatch)(To),s=(0,g.useSelect)((e=>e(To).isNavigationMode()),[])?void 0:"0",c=(0,u.useRef)();function d(t){if(c.current)c.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Ri.focus.tabbable[n](t.target).focus()}}const p=(0,u.createElement)("div",{ref:t,tabIndex:s,onFocus:d}),f=(0,u.createElement)("div",{ref:n,tabIndex:s,onFocus:d}),h=(0,m.useRefEffect)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Qu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Qu.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(((0,Ri.isFormElement)(e.target)||e.target.getAttribute("data-block")===l())&&(0,Ri.isFormElement)(Ri.focus.tabbable[i](e.target)))return;const u=o?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==Qu.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=Ri.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:g}=m;return g.addEventListener("keydown",p),s.addEventListener("keydown",u),s.addEventListener("focusout",d),()=>{g.removeEventListener("keydown",p),s.removeEventListener("keydown",u),s.removeEventListener("focusout",d)}}),[]);return[p,(0,m.useMergeRefs)([e,h]),f]}(),o=(0,g.useSelect)((e=>e(To).hasMultiSelection()),[]);return[e,(0,m.useMergeRefs)([t,Ad(),Nd(),Ld(),Rd(),wd(),Td(),Id(),(0,m.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=o,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,_.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}var Dd=(0,u.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,i]=Od();return(0,u.createElement)(u.Fragment,null,r,(0,u.createElement)("div",c({},o,{ref:(0,m.useMergeRefs)([l,t]),className:p()(o.className,"block-editor-writing-flow")}),n),i)}));function zd(e){return(0,u.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function Fd(e){let{contentRef:t,children:n,head:o,tabIndex:r=0,scale:l=1,frameSize:i=0,readonly:a,forwardedRef:s,...d}=e;const f=(0,g.useSelect)((e=>e(To).getSettings().__unstableResolvedAssets),[]),[,v]=(0,u.useReducer)((()=>({}))),[b,k]=(0,u.useState)(),[y,E]=(0,u.useState)([]),C=zd(null==f?void 0:f.styles),S=C.map((e=>e.id)),w=(0,u.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:o,cssRules:r}=t;return o?e(r):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(o)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}return e}),[])),[]).filter((e=>!S.includes(e.id))),B=zd(null==f?void 0:f.scripts),I=Ed(),[x,T,M]=Od(),[N,{height:P}]=(0,m.useResizeObserver)(),L=(0,m.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{readyState:l,documentElement:i}=o;return t=o,("interactive"===l||"complete"===l)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(o),k(o),I(i),E(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir,i.removeChild(o.head),i.removeChild(o.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",o),()=>{var r,l;e.removeEventListener("load",o),null===(r=t)||void 0===r||r.removeEventListener("dragover",n),null===(l=t)||void 0===l||l.removeEventListener("drop",n)}}),[]),R=(0,m.useRefEffect)((e=>{B.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{v()}))}),[]),A=(0,m.useDisabled)({isDisabled:!a}),O=(0,m.useMergeRefs)([t,I,T,A]),D=(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...C,...w].map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,u.createElement)(a,{id:o,key:o},i):(0,u.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})}))),z=(0,u.useMemo)((()=>""+(0,u.renderToString)(D)),[]);return(0,u.createElement)(u.Fragment,null,r>=0&&x,(0,u.createElement)("iframe",c({},d,{ref:(0,m.useMergeRefs)([s,L]),tabIndex:r,srcDoc:z,title:(0,_.__)("Editor canvas")}),b&&(0,u.createPortal)((0,u.createElement)(u.Fragment,null,(0,u.createElement)("head",{ref:R},D,o,(0,u.createElement)("style",null,`html { transition: background 5s; ${i?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,u.createElement)("body",{ref:O,className:p()("block-editor-iframe__body","editor-styles-wrapper",...y),style:{marginBottom:`-${P*(1-l)-i}px`,marginTop:i,transform:`scale( ${l} )`}},N,(0,u.createElement)(h.__experimentalStyleProvider,{document:b},n))),b.documentElement)),r>=0&&M)}var Vd=(0,u.forwardRef)((function(e,t){return(0,g.useSelect)((e=>e(To).getSettings().__internalIsInitialized),[])?(0,u.createElement)(Fd,c({},e,{forwardedRef:t})):null})),Hd={grad:.9,turn:360,rad:360/(2*Math.PI)},Gd=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Ud=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$d=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},jd=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Wd=function(e){return{r:$d(e.r,0,255),g:$d(e.g,0,255),b:$d(e.b,0,255),a:$d(e.a)}},Kd=function(e){return{r:Ud(e.r),g:Ud(e.g),b:Ud(e.b),a:Ud(e.a,3)}},qd=/^#([0-9a-f]{3,8})$/i,Yd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Zd=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),a=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(a<0?a+6:a),s:l?i/l*100:0,v:l/255*100,a:r}},Qd=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),a=o*(1-(t-l)*n),s=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,a,i,i,s,o][c],g:255*[s,o,o,a,i,i][c],b:255*[i,i,s,o,o,a][c],a:r}},Xd=function(e){return{h:jd(e.h),s:$d(e.s,0,100),l:$d(e.l,0,100),a:$d(e.a)}},Jd=function(e){return{h:Ud(e.h),s:Ud(e.s),l:Ud(e.l),a:Ud(e.a,3)}},ep=function(e){return Qd((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},tp=function(e){return{h:(t=Zd(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},np=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,op=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rp=/^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,ip={string:[[function(e){var t=qd.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?Ud(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?Ud(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=rp.exec(e)||lp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Wd({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=np.exec(e)||op.exec(e);if(!t)return null;var n,o,r=Xd({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Hd[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ep(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return Gd(t)&&Gd(n)&&Gd(o)?Wd({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!Gd(t)||!Gd(n)||!Gd(o))return null;var i=Xd({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return ep(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!Gd(t)||!Gd(n)||!Gd(o))return null;var i=function(e){return{h:jd(e.h),s:$d(e.s,0,100),v:$d(e.v,0,100),a:$d(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return Qd(i)},"hsv"]]},ap=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Kd(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?Yd(Ud(255*r)):"","#"+Yd(t)+Yd(n)+Yd(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return Kd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Kd(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return Jd(tp(this.rgba))},e.prototype.toHslString=function(){return t=(e=Jd(tp(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=Zd(this.rgba),{h:Ud(e.h),s:Ud(e.s),v:Ud(e.v),a:Ud(e.a,3)};var e},e.prototype.invert=function(){return mp({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),mp(cp(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),mp(cp(this.rgba,-e))},e.prototype.grayscale=function(){return mp(cp(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),mp(dp(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),mp(dp(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?mp({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ud(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=tp(this.rgba);return"number"==typeof e?mp({h:e,s:t.s,l:t.l,a:t.a}):Ud(t.h)},e.prototype.isEqual=function(e){return this.toHex()===mp(e).toHex()},e}(),mp=function(e){return e instanceof pp?e:new pp(e)},gp=[],fp=function(e){e.forEach((function(e){gp.indexOf(e)<0&&(e(pp,ip),gp.push(e))}))};function hp(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,a=o[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=s,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m(s=bp(i))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var _p=n(3124),yp=n.n(_p);const Ep=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Cp(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const a=[];function s(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;a.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),g(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),g(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function g(e){let t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function h(){const e=p(/^([^{]+)/);if(e)return Sp(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Sp(t[0]),!p(/^:\s*/))return s("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Ep,""),value:n?Sp(n[0]).replace(Ep,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return s("missing '{'");let t;for(g(e);t=v();)!1!==t&&(e.push(t),g(e));return u()?e:s("missing '}'")}function k(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const o=t[1];if(!c())return s("@keyframes missing '{'");let r,i=g();for(;r=k();)i.push(r),i=i.concat(g());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):s("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Sp(t[1]);if(!c())return s("@media missing '{'");const o=g().concat(d());return u()?e({type:"media",media:n,rules:o}):s("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Sp(t[1]),media:Sp(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Sp(t[1]);if(!c())return s("@supports missing '{'");const o=g().concat(d());return u()?e({type:"supports",supports:n,rules:o}):s("@supports missing '}'")}()||_()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Sp(t[1]),o=Sp(t[2]);if(!c())return s("@document missing '{'");const r=g().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):s("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=h()||[];if(!c())return s("@page missing '{'");let n,o=g();for(;n=v();)o.push(n),o=o.concat(g());return u()?e({type:"page",selectors:t,declarations:o}):s("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=g().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=g();for(;t=v();)n.push(t),n=n.concat(g());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function w(){const e=l(),t=h();return t?(g(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return wp(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Sp(e){return e?e.replace(/^\s+|\s+$/g,""):""}function wp(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){wp(e,o)})):n&&"object"==typeof n&&wp(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Bp=n(8575),Ip=n.n(Bp),xp=Tp;function Tp(e){this.options=e||{}}Tp.prototype.emit=function(e){return e},Tp.prototype.visit=function(e){return this[e.type](e)},Tp.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;ot=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Ap(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+Op(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const zp=/^(body|html|:root).*$/;var Fp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const o=n=>t.includes(n.trim())?n:n.match(zp)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(o)}:n}};var Vp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(Fp(t)),o&&r.push(Dp(o)),r.length?Rp(n,(0,m.compose)(r)):n}))};const Hp=".editor-styles-wrapper";function Gp(e){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(Hp);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=mp(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function Up(e){let{styles:t}=e;const n=(0,u.useMemo)((()=>Vp(t,Hp)),[t]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",{ref:Gp(t)}),n.map(((e,t)=>(0,u.createElement)("style",{key:t},e))))}function $p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=mp(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function jp(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,u.createElement)("style",null,o)}function Wp(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,u.createElement)("style",null,n)}function Kp(e){let{id:t,colors:n}=e;const o=$p(n);return(0,u.createElement)(h.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,u.createElement)("defs",null,(0,u.createElement)("filter",{id:t},(0,u.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,u.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,u.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,u.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,u.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,u.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,u.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function qp(e){let{preset:t}=e;return(0,u.createElement)(Kp,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let Yp;fp([hp,kp]);const Zp=2e3;function Qp(e){let{viewportWidth:t,containerWidth:n,minHeight:o,additionalStyles:r=[]}=e;t||(t=n);const[l,{height:i}]=(0,m.useResizeObserver)(),{styles:a,duotone:s}=(0,g.useSelect)((e=>{var t,n;const o=e(To).getSettings();return{styles:o.styles,duotone:null===(t=o.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,u.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r]:a),[a,r]),d=(0,u.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);Yp=Yp||(0,m.pure)(Kv);const p=n/t;return(0,u.createElement)(h.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${p})`,height:i*p,maxHeight:i>Zp?Zp*p:void 0,minHeight:o}},(0,u.createElement)(Vd,{head:(0,u.createElement)(Up,{styles:c}),contentRef:(0,m.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none",maxHeight:Zp,minHeight:0!==p&&p<1&&o?o/p:o}},l,d.map((e=>(0,u.createElement)(qp,{preset:e,key:e.slug}))),(0,u.createElement)(Yp,{renderAppender:!1})))}function Xp(e){const[t,{width:n}]=(0,m.useResizeObserver)();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,u.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,u.createElement)(Qp,c({},e,{containerWidth:n}))))}var Jp=(0,u.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:o,additionalStyles:r=[],__experimentalMinHeight:l,__experimentalPadding:i}=e;l&&(o=l,W()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],W()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,g.useSelect)((e=>e(To).getSettings()),[]),s=(0,u.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,u.createElement)(_d,{value:c,settings:s},(0,u.createElement)(Xp,{viewportWidth:n,minHeight:o,additionalStyles:r})):null}));function em(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,g.useSelect)((e=>e(To).getSettings()),[]),l=(0,u.useMemo)((()=>({...r,__unstableIsPreviewMode:!0})),[r]),i=(0,m.useDisabled)(),a=(0,m.useMergeRefs)([n.ref,i]),s=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),c=(0,u.createElement)(_d,{value:s,settings:l},(0,u.createElement)(Yv,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:a,className:p()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?c:null}}var tm=function(e){var t;let{item:n}=e;const{name:o,title:r,icon:l,description:i,initialAttributes:s,example:c}=n,d=(0,a.isReusableBlock)(n);return(0,u.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,u.createElement)("div",{className:"block-editor-inserter__preview"},d||c?(0,u.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,u.createElement)(Jp,{blocks:c?(0,a.getBlockFromExample)(o,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,a.createBlock)(o,s),viewportWidth:null!==(t=null==c?void 0:c.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,_.__)("No Preview Available."))),!d&&(0,u.createElement)(hd,{title:r,icon:l,description:i}))};var nm=(0,u.createContext)();var om=(0,u.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const i=(0,u.useContext)(nm);return(0,u.createElement)(h.__unstableCompositeItem,c({ref:t,state:i,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,u.createElement)(o,t,r):"function"==typeof r?r(t):(0,u.createElement)(h.Button,t,r)}))}));var rm=(0,u.createElement)(G.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function lm(e){let{count:t,icon:n,isPattern:o}=e;const r=o&&(0,_.__)("Pattern");return(0,u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,u.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,u.createElement)(h.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,u.createElement)(h.FlexItem,null,n?(0,u.createElement)(fd,{icon:n}):r||(0,_.sprintf)((0,_._n)("%d block","%d blocks",t),t)),(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(fd,{icon:rm})))))}var im=e=>{let{isEnabled:t,blocks:n,icon:o,children:r,isPattern:l}=e;const i={type:"inserter",blocks:n};return(0,u.createElement)(h.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,__experimentalDragComponent:(0,u.createElement)(lm,{count:n.length,icon:o,isPattern:l})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};var am=(0,u.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:r,onHover:l,isDraggable:i,...s}=e;const d=(0,u.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},g=(0,u.useMemo)((()=>[(0,a.createBlock)(o.name,o.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]),f=(0,a.isReusableBlock)(o)||(0,a.isTemplatePart)(o);return(0,u.createElement)(im,{isEnabled:i&&!o.disabled,blocks:g,icon:o.icon},(e=>{let{draggable:i,onDragStart:a,onDragEnd:g}=e;return(0,u.createElement)("div",{className:p()("block-editor-block-types-list__list-item",{"is-synced":f}),draggable:i,onDragStart:e=>{d.current=!0,a&&(l(null),a(e))},onDragEnd:e=>{d.current=!1,g&&g(e)}},(0,u.createElement)(om,c({isFirst:n,className:p()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),r(o,(0,Qu.isAppleOS)()?e.metaKey:e.ctrlKey),l(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Qu.ENTER&&(e.preventDefault(),r(o,(0,Qu.isAppleOS)()?e.metaKey:e.ctrlKey),l(null))},onMouseEnter:()=>{d.current||l(o)},onMouseLeave:()=>l(null)},s),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,u.createElement)(fd,{icon:o.icon,showColors:!0})),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,u.createElement)(h.__experimentalTruncate,{numberOfLines:3},o.title))))}))}));var sm=(0,u.forwardRef)((function(e,t){const[n,o]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,pn.speak)((0,_.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,u.createElement)("div",c({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))}));var cm=(0,u.forwardRef)((function(e,t){const n=(0,u.useContext)(nm);return(0,u.createElement)(h.__unstableCompositeGroup,c({state:n,role:"presentation",ref:t},e))}));var um=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:r,label:l,isDraggable:i=!0}=e;return(0,u.createElement)(sm,{className:"block-editor-block-types-list","aria-label":l},function(e,t){const n=[];for(let o=0,r=e.length;o(0,u.createElement)(cm,{key:t},e.map(((e,r)=>(0,u.createElement)(am,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:i&&!e.isDisabled,isFirst:0===t&&0===r})))))),r)};var dm=function(e){let{title:t,icon:n,children:o}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,u.createElement)(h.Icon,{icon:n})),(0,u.createElement)("div",{className:"block-editor-inserter__panel-content"},o))};var pm=(e,t)=>{const{categories:n,collections:o,items:r}=(0,g.useSelect)((t=>{const{getInserterItems:n}=t(To),{getCategories:o,getCollections:r}=t(a.store);return{categories:o(),collections:r(),items:n(e)}}),[e]);return[r,n,o,(0,u.useCallback)(((e,n)=>{let{name:o,initialAttributes:r,innerBlocks:l}=e;const i=(0,a.createBlock)(o,r,(0,a.createBlocksFromInnerBlocksTemplate)(l));t(i,void 0,n)}),[t])]};var mm=function(e){let{children:t}=e;const n=(0,h.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,u.createElement)(nm.Provider,{value:n},t)};const gm=[];var fm=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,s]=pm(t,n),c=(0,u.useMemo)((()=>Y(l,"frecency","desc").slice(0,6)),[l]),d=(0,u.useMemo)((()=>l.filter((e=>!e.category))),[l]),p=(0,u.useMemo)((()=>(0,m.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,f.groupBy)(e,"category")))(l)),[l]),g=(0,u.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,u.useEffect)((()=>()=>o(null)),[]);const h=(0,m.useAsyncList)(i),v=i.length===h.length,b=(0,u.useMemo)((()=>Object.entries(a)),[a]),k=(0,m.useAsyncList)(v?b:gm);return(0,u.createElement)(mm,null,(0,u.createElement)("div",null,r&&!!c.length&&(0,u.createElement)(dm,{title:(0,_._x)("Most used","blocks")},(0,u.createElement)(um,{items:c,onSelect:s,onHover:o,label:(0,_._x)("Most used","blocks")})),h.map((e=>{const t=p[e.slug];return t&&t.length?(0,u.createElement)(dm,{key:e.slug,title:e.title,icon:e.icon},(0,u.createElement)(um,{items:t,onSelect:s,onHover:o,label:e.title})):null})),v&&d.length>0&&(0,u.createElement)(dm,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,_.__)("Uncategorized")},(0,u.createElement)(um,{items:d,onSelect:s,onHover:o,label:(0,_.__)("Uncategorized")})),k.map((e=>{let[t,n]=e;const r=g[t];return r&&r.length?(0,u.createElement)(dm,{key:t,title:n.title,icon:n.icon},(0,u.createElement)(um,{items:r,onSelect:s,onHover:o,label:n.title})):null}))))},hm=window.wp.notices;var vm=(e,t)=>{const{patternCategories:n,patterns:o}=(0,g.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(To);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:r}=(0,g.useDispatch)(hm.store),l=(0,u.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>(0,a.cloneBlock)(e))),t.name),r((0,_.sprintf)((0,_.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[o,n,l]};const bm=e=>{let{showTooltip:t,title:n,children:o}=e;return t?(0,u.createElement)(h.Tooltip,{text:n},o):(0,u.createElement)(u.Fragment,null,o)};function km(e){let{isDraggable:t,pattern:n,onClick:o,onHover:r,composite:l,showTooltip:i}=e;const[a,s]=(0,u.useState)(!1),{blocks:d,viewportWidth:p}=n,g=`block-editor-block-patterns-list__item-description-${(0,m.useInstanceId)(km)}`;return(0,u.createElement)(im,{isEnabled:t,blocks:d,isPattern:!!n},(e=>{let{draggable:t,onDragStart:m,onDragEnd:f}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),m&&(null==r||r(null),m(e))},onDragEnd:e=>{s(!1),f&&f(e)}},(0,u.createElement)(bm,{showTooltip:i,title:n.title},(0,u.createElement)(h.__unstableCompositeItem,c({role:"option",as:"div"},l,{className:"block-editor-block-patterns-list__item",onClick:()=>{o(n,d),null==r||r(null)},onMouseEnter:()=>{a||null==r||r(n)},onMouseLeave:()=>null==r?void 0:r(null),"aria-label":n.title,"aria-describedby":n.description?g:void 0}),(0,u.createElement)(Jp,{blocks:d,viewportWidth:p}),!i&&(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,u.createElement)(h.VisuallyHidden,{id:g},n.description))))}))}function _m(){return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var ym=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onHover:r,onClickPattern:l,orientation:i,label:a=(0,_.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const d=(0,h.__unstableUseCompositeState)({orientation:i});return(0,u.createElement)(h.__unstableComposite,c({},d,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>o.includes(e)?(0,u.createElement)(km,{key:e.name,pattern:e,onClick:l,onHover:r,isDraggable:t,composite:d,showTooltip:s}):(0,u.createElement)(_m,{key:e.name}))))};function Em(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const r="block-editor-block-patterns-explorer__sidebar";return(0,u.createElement)("div",{className:`${r}__categories-list`},n.map((e=>{let{name:n,label:l}=e;return(0,u.createElement)(h.Button,{key:n,label:l,className:`${r}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},l)})))}function Cm(e){let{filterValue:t,setFilterValue:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,u.createElement)(h.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,_.__)("Search for patterns"),placeholder:(0,_.__)("Search")}))}var Sm=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,filterValue:r,setFilterValue:l}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,u.createElement)(Cm,{filterValue:r,setFilterValue:l}),!r&&(0,u.createElement)(Em,{selectedCategory:t,patternCategories:n,onClickCategory:o}))};var wm=function(){return(0,u.createElement)("div",{className:"block-editor-inserter__no-results"},(0,u.createElement)(Jl,{className:"block-editor-inserter__no-results-icon",icon:gd}),(0,u.createElement)("p",null,(0,_.__)("No results found.")))};var Bm=function(e){let{rootClientId:t="",insertionIndex:n,clientId:o,isAppender:r,onSelect:l,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}=e;const{getSelectedBlock:c}=(0,g.useSelect)(To),{destinationRootClientId:d,destinationIndex:p}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:a,getBlockOrder:s}=e(To),c=l();let u,d=t;return void 0!==n?u=n:o?u=a(o):!r&&c?(d=i(c),u=a(c)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,o,r]),{replaceBlocks:m,insertBlocks:f,showInsertionPoint:h,hideInsertionPoint:v}=(0,g.useDispatch)(To),b=(0,u.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=c();!r&&o&&(0,a.isUnmodifiedDefaultBlock)(o)?m(o.clientId,e,null,i||n?0:null,t):f(e,p,d,s,i||n?0:null,t);const u=Array.isArray(e)?e.length:1,g=(0,_.sprintf)((0,_._n)("%d block added.","%d blocks added.",u),u);(0,pn.speak)(g),l&&l(e)}),[r,c,m,f,d,p,l,i]),k=(0,u.useCallback)((e=>{e?h(d,p):v()}),[h,v,d,p]);return[d,b,k]},Im=n(4793),xm=n.n(Im);function Tm(e){return e.toLowerCase()}var Mm=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Nm=/[^A-Z0-9]+/gi;function Pm(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?Mm:n,r=t.stripRegexp,l=void 0===r?Nm:r,i=t.transform,a=void 0===i?Tm:i,s=t.delimiter,c=void 0===s?" ":s,u=Lm(Lm(e,o,"$1\0$2"),l,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}function Lm(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Rm=e=>e.name||"",Am=e=>e.title,Om=e=>e.description||"",Dm=e=>e.keywords||[],zm=e=>e.category,Fm=()=>null;function Vm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Pm(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Hm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=xm()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Gm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Vm(Hm(e))},Um=(e,t)=>e.filter((e=>!Gm(t).some((t=>t.includes(e))))),$m=(e,t,n,o)=>{if(0===Gm(o).length)return e;return jm(e,o,{getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===e.category})))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},jm=function(){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&&void 0!==arguments[2]?arguments[2]:{};const o=Gm(t);if(0===o.length)return e;const r=e.map((e=>[e,Wm(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return r.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),r.map((e=>{let[t]=e;return t}))};function Wm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:o=Rm,getTitle:r=Am,getDescription:l=Om,getKeywords:i=Dm,getCategory:a=zm,getCollection:s=Fm}=n,c=o(e),u=r(e),d=l(e),p=i(e),m=a(e),g=s(e),f=Hm(t),h=Hm(u);let v=0;if(f===h)v+=30;else if(h.startsWith(f))v+=20;else{const e=[c,u,d,...p,m,g].join(" "),t=Vm(f);0===Um(t,e).length&&(v+=10)}if(0!==v&&c.startsWith("core/")){v+=c!==e.id?1:2}return v}function Km(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,u.createElement)(h.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,_.sprintf)((0,_._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var qm=function(e){let{filterValue:t,selectedCategory:n,patternCategories:o}=e;const r=(0,m.useDebounce)(pn.speak,500),[l,i]=Bm({shouldFocusBlock:!0}),[a,,s]=vm(i,l),c=(0,u.useMemo)((()=>o.map((e=>e.name))),[o]),d=(0,u.useMemo)((()=>t?jm(a,t):a.filter((e=>{var t,o;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(o=e.categories)||void 0===o?void 0:o.includes(n)}))),[t,n,a]);(0,u.useEffect)((()=>{if(!t)return;const e=d.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);r(n)}),[t,r]);const p=(0,m.useAsyncList)(d,{step:2}),g=!(null==d||!d.length);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},g&&(0,u.createElement)(Km,{filterValue:t,filteredBlockPatternsLength:d.length}),(0,u.createElement)(mm,null,!g&&(0,u.createElement)(wm,null),g&&(0,u.createElement)(ym,{shownPatterns:p,blockPatterns:d,onClickPattern:s,isDraggable:!1})))};function Ym(e){let{initialCategory:t,patternCategories:n}=e;const[o,r]=(0,u.useState)(""),[l,i]=(0,u.useState)(null==t?void 0:t.name);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,u.createElement)(Sm,{selectedCategory:l,patternCategories:n,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,u.createElement)(qm,{filterValue:o,selectedCategory:l,patternCategories:n}))}var Zm=function(e){let{onModalClose:t,...n}=e;return(0,u.createElement)(h.Modal,{title:(0,_.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,u.createElement)(Ym,n))};function Qm(e){let{title:t}=e;return(0,u.createElement)(h.__experimentalVStack,{spacing:0},(0,u.createElement)(h.__experimentalView,null,(0,u.createElement)(h.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,u.createElement)(h.__experimentalHStack,{spacing:2},(0,u.createElement)(h.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?pd:md,isSmall:!0,"aria-label":(0,_.__)("Navigate to the previous view")}),(0,u.createElement)(h.__experimentalSpacer,null,(0,u.createElement)(h.__experimentalHeading,{level:5},t))))))}function Xm(e){let{categories:t,children:n}=e;return(0,u.createElement)(h.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,u.createElement)(h.__experimentalNavigatorScreen,{path:"/"},(0,u.createElement)(h.__experimentalItemGroup,null,t.map((e=>(0,u.createElement)(h.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:h.__experimentalItem,isAction:!0},(0,u.createElement)(h.__experimentalHStack,null,(0,u.createElement)(h.FlexBlock,null,e.label),(0,u.createElement)(Jl,{icon:(0,_.isRTL)()?md:pd}))))))),t.map((e=>(0,u.createElement)(h.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,u.createElement)(Qm,{title:(0,_.__)("Back")}),n(e)))))}const Jm=()=>{},eg=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function tg(e){const[t,n]=vm(void 0,e),o=(0,u.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),r=(0,u.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:o}=t;return[n,o].some((e=>eg.includes(e)))?[n,o].every((e=>eg.includes(e)))?eg.indexOf(n)-eg.indexOf(o):eg.includes(n)?-1:1:0}));return t.some((e=>!o(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,_._x)("Uncategorized")}),e}),[t,n]);return r}function ng(e){let{rootClientId:t,onInsert:n,onHover:o,category:r,showTitlesAsTooltip:l}=e;const i=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ri.focus.tabbable.find(i.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,u.createElement)("div",{ref:i,className:"block-editor-inserter__patterns-category-dialog"},(0,u.createElement)(og,{rootClientId:t,onInsert:n,onHover:o,category:r,showTitlesAsTooltip:l}))}function og(e){let{rootClientId:t,onInsert:n,onHover:o=Jm,category:r,showTitlesAsTooltip:l}=e;const[i,,a]=vm(n,t),s=tg(t),c=(0,u.useMemo)((()=>i.filter((e=>{var t,n,o;if("uncategorized"!==r.name)return null===(o=e.categories)||void 0===o?void 0:o.includes(r.name);return 0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[i,r]),d=(0,m.useAsyncList)(c);return(0,u.useEffect)((()=>()=>o(null)),[]),c.length?(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},r.label),(0,u.createElement)("p",null,r.description),(0,u.createElement)(ym,{shownPatterns:d,blockPatterns:c,onClickPattern:a,onHover:o,label:r.label,orientation:"vertical",category:r.label,isDraggable:!0,showTitlesAsTooltip:l})):null}var rg=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:o,rootClientId:r}=e;const[l,i]=(0,u.useState)(!1),a=tg(r),s=n||a[0],c=(0,m.useViewportMatch)("medium","<");return(0,u.createElement)(u.Fragment,null,!c&&(0,u.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Block pattern categories")},(0,u.createElement)(h.__experimentalItemGroup,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,u.createElement)(h.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,u.createElement)(h.__experimentalHStack,null,(0,u.createElement)(h.FlexBlock,null,e.label),(0,u.createElement)(Jl,{icon:pd}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(h.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>i(!0),variant:"secondary"},(0,_.__)("Explore all patterns")))))),c&&(0,u.createElement)(Xm,{categories:a},(e=>(0,u.createElement)(og,{onInsert:o,rootClientId:r,category:e,showTitlesAsTooltip:!1}))),l&&(0,u.createElement)(Zm,{initialCategory:s,patternCategories:a,onModalClose:()=>i(!1)}))},lg=window.wp.url;function ig(e){let{onHover:t,onInsert:n,rootClientId:o}=e;const[r,,,l]=pm(o,n),i=(0,u.useMemo)((()=>r.filter((e=>{let{category:t}=e;return"reusable"===t}))),[r]);return 0===i.length?(0,u.createElement)(wm,null):(0,u.createElement)(dm,{title:(0,_.__)("Reusable blocks")},(0,u.createElement)(um,{items:i,onSelect:l,onHover:t,label:(0,_.__)("Reusable blocks")}))}var ag=function(e){let{rootClientId:t,onInsert:n,onHover:o}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ig,{onHover:o,onInsert:n,rootClientId:t}),(0,u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,u.createElement)(h.Button,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,lg.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,_.__)("Manage Reusable blocks"))))};function sg(e){const[t,n]=(0,u.useState)([]),{canInsertImage:o,canInsertVideo:r,canInsertAudio:l}=(0,g.useSelect)((t=>{const{canInsertBlockType:n}=t(To);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),i=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,g.useSelect)((e=>{const t=e(To).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),o=(0,u.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return o}();return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!i)return;const t=new Map(await Promise.all(i.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:o,video:r,audio:l};i.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[o,r,l,i]),t}var cg=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var ug=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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"})),dg=window.wp.blob;const pg={image:"img",video:"video",audio:"audio"};function mg(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const l=pg[t],i=(0,u.createElement)(l,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=o)}});return[(0,a.createBlock)(`core/${t}`,n),i]}const gg=["image"],fg={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function hg(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const o=t.getReportUrl(n);return(0,u.createElement)(h.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,_.__)("Options"),popoverProps:fg,icon:cg},(()=>(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(h.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:ug},(0,_.sprintf)((0,_.__)("Report %s"),t.mediaType)))))}function vg(e){let{onClose:t,onSubmit:n}=e;return(0,u.createElement)(h.Modal,{title:(0,_.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,u.createElement)(h.__experimentalVStack,{spacing:3},(0,u.createElement)("p",null,(0,_.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,u.createElement)("p",null,(0,_.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,u.createElement)(h.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(h.Button,{variant:"tertiary",onClick:t},(0,_.__)("Cancel"))),(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(h.Button,{variant:"primary",onClick:n},(0,_.__)("Insert")))))}function bg(e){var t;let{media:n,onClick:o,composite:r,category:l}=e;const[i,s]=(0,u.useState)(!1),[d,m]=(0,u.useState)(!1),[f,v]=(0,u.useState)(!1),[b,k]=(0,u.useMemo)((()=>mg(n,l.mediaType)),[n,l.mediaType]),{createErrorNotice:y,createSuccessNotice:E}=(0,g.useDispatch)(hm.store),C=(0,g.useSelect)((e=>e(To).getSettings().mediaUpload),[]),S=(0,u.useCallback)((e=>{if(f)return;const t=(0,a.cloneBlock)(e),{id:n,url:r,caption:l}=t.attributes;n?o(t):(v(!0),window.fetch(r).then((e=>e.blob())).then((e=>{C({filesList:[e],additionalData:{caption:l},onFileChange(e){let[n]=e;(0,dg.isBlobURL)(n.url)||(o({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),E((0,_.__)("Image uploaded and inserted."),{type:"snackbar"}),v(!1))},allowedTypes:gg,onError(e){y(e,{type:"snackbar"}),v(!1)}})})).catch((()=>{s(!0),v(!1)})))}),[f,o,C,y,E]),w=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let B;if(w.length>25){const e="...";B=w.slice(0,25-e.length)+e}const I=(0,u.useCallback)((()=>m(!0)),[]),x=(0,u.useCallback)((()=>m(!1)),[]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(im,{isEnabled:!0,blocks:[b]},(e=>{let{draggable:t,onDragStart:o,onDragEnd:i}=e;return(0,u.createElement)("div",{className:p()("block-editor-inserter__media-list__list-item",{"is-hovered":d}),draggable:t,onDragStart:o,onDragEnd:i},(0,u.createElement)(h.Tooltip,{text:B||w},(0,u.createElement)("div",{onMouseEnter:I,onMouseLeave:x},(0,u.createElement)(h.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:"block-editor-inserter__media-list__item",onClick:()=>S(b),"aria-label":w}),(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},k,f&&(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,u.createElement)(h.Spinner,null)))),!f&&(0,u.createElement)(hg,{category:l,media:n}))))})),i&&(0,u.createElement)(vg,{onClose:()=>s(!1),onSubmit:()=>{o((0,a.cloneBlock)(b)),E((0,_.__)("Image inserted."),{type:"snackbar"}),s(!1)}}))}var kg=function(e){let{mediaList:t,category:n,onClick:o,label:r=(0,_.__)("Media List")}=e;const l=(0,h.__unstableUseCompositeState)();return(0,u.createElement)(h.__unstableComposite,c({},l,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r}),t.map(((e,t)=>(0,u.createElement)(bg,{key:e.id||e.sourceId||t,media:e,category:n,onClick:o,composite:l}))))};function _g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,u.useState)(e),[o,r]=(0,u.useState)(e),l=(0,m.useDebounce)(r,250);return(0,u.useEffect)((()=>{o!==t&&l(t)}),[o,t]),[t,n,o]}function yg(e){let{rootClientId:t,onInsert:n,category:o}=e;const r=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ri.focus.tabbable.find(r.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,u.createElement)("div",{ref:r,className:"block-editor-inserter__media-dialog"},(0,u.createElement)(Eg,{rootClientId:t,onInsert:n,category:o}))}function Eg(e){let{rootClientId:t,onInsert:n,category:o}=e;const[r,l,i]=_g(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,o]=(0,u.useState)(),[r,l]=(0,u.useState)(!1),i=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{var n;const r=JSON.stringify({category:e.name,...t});i.current=r,l(!0),o([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));r===i.current&&(o(a),l(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(o,{per_page:i?20:10,search:i}),c="block-editor-inserter__media-panel",d=o.labels.search_items||(0,_.__)("Search");return(0,u.createElement)("div",{className:c},(0,u.createElement)(h.SearchControl,{className:`${c}-search`,onChange:l,value:r,label:d,placeholder:d}),s&&(0,u.createElement)("div",{className:`${c}-spinner`},(0,u.createElement)(h.Spinner,null)),!s&&!(null!=a&&a.length)&&(0,u.createElement)(wm,null),!s&&!(null==a||!a.length)&&(0,u.createElement)(kg,{rootClientId:t,onClick:n,mediaList:a,category:o}))}var Cg=function(e){let{fallback:t=null,children:n}=e;const o=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return!!t().mediaUpload}),[]);return o?n:t};var Sg=(0,h.withFilters)("editor.MediaUpload")((()=>null));const wg=["image","video","audio"];var Bg=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:o,onInsert:r}=e;const l=sg(t),i=(0,m.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,u.useCallback)((e=>{if(null==e||!e.url)return;const[t]=mg(e,e.type);r(t)}),[r]),c=(0,u.useMemo)((()=>l.map((e=>({...e,label:e.labels.name})))),[l]);return(0,u.createElement)(u.Fragment,null,!i&&(0,u.createElement)("div",{className:`${a}-container`},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Media categories")},(0,u.createElement)(h.__experimentalItemGroup,{role:"list",className:a},l.map((e=>(0,u.createElement)(h.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>o(e),className:p()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,u.createElement)(h.__experimentalHStack,null,(0,u.createElement)(h.FlexBlock,null,e.labels.name),(0,u.createElement)(Jl,{icon:pd}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(Cg,null,(0,u.createElement)(Sg,{multiple:!1,onSelect:s,allowedTypes:wg,render:e=>{let{open:t}=e;return(0,u.createElement)(h.Button,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,_.__)("Open Media Library"))}})))))),i&&(0,u.createElement)(Xm,{categories:c},(e=>(0,u.createElement)(Eg,{onInsert:r,rootClientId:t,category:e}))))};const{Fill:Ig,Slot:xg}=(0,h.createSlotFill)("__unstableInserterMenuExtension");Ig.Slot=xg;var Tg=Ig;const Mg=[];var Ng=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:d=!1,isDraggable:p=!0,shouldFocusBlock:g=!0,prioritizePatterns:f,selectBlockOnInsert:v,orderInitialBlockItems:b}=e;const k=(0,m.useDebounce)(pn.speak,500),[y,E]=Bm({onSelect:n,rootClientId:r,clientId:l,isAppender:i,insertionIndex:a,shouldFocusBlock:g,selectBlockOnInsert:v}),[C,S,w,B]=pm(y,E),[I,,x]=vm(E,y),T=(0,u.useMemo)((()=>{if(0===s)return[];const e=jm(I,t);return void 0!==s?e.slice(0,s):e}),[t,I,s]);let M=c;f&&T.length>2&&(M=0);const N=(0,u.useMemo)((()=>{if(0===M)return[];let e=Y(C,"frecency","desc");!t&&b&&(e=b(e));const n=$m(e,S,w,t);return void 0!==M?n.slice(0,M):n}),[t,C,S,w,c,b]);(0,u.useEffect)((()=>{if(!t)return;const e=N.length+T.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);k(n)}),[t,k]);const P=(0,m.useAsyncList)(N,{step:9}),L=(0,m.useAsyncList)(P.length===N.length?T:Mg),R=N.length>0||T.length>0,A=!!N.length&&(0,u.createElement)(dm,{title:(0,u.createElement)(h.VisuallyHidden,null,(0,_.__)("Blocks"))},(0,u.createElement)(um,{items:P,onSelect:B,onHover:o,label:(0,_.__)("Blocks"),isDraggable:p})),O=!!T.length&&(0,u.createElement)(dm,{title:(0,u.createElement)(h.VisuallyHidden,null,(0,_.__)("Block Patterns"))},(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,u.createElement)(ym,{shownPatterns:L,blockPatterns:T,onClickPattern:x,onHover:o,isDraggable:p})));return(0,u.createElement)(mm,null,!d&&!R&&(0,u.createElement)(wm,null),f?O:A,!!N.length&&!!T.length&&(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),f?A:O,d&&(0,u.createElement)(Tg.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:t,hasItems:R,rootClientId:y}},(e=>e.length?e:R?null:(0,u.createElement)(wm,null))))};const Pg={name:"blocks",title:(0,_.__)("Blocks")},Lg={name:"patterns",title:(0,_.__)("Patterns")},Rg={name:"reusable",title:(0,_.__)("Reusable"),icon:U},Ag={name:"media",title:(0,_.__)("Media")};var Og=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,showMedia:r=!1,onSelect:l,prioritizePatterns:i}=e;const a=(0,u.useMemo)((()=>{const e=[];return i&&n&&e.push(Lg),e.push(Pg),!i&&n&&e.push(Lg),r&&e.push(Ag),o&&e.push(Rg),e}),[i,Pg,n,Lg,o,r,Rg]);return(0,u.createElement)(h.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:l},t)};var Dg=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,onSelect:i,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:d=!0,prioritizePatterns:m}=e;const[f,v,b]=_g(c),[k,y]=(0,u.useState)(null),[E,C]=(0,u.useState)(null),[S,w]=(0,u.useState)(null),[B,I]=(0,u.useState)(null),[x,T,M]=Bm({rootClientId:n,clientId:o,isAppender:r,insertionIndex:l,shouldFocusBlock:d}),{showPatterns:N,inserterItems:P}=(0,g.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(To);return{showPatterns:!!t(x).length,inserterItems:n(x)}}),[x]),L=(0,u.useMemo)((()=>P.some((e=>{let{category:t}=e;return"reusable"===t}))),[P]),R=!!sg(x).length,A=(0,u.useCallback)(((e,t,n)=>{T(e,t,n),i()}),[T,i]),O=(0,u.useCallback)(((e,t)=>{T(e,{patternName:t}),i()}),[T,i]),D=(0,u.useCallback)((e=>{M(!!e),y(e)}),[M,y]),z=(0,u.useCallback)((e=>{M(!!e)}),[M]),F=(0,u.useCallback)((e=>{C(e)}),[C]),V=(0,u.useMemo)((()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__block-list"},(0,u.createElement)(fm,{rootClientId:x,onInsert:A,onHover:D,showMostUsedBlocks:s})),a&&(0,u.createElement)("div",{className:"block-editor-inserter__tips"},(0,u.createElement)(h.VisuallyHidden,{as:"h2"},(0,_.__)("A tip for using the block editor")),(0,u.createElement)(dd,null)))),[x,A,D,b,s,a]),H=(0,u.useMemo)((()=>(0,u.createElement)(rg,{rootClientId:x,onInsert:O,onSelectCategory:F,selectedCategory:E})),[x,O,F,E]),G=(0,u.useMemo)((()=>(0,u.createElement)(ag,{rootClientId:x,onInsert:A,onHover:D})),[x,A,D]),U=(0,u.useMemo)((()=>(0,u.createElement)(Bg,{rootClientId:x,selectedCategory:S,onSelectCategory:w,onInsert:A})),[x,A,S,w]),$=(0,u.useCallback)((e=>"blocks"===e.name?V:"patterns"===e.name?H:"reusable"===e.name?G:"media"===e.name?U:void 0),[V,H,G,U]),j=(0,u.useRef)();(0,u.useImperativeHandle)(t,(()=>({focusSearch:()=>{j.current.focus()}})));const W="patterns"===B&&!b&&E,K=!b&&(N||L||R),q="media"===B&&!b&&S;return(0,u.createElement)("div",{className:"block-editor-inserter__menu"},(0,u.createElement)("div",{className:p()("block-editor-inserter__main-area",{"show-as-tabs":K})},(0,u.createElement)(h.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{k&&y(null),v(e)},value:f,label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search"),ref:j}),!!b&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,u.createElement)(Ng,{filterValue:b,onSelect:i,onHover:D,rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,showBlockDirectory:!0,shouldFocusBlock:d})),K&&(0,u.createElement)(Og,{showPatterns:N,showReusableBlocks:L,showMedia:R,prioritizePatterns:m,onSelect:I},$),!b&&!K&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},V)),q&&(0,u.createElement)(yg,{rootClientId:x,onInsert:A,category:S}),a&&k&&(0,u.createElement)(tm,{item:k}),W&&(0,u.createElement)(ng,{rootClientId:x,onInsert:O,onHover:z,category:E,showTitlesAsTooltip:!0}))}));function zg(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:l,selectBlockOnInsert:i,orderInitialBlockItems:a}=e;const[s,c]=(0,u.useState)(""),[d,m]=Bm({onSelect:t,rootClientId:n,clientId:o,isAppender:r,selectBlockOnInsert:i}),[f]=pm(d,m),[v]=vm(m,d),{setInserterIsOpened:b,insertionIndex:k}=(0,g.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:r}=e(To),l=t(),i=n(o),a=r();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertionIndex:-1===i?a:i}}),[o]),y=v.length&&(!!s||l),E=y&&v.length>6||f.length>6;(0,u.useEffect)((()=>{b&&b(!1)}),[b]);let C=0;return y&&(C=l?4:2),(0,u.createElement)("div",{className:p()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":b})},E&&(0,u.createElement)(h.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search")}),(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,u.createElement)(Ng,{filterValue:s,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:C,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:l,selectBlockOnInsert:i,orderInitialBlockItems:a})),b&&(0,u.createElement)(h.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:n,insertionIndex:k,filterValue:s})},"aria-label":(0,_.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,_.__)("Browse all")))}const Fg=e=>{let{onToggle:t,disabled:n,isOpen:o,blockTitle:r,hasSingleBlockType:l,toggleProps:i={},prioritizePatterns:a}=e;const{as:s=h.Button,label:d,onClick:p,...m}=i;let g=d;return!g&&l?g=(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),r):!g&&a?g=(0,_.__)("Add pattern"):g||(g=(0,_._x)("Add block","Generic label for block inserter button")),(0,u.createElement)(s,c({icon:cd,label:g,tooltipPosition:"bottom",onClick:function(e){t&&t(e),p&&p(e)},className:"block-editor-inserter__toggle","aria-haspopup":!l&&"true","aria-expanded":!l&&o,disabled:n},m))};class Vg extends u.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,hasItems:s,renderToggle:c=Fg,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!s,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:d}=this.props;return i?(0,u.createElement)(zg,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:a,selectBlockOnInsert:c,orderInitialBlockItems:d}):(0,u.createElement)(Dg,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,u.createElement)(h.Dropdown,{className:"block-editor-inserter",contentClassName:p()("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,_.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}const Hg=(0,m.compose)([(0,g.withSelect)(((e,t)=>{var n;let{clientId:o,rootClientId:r,shouldDirectInsert:l=!0}=t;const{getBlockRootClientId:i,hasInserterItems:s,getAllowedBlocks:c,__experimentalGetDirectInsertBlock:u,getSettings:d}=e(To),{getBlockVariations:p}=e(a.store);r=r||i(o)||void 0;const m=c(r),g=l&&u(r),f=d(),h=1===(null==m?void 0:m.length)&&0===(null===(n=p(m[0].name,"inserter"))||void 0===n?void 0:n.length);let v=!1;return h&&(v=m[0]),{hasItems:s(r),hasSingleBlockType:h,blockTitle:v?v.title:"",allowedBlockType:v,directInsertBlock:g,rootClientId:r,prioritizePatterns:f.__experimentalPreferPatternsOnRoot&&!r}})),(0,g.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:r,isAppender:l,hasSingleBlockType:i,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!i&&!c)return;const{insertBlock:p}=e(To);let m;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:l}=o(To);if(!e||!r&&!n)return{};const i={};let a={};if(r){const e=t(r),n=t(l(r));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(i[e]=a[e])})),i}(c.attributesToCopy);m=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else m=(0,a.createBlock)(s.name);var g;(p(m,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:i,getBlockRootClientId:a}=o(To);if(r)return e(r);const s=t();return!l&&s&&a(s)===n?e(s)+1:i(n).length}(),n,d),u)&&u({clientId:null===(g=m)||void 0===g?void 0:g.clientId});const f=(0,_.sprintf)((0,_.__)("%s block added"),s.title);(0,pn.speak)(f)}}})),(0,m.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(Vg);var Gg=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Hg,c({ref:t},e,{orderInitialBlockItems:void 0}))));var Ug=(0,m.compose)((0,g.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(To),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,g.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(To);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,sd.decodeEntities)(r)||(0,_.__)("Type / to choose a block");return(0,u.createElement)("div",{"data-root-client-id":l||"",className:p()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,u.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,_.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Qu.ENTER!==e.keyCode&&Qu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,u.createElement)(Gg,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function $g(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,u.createElement)(Gg,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:d}=e;n=d?(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),c):(0,_._x)("Add block","Generic label for block inserter button");const m=!d;let g=(0,u.createElement)(h.Button,{ref:t,onFocus:r,tabIndex:l,className:p()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":m?"true":void 0,"aria-expanded":m?s:void 0,disabled:a,label:n},!d&&(0,u.createElement)(h.VisuallyHidden,{as:"span"},n),(0,u.createElement)(Jl,{icon:cd}));return(m||d)&&(g=(0,u.createElement)(h.Tooltip,{text:n},g)),g},isAppender:!0})}const jg=(0,u.forwardRef)(((e,t)=>(W()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),$g(e,t))));var Wg=(0,u.forwardRef)($g);function Kg(e){let{rootClientId:t}=e;return(0,g.useSelect)((e=>e(To).canInsertBlockType((0,a.getDefaultBlockName)(),t)))?(0,u.createElement)(Ug,{rootClientId:t}):(0,u.createElement)(Wg,{rootClientId:t,className:"block-list-appender__toggle"})}var qg=function(e){let{rootClientId:t,renderAppender:n,className:o,tagName:r="div"}=e;const l=function(e,t){const{hideInserter:n,isParentSelected:o}=(0,g.useSelect)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:o,__unstableGetEditorMode:r}=t(To),l=o();return{hideInserter:!!n(e)||"zoom-out"===r(),isParentSelected:e===l||!e&&!l}}),[e]);return n||!1===t?null:t?(0,u.createElement)(t,null):o?(0,u.createElement)(Kg,{rootClientId:e}):null}(t,n);return l?(0,u.createElement)(r,{tabIndex:-1,className:p()("block-list-appender wp-block",o),contentEditable:!1,"data-block":!0},l):null};const Yg=Number.MAX_SAFE_INTEGER;(0,u.createContext)();var Zg=function(e){let{previousClientId:t,nextClientId:n,children:o,__unstablePopoverSlot:r,__unstableContentRef:l,...i}=e;const[a,s]=(0,u.useReducer)((e=>(e+1)%Yg),0),{orientation:d,rootClientId:m,isVisible:f}=(0,g.useSelect)((e=>{var o;const{getBlockListSettings:r,getBlockRootClientId:l,isBlockVisible:i}=e(To),a=l(null!=t?t:n);return{orientation:(null===(o=r(a))||void 0===o?void 0:o.orientation)||"vertical",rootClientId:a,isVisible:i(t)&&i(n)}}),[t,n]),v=tr(t),b=tr(n),k="vertical"===d,y=(0,u.useMemo)((()=>{if(a<0||!v&&!b||!f)return{};const e=v?v.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;if(k)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,_.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[v,b,k,a,f]),E=(0,u.useMemo)((()=>{if(a<0||!v&&!b||!f)return;const{ownerDocument:e}=v||b;return{ownerDocument:e,getBoundingClientRect(){const e=v?v.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0;return k?(o=e?e.bottom:t.top,n=(0,_.isRTL)()?e?e.right:t.right:e?e.left:t.left):(o=e?e.top:t.top,n=(0,_.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,o,0,0)}}}),[v,b,a,k,f]),C=qr(l);return(0,u.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(s);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,u.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(s);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,u.useLayoutEffect)((()=>{if(v)return v.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=v.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[v]),(v||b)&&f?(0,u.createElement)(h.Popover,c({ref:C,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:r||null,key:n+"--"+m},i,{className:p()("block-editor-block-popover","block-editor-block-popover__inbetween",i.className),resize:!1,flip:!1,placement:"bottom-start",variant:"unstyled"}),(0,u.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:y},o)):null};const Qg={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var Xg=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:o}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(To),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),r=(0,m.useReducedMotion)();return(0,u.createElement)(Zr,{clientId:o,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,u.createElement)(h.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?Qg.show:Qg.hide,animate:Qg.show,exit:r?Qg.show:Qg.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const Jg=(0,u.createContext)();function ef(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,g.useDispatch)(To),l=(0,u.useContext)(Jg),i=(0,u.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:d,isInserterShown:f,isDistractionFree:v,isNavigationMode:b}=(0,g.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(To),u=r(),d=n(u.rootClientId);if(!d.length)return{};let p=d[u.index-1],m=d[u.index];for(;l(p);)p=i(p);for(;l(m);)m=a(m);const g=s();return{previousClientId:p,nextClientId:m,orientation:(null===(t=o(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:g.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),k=(0,m.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},y={start:{scale:k?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(v&&!b)return null;const E=p()("block-editor-block-list__insertion-point","is-"+a);return(0,u.createElement)(Zg,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,u.createElement)(h.__unstableMotion.div,{layout:!k,initial:k?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&c&&o(c,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:p()(E,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==i.current||l.current||r()}},(0,u.createElement)(h.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,u.createElement)(h.__unstableMotion.div,{variants:y,className:p()("block-editor-block-list__insertion-point-inserter")},(0,u.createElement)(Gg,{position:"bottom center",clientId:c,rootClientId:d,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function tf(e){const{insertionPoint:t,isVisible:n}=(0,g.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(To);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,u.createElement)(Xg,c({key:`${t.rootClientId}-${t.index}`},e)):(0,u.createElement)(ef,e):null}function nf(){const e=(0,u.useContext)(Jg),t=(0,g.useSelect)((e=>e(To).getSettings().isDistractionFree||"zoom-out"===e(To).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,g.useSelect)(To),{showInsertionPoint:d,hideInsertionPoint:p}=(0,g.useDispatch)(To);return(0,m.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",l),()=>{o.removeEventListener("mousemove",l)};function l(t){var o;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void p();let l;if(!t.target.classList.contains("is-root-container")){l=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(l))return;const u=(null===(o=n(l))||void 0===o?void 0:o.orientation)||"vertical",m=t.clientY,g=t.clientX;let f=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>m||e.classList.contains("wp-block")&&"horizontal"===u&&t.left>g}));if(!f)return void p();if(!f.id&&(f=f.firstElementChild,!f))return void p();const h=f.id.slice("block-".length);if(!h||c(h))return;if(a().includes(h))return;const v=f.getBoundingClientRect();if("horizontal"===u&&(t.clientY>v.bottom||t.clientYv.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,rf="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function lf(e){return(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(To),{getBlockType:r,getActiveBlockVariation:l}=t(a.store),i=n(e),s=r(i);if(!s)return null;const c=o(e),u=l(i,c),d=(0,a.isReusableBlock)(s)||(0,a.isTemplatePart)(s),p={isSynced:d,title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{isSynced:d,title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:p}),[e])}function af(e){let{clientId:t,maximumLength:n,context:o}=e;const{attributes:r,name:l,reusableBlockTitle:i}=(0,g.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=e(To),l=n(t);if(!l)return{};const i=(0,a.isReusableBlock)((0,a.getBlockType)(l));return{attributes:o(t),name:l,reusableBlockTitle:i&&r(o(t).ref)}}),[t]),s=lf(t);if(!l||!s)return null;const c=(0,a.getBlockType)(l),u=c?(0,a.__experimentalGetBlockLabel)(c,r,o):null,d=i||u,p=d&&d!==c.title?d:s.title;if(n&&n>0&&p.length>n){const e="...";return p.slice(0,n-e.length)+e}return p}function sf(e){let{clientId:t,maximumLength:n,context:o}=e;return af({clientId:t,maximumLength:n,context:o})}var cf=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:r,onDragEnd:l}=e;const{srcRootClientId:i,isDraggable:s,icon:c}=(0,g.useSelect)((e=>{var t;const{canMoveBlocks:o,getBlockRootClientId:r,getBlockName:l}=e(To),i=r(n[0]),s=l(n[0]);return{srcRootClientId:i,isDraggable:o(n,i),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),d=(0,u.useRef)(!1),[p,m,f]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,u.useCallback)((r=>{e.current=r.clientY,n.current=(0,Ri.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,g.useDispatch)(To);if((0,u.useEffect)((()=>()=>{d.current&&b()}),[]),!s)return t({draggable:!1});const k={type:"block",srcClientIds:n,srcRootClientId:i};return(0,u.createElement)(h.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:k,onDragStart:e=>{v(n),d.current=!0,p(e),r&&r()},onDragOver:m,onDragEnd:()=>{b(),d.current=!1,f(),l&&l()},__experimentalDragComponent:(0,u.createElement)(lm,{count:n.length,icon:c})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))};var uf=(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 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var df=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const pf=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,_.isRTL)()?"left":"right":"down":null;function mf(e,t,n,o,r,l,i){const a=n+1;if(e>1)return function(e,t,n,o,r,l){const i=t+1;if(n&&o)return(0,_.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=pf("down",l);if("down"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d down by one place"),e,i);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r>0&&o){const e=pf("down",l);if("down"===e)return(0,_.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=pf("up",l);if("up"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d up by one place"),e,i);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r<0&&n){const e=pf("up",l);if("up"===e)return(0,_.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,l,i);if(o&&r)return(0,_.sprintf)((0,_.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=pf("down",i);if("down"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(l>0&&r){const e=pf("down",i);if("down"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(l<0&&!o){const e=pf("up",i);if("up"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(l<0&&o){const e=pf("up",i);if("up"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const gf=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?pd:md:uf:"down"===e?"horizontal"===t?(0,_.isRTL)()?md:pd:df:null,ff=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move right"):(0,_.__)("Move left"):(0,_.__)("Move up"):"down"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move left"):(0,_.__)("Move right"):(0,_.__)("Move down"):null,hf=(0,u.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:r,...l}=e;const i=(0,m.useInstanceId)(hf),s=Array.isArray(n)?n:[n],d=s.length,{blockType:f,isDisabled:v,rootClientId:b,isFirst:k,isLast:_,firstIndex:y,orientation:E="vertical"}=(0,g.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:l,getBlock:i,getBlockListSettings:c}=e(To),u=s[0],d=n(u),p=t(u),m=t(s[s.length-1]),g=l(d),f=i(u),h=0===p,v=m===g.length-1,{orientation:b}=c(d)||{};return{blockType:f?(0,a.getBlockType)(f.name):null,isDisabled:"up"===o?h:v,rootClientId:d,firstIndex:p,isFirst:h,isLast:v,orientation:r||b}}),[n,o]),{moveBlocksDown:C,moveBlocksUp:S}=(0,g.useDispatch)(To),w="up"===o?S:C,B=`block-editor-block-mover-button__description-${i}`;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.Button,c({ref:t,className:p()("block-editor-block-mover-button",`is-${o}-button`),icon:gf(o,E),label:ff(o,E),"aria-describedby":B},l,{onClick:v?null:e=>{w(n,b),l.onClick&&l.onClick(e)},disabled:v,__experimentalIsFocusable:!0})),(0,u.createElement)(h.VisuallyHidden,{id:B},mf(d,f&&f.title,y,k,_,"up"===o?-1:1,E)))})),vf=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(hf,c({direction:"up",ref:t},e)))),bf=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(hf,c({direction:"down",ref:t},e))));var kf=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:o,rootClientId:r,isFirst:l,isLast:i,orientation:a}=(0,g.useSelect)((e=>{var n;const{getBlockIndex:o,getBlockListSettings:r,canMoveBlocks:l,getBlockOrder:i,getBlockRootClientId:a}=e(To),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),d=o(c),p=o(s[s.length-1]),m=i(u);return{canMove:l(t,u),rootClientId:u,isFirst:0===d,isLast:p===m.length-1,orientation:null===(n=r(u))||void 0===n?void 0:n.orientation}}),[t]);if(!o||l&&i&&!r)return null;const s=(0,_.__)("Drag");return(0,u.createElement)(h.ToolbarGroup,{className:p()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,u.createElement)(cf,{clientIds:t},(e=>(0,u.createElement)(h.Button,c({icon:rm,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,u.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(vf,c({clientIds:t},e)))),(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(bf,c({clientIds:t},e))))))};var _f=function(e){let{clientId:t,rootClientId:n}=e;const o=lf(t),r=(0,g.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:a,__unstableGetEditorMode:s}=e(To),c=l(t),{name:u,attributes:d}=r(t);return{index:c,name:u,attributes:d,blockMovingMode:i(),orientation:null===(o=a(n))||void 0===o?void 0:o.orientation,editorMode:s()}}),[t,n]),{index:l,name:i,attributes:s,blockMovingMode:d,orientation:m,editorMode:f}=r,{setNavigationMode:v,removeBlock:b}=(0,g.useDispatch)(To),k=(0,u.useRef)(),y=(0,a.getBlockType)(i),E=(0,a.__experimentalGetAccessibleBlockLabel)(y,s,l+1,m);(0,u.useEffect)((()=>{k.current.focus(),(0,pn.speak)(E)}),[E]);const C=tr(t),{hasBlockMovingClientId:S,getBlockIndex:w,getBlockRootClientId:B,getClientIdsOfDescendants:I,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:T,getPreviousBlockClientId:M,getNextBlockClientId:N}=(0,g.useSelect)(To),{selectBlock:P,clearSelectedBlock:L,setBlockMovingClientId:R,moveBlockToPosition:A}=(0,g.useDispatch)(To),O=p()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d}),D=(0,_.__)("Drag");return(0,u.createElement)("div",{className:O},(0,u.createElement)(h.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(fd,{icon:null==o?void 0:o.icon,showColors:!0})),(0,u.createElement)(h.FlexItem,null,"zoom-out"===f&&(0,u.createElement)(kf,{clientIds:[t],hideDragHandle:!0}),"navigation"===f&&(0,u.createElement)(cf,{clientIds:[t]},(e=>(0,u.createElement)(h.Button,c({icon:rm,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(h.Button,{ref:k,onClick:"navigation"===f?()=>v(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,o=n===Qu.UP,r=n===Qu.DOWN,l=n===Qu.LEFT,i=n===Qu.RIGHT,a=n===Qu.TAB,s=n===Qu.ESCAPE,c=n===Qu.ENTER,u=n===Qu.SPACE,d=e.shiftKey;if(n===Qu.BACKSPACE||n===Qu.DELETE)return b(t),void e.preventDefault();const p=x(),m=T(),g=M(m||p),f=N(m||p),h=a&&d||o,v=a&&!d||r,k=l,_=i;let y;if(h)y=g;else if(v)y=f;else if(k){var E;y=null!==(E=B(p))&&void 0!==E?E:p}else if(_){var O;y=null!==(O=I([p])[0])&&void 0!==O?O:p}const D=S();if(s&&D&&!e.defaultPrevented&&(R(null),e.preventDefault()),(c||u)&&D){const e=B(D),t=B(p),n=w(D);let o=w(p);n{!function(e){const[t]=Ri.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,xd.useShortcut)("core/block-editor/focus-toolbar",a),(0,u.useEffect)((()=>{l&&a()}),[n,l,a]),(0,u.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=yf(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=yf(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}var Cf=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const i=(0,u.useRef)(),a=function(e){const[t,n]=(0,u.useState)(!0),o=(0,u.useCallback)((()=>{const t=!Ri.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||W()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return Ef(i,n,a,o,r),a?(0,u.createElement)(h.Toolbar,c({label:l["aria-label"],ref:i},l),t):(0,u.createElement)(h.NavigableMenu,c({orientation:"horizontal",role:"toolbar",ref:i},l),t)};const{clearTimeout:Sf,setTimeout:wf}=window,Bf=()=>{},If=200;function xf(e){let{ref:t,isFocused:n,debounceTimeout:o=If,onChange:r=Bf}=e;const[l,i]=(0,u.useState)(!1),a=(0,u.useRef)(),s=e=>{null!=t&&t.current&&i(e),r(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},d=()=>{const e=a.current;e&&Sf&&Sf(e)};return(0,u.useEffect)((()=>()=>{s(!1),d()}),[]),{showMovers:l,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),l||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),a.current=wf((()=>{c()&&s(!1)}),o)}}}function Tf(e){let{ref:t,debounceTimeout:n=If,onChange:o=Bf}=e;const[r,l]=(0,u.useState)(!1),{showMovers:i,debouncedShowMovers:a,debouncedHideMovers:s}=xf({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),c=(0,u.useRef)(!1),d=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const e=t.current,n=()=>{d()&&(l(!0),a())},o=()=>{d()||(l(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,c,l,a,s]),{showMovers:i,gestures:{onMouseMove:a,onMouseLeave:s}}}function Mf(){const{selectBlock:e,toggleBlockHighlight:t}=(0,g.useDispatch)(To),{firstParentClientId:n,shouldHide:o,isDistractionFree:r}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(To),{hasBlockSupport:l}=e(a.store),i=n(o()),s=i[i.length-1],c=t(s),u=(0,a.getBlockType)(c),d=r();return{firstParentClientId:s,shouldHide:!l(u,"__experimentalParentSelector",!0),isDistractionFree:d.isDistractionFree}}),[]),l=lf(n),i=(0,u.useRef)(),{gestures:s}=Tf({ref:i,onChange(e){e&&r||t(n,e)}});return o||void 0===n?null:(0,u.createElement)("div",c({className:"block-editor-block-parent-selector",key:n,ref:i},s),(0,u.createElement)(h.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,_.sprintf)((0,_.__)("Select %s"),null==l?void 0:l.title),showTooltip:!0,icon:(0,u.createElement)(fd,{icon:null==l?void 0:l.icon})}))}var Nf=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.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 Pf(e){let{blocks:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(h.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Jp,{viewportWidth:500,blocks:t})))))}function Lf(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:o}=e;return t.map((e=>(0,u.createElement)(Rf,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:o})))}function Rf(e){let{item:t,onSelect:n,setHoveredTransformItemName:o}=e;const{name:r,icon:l,title:i,isDisabled:s}=t;return(0,u.createElement)(h.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(r),onClick:e=>{e.preventDefault(),n(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r)},(0,u.createElement)(fd,{icon:l,showColors:!0}),i)}var Af=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:r}=e;const[l,i]=(0,u.useState)(),{priorityTextTransformations:s,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,u.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:o}=e,{name:r}=n;return t[o](0,u.createElement)(Rf,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:i}))),!d&&p),!!d&&(0,u.createElement)(h.MenuGroup,{className:t},p))};var Of=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Df=window.wp.tokenList,zf=n.n(Df);function Ff(e,t,n){const o=new(zf())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function Vf(e){return null==e?void 0:e.find((e=>e.isDefault))}function Hf(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:r,blockType:l,className:i}=(0,g.useSelect)((e=>{const{getBlock:n}=e(To),o=n(t);if(!o)return{};const r=(0,a.getBlockType)(o.name),{getBlockStyles:l}=e(a.store);return{block:o,blockType:r,styles:l(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:s}=(0,g.useDispatch)(To),c=function(e){return e&&0!==e.length?Vf(e)?e:[{name:"default",label:(0,_._x)("Default","block style"),isDefault:!0},...e]:[]}(o),d=function(e,t){for(const n of new(zf())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(o)return o}return Vf(e)}(c,i),p=function(e,t){return(0,u.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,a.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(r,l);return{onSelect:e=>{const o=Ff(i,d,e);s(t,{className:o}),n()},stylesToRender:c,activeStyle:d,genericPreviewBlock:p,className:i}}const Gf=()=>{};function Uf(e){let{clientId:t,onSwitch:n=Gf}=e;const{onSelect:o,stylesToRender:r,activeStyle:l}=Hf({clientId:t,onSwitch:n});return r&&0!==r.length?(0,u.createElement)(u.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,u.createElement)(h.MenuItem,{key:e.name,icon:l.name===e.name?Of:null,onClick:()=>o(e)},(0,u.createElement)(h.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function $f(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,u.createElement)(h.MenuGroup,{label:(0,_.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,u.createElement)(Uf,{clientId:o,onSwitch:n}))}const jf=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=jf(e,t,n);if(o)return o}}},Wf=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Kf=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=jf(r,t.name,o);if(n){e=!0,o.add(n.clientId),Wf(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function qf(e){let{patterns:t,onSelect:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(h.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Yf,{patterns:t,onSelect:n})))))}function Yf(e){let{patterns:t,onSelect:n}=e;const o=(0,h.__unstableUseCompositeState)();return(0,u.createElement)(h.__unstableComposite,c({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,_.__)("Patterns list")}),t.map((e=>(0,u.createElement)(Zf,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function Zf(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",l=(0,m.useInstanceId)(Zf,`${r}-list__item-description`);return(0,u.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?l:void 0},(0,u.createElement)(h.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,u.createElement)(Jp,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,u.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,u.createElement)(h.VisuallyHidden,{id:l},t.description))}var Qf=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[r,l]=(0,u.useState)(!1),i=Kf(n,t);return i.length?(0,u.createElement)(h.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},r&&(0,u.createElement)(qf,{patterns:i,onSelect:o}),(0,u.createElement)(h.MenuItem,{onClick:e=>{e.preventDefault(),l(!r)},icon:pd},(0,_.__)("Patterns"))):null};const Xf=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o,multiSelect:r}=(0,g.useDispatch)(To),l=lf(n[0].clientId),{possibleBlockTransformations:i,canRemove:s,hasBlockStyles:c,icon:d,patterns:p}=(0,g.useSelect)((e=>{const{getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i}=e(To),{getBlockStyles:s,getBlockType:c}=e(a.store),{canRemoveBlocks:u}=e(To),d=o(Array.isArray(t)?t[0]:t),[{name:p}]=n,m=1===n.length,g=m&&s(p);let f;if(m)f=null==l?void 0:l.icon;else{var h;f=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(h=c(p))||void 0===h?void 0:h.icon:Nf}return{possibleBlockTransformations:r(n,d),canRemove:u(t,d),hasBlockStyles:!(null==g||!g.length),icon:f,patterns:i(n,d)}}),[t,n,null==l?void 0:l.icon]),m=af({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),f=1===n.length&&(0,a.isReusableBlock)(n[0]),v=1===n.length&&(0,a.isTemplatePart)(n[0]);function b(e){e.length>1&&r(e[0].clientId,e[e.length-1].clientId)}const k=!!i.length&&s&&!v,y=!(null==p||!p.length)&&s;if(!c&&!k)return(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:m,icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(fd,{icon:d,showColors:!0}),(f||v)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},m))}));const E=m,C=1===n.length?(0,_.sprintf)((0,_.__)("%s: Change block type or style"),m):(0,_.sprintf)((0,_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),S=c||k||y;return(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(h.DropdownMenu,{className:"block-editor-block-switcher",label:E,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(fd,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||v)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},m)),toggleProps:{describedBy:C,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:r}=e;return S&&(0,u.createElement)("div",{className:"block-editor-block-switcher__container"},y&&(0,u.createElement)(Qf,{blocks:n,patterns:p,onSelect:e=>{!function(e){o(t,e),b(e)}(e),r()}}),k&&(0,u.createElement)(Af,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{!function(e){const r=(0,a.switchToBlockType)(n,e);o(t,r),b(r)}(e),r()}}),c&&(0,u.createElement)($f,{hoveredBlock:n[0],onSwitch:r}))})))))};var Jf=e=>{let{clientIds:t}=e;const n=(0,g.useSelect)((e=>e(To).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,u.createElement)(Xf,{clientIds:t,blocks:n})};const{Fill:eh,Slot:th}=(0,h.createSlotFill)("__unstableBlockToolbarLastItem");eh.Slot=th;var nh=eh;function oh(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}function rh(){const{getBlockName:e}=(0,g.useSelect)(To),{getBlockType:t}=(0,g.useSelect)(a.store),{createSuccessNotice:n}=(0,g.useDispatch)(hm.store);return(0,u.useCallback)(((o,r)=>{let l="";if(1===r.length){var i;const n=r[0],a=null===(i=t(e(n)))||void 0===i?void 0:i.title;l="copy"===o?(0,_.sprintf)((0,_.__)('Copied "%s" to clipboard.'),a):(0,_.sprintf)((0,_.__)('Moved "%s" to clipboard.'),a)}else l="copy"===o?(0,_.sprintf)((0,_._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,_.sprintf)((0,_._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function lh(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o,__unstableIsFullySelected:r,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:i,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:c}=(0,g.useSelect)(To),{flashBlock:u,removeBlocks:d,replaceBlocks:p,__unstableDeleteSelection:f,__unstableExpandSelection:h,insertBlocks:v}=(0,g.useDispatch)(To),b=rh();return(0,m.useRefEffect)((m=>{function g(g){const k=t();if(0===k.length)return;if(!n()){const{target:e}=g,{ownerDocument:t}=e;if("copy"===g.type||"cut"===g.type?(0,Ri.documentHasUncollapsedSelection)(t):(0,Ri.documentHasSelection)(t))return}if(!m.contains(g.target.ownerDocument.activeElement))return;const _=g.defaultPrevented;g.preventDefault();const y=i(),E=l()||r(),C=!E&&!y;if("copy"===g.type||"cut"===g.type)if(1===k.length&&u(k[0]),C)h();else{let t;if(b(g.type,k),E)t=e(k);else{const[n,o]=s();t=[n,...e(k.slice(1,k.length-1)),o]}const n=g.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,a.createBlock)(n,JSON.parse(g.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const o=(0,a.serialize)(t);g.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Ri.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(o)),g.clipboardData.setData("text/html",o)}if("cut"===g.type)E&&!C?d(k):f();else if("paste"===g.type){if(_)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n,files:r}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,Ri.getFilesFromDataTransfer)(t);return r.length&&!oh(r,o)?{files:r}:{html:o,plainText:n,files:[]}}(g);let l=[];if(r.length){const e=(0,a.getBlockTransforms)("from");l=r.reduce(((t,n)=>{const o=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else l=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===k.length){const[e]=k;if(l.every((t=>c(t.name,e))))return void v(l,void 0,e)}p(k,l,l.length-1,-1)}}return m.ownerDocument.addEventListener("copy",g),m.ownerDocument.addEventListener("cut",g),m.ownerDocument.addEventListener("paste",g),()=>{m.ownerDocument.removeEventListener("copy",g),m.ownerDocument.removeEventListener("cut",g),m.ownerDocument.removeEventListener("paste",g)}}),[])}var ih=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:lh()},t)};const ah="align",sh="__experimentalBorder",ch="color",uh="customClassName",dh="typography.__experimentalFontFamily",ph="typography.fontSize",mh="__experimentalLayout",gh=[...["typography.lineHeight",ph,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",dh,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],sh,ch,"spacing"];const fh={align:e=>(0,a.hasBlockSupport)(e,ah),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,sh);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}(e,"color"),backgroundColor:e=>{const t=(0,a.getBlockSupport)(e,ch);return t&&!1!==t.background},textColor:e=>{const t=(0,a.getBlockSupport)(e,ch);return t&&!1!==t.text},gradient:e=>{const t=(0,a.getBlockSupport)(e,ch);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,a.hasBlockSupport)(e,uh,!0),fontFamily:e=>(0,a.hasBlockSupport)(e,dh),fontSize:e=>(0,a.hasBlockSupport)(e,ph),layout:e=>(0,a.hasBlockSupport)(e,mh),style:e=>gh.some((t=>(0,a.hasBlockSupport)(e,t)))};function hh(e,t){return Object.entries(fh).reduce(((n,o)=>{let[r,l]=o;return l(e.name)&&l(t.name)&&(n[r]=e.attributes[r]),n}),{})}function vh(e,t,n){for(let o=0;o{let i="";try{if(!window.navigator.clipboard)return void r((0,_.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});i=await window.navigator.clipboard.readText()}catch(e){return void r((0,_.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!i||!function(e){try{const t=(0,a.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(i))return void o((0,_.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,a.parse)(i);if(1===s.length?e.batch((()=>{vh(l,l.map((()=>s[0])),t)})):e.batch((()=>{vh(l,s,t)})),1===l.length){var c;const e=null===(c=(0,a.getBlockType)(l[0].name))||void 0===c?void 0:c.title;n((0,_.sprintf)((0,_.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,_.sprintf)((0,_.__)("Pasted styles to %d blocks."),l.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function kh(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:r,getBlockRootClientId:l,getBlocksByClientId:i,canMoveBlocks:s,canRemoveBlocks:c}=(0,g.useSelect)(To),{getDefaultBlockName:u,getGroupingBlockName:d}=(0,g.useSelect)(a.store),p=i(t),m=l(t[0]),f=p.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&r(e.name,m))),h=r(u(),m),v=s(t,m),b=c(t,m),{removeBlocks:k,replaceBlocks:_,duplicateBlocks:y,insertAfterBlock:E,insertBeforeBlock:C,flashBlock:S,setBlockMovingClientId:w,setNavigationMode:B,selectBlock:I}=(0,g.useDispatch)(To),x=rh(),T=bh();return n({canDuplicate:f,canInsertDefaultBlock:h,canMove:v,canRemove:b,rootClientId:m,blocks:p,onDuplicate(){return y(t,o)},onRemove(){return k(t,o)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;C(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){B(!0),I(t[0]),w(t[0])},onGroup(){if(!p.length)return;const e=d(),n=(0,a.switchToBlockType)(p,e);n&&_(t,n)},onUngroup(){if(!p.length)return;const e=p[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=p.map((e=>{let{clientId:t}=e;return t}));1===p.length&&S(e[0]),x("copy",e)},async onPasteStyles(){await T(p)}})}const _h=()=>{};var yh=(0,m.compose)([(0,g.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:r,getSettings:l}=e(To),i=o(n),s=l().codeEditingEnabled;return{mode:r(n),blockType:i?(0,a.getBlockType)(i.name):null,isCodeEditingEnabled:s}})),(0,g.withDispatch)(((e,t)=>{let{onToggle:n=_h,clientId:o}=t;return{onToggleMode(){e(To).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:r=!1,isCodeEditingEnabled:l=!0}=e;if(!t||!(0,a.hasBlockSupport)(t,"html",!0)||!l)return null;const i="visual"===n?(0,_.__)("Edit as HTML"):(0,_.__)("Edit visually");return(0,u.createElement)(h.MenuItem,{onClick:o},!r&&i)}));var Eh=(0,m.compose)((0,g.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(To).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,g.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(To).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,_.__)("Convert to Blocks");return(0,u.createElement)(h.MenuItem,{onClick:n},!o&&r)}));const{Fill:Ch,Slot:Sh}=(0,h.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Ch.Slot=Sh;var wh=Ch;function Bh(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}=(0,g.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:r,getSelectedBlockClientIds:l}=e(To),{getGroupingBlockName:i}=e(a.store),s=l(),c=i(),u=r(c,null!=s&&s.length?n(s[0]):void 0),d=o(s),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&d.length,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}}function Ih(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:r,groupingBlockName:l,onClose:i=(()=>{})}=e;const{replaceBlocks:s}=(0,g.useDispatch)(To);return n||o?(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(h.MenuItem,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(r,l);e&&s(t,e)})(),i()}},(0,_._x)("Group","verb")),o&&(0,u.createElement)(h.MenuItem,{onClick:()=>{(()=>{const e=r[0].innerBlocks;e.length&&s(t,e)})(),i()}},(0,_._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function xh(e){return(0,g.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:l,getBlockName:i,getBlockRootClientId:a,getTemplateLock:s}=t(To),c=a(e),u=n(e),d=o(e,c),p=r(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:l(i(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!d||!p}}),[e])}var Th=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Mh=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));var Nh=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const Ph=["core/block","core/navigation"];function Lh(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Rh(e){let{clientId:t,onClose:n}=e;const[o,r]=(0,u.useState)({move:!1,remove:!1}),{canEdit:l,canMove:i,canRemove:s}=xh(t),{allowsEditLocking:c,templateLock:d,hasTemplateLock:p}=(0,g.useSelect)((e=>{var n,o;const{getBlockName:r,getBlockAttributes:l}=e(To),i=r(t),s=(0,a.getBlockType)(i);return{allowsEditLocking:Ph.includes(i),templateLock:null===(n=l(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(o=s.attributes)||void 0===o||!o.templateLock)}}),[t]),[f,v]=(0,u.useState)(!!d),{updateBlockAttributes:b}=(0,g.useDispatch)(To),k=lf(t),y=(0,m.useInstanceId)(Rh,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{r({move:!i,remove:!s,...c?{edit:!l}:{}})}),[l,i,s,c]);const E=Object.values(o).every(Boolean),C=Object.values(o).some(Boolean)&&!E;return(0,u.createElement)(h.Modal,{title:(0,_.sprintf)((0,_.__)("Lock %s"),k.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,u.createElement)("p",null,(0,_.__)("Choose specific attributes to restrict or lock all available options.")),(0,u.createElement)("form",{onSubmit:e=>{e.preventDefault(),b([t],{lock:o,templateLock:f?Lh(o):void 0}),n()}},(0,u.createElement)("div",{role:"group","aria-labelledby":y,className:"block-editor-block-lock-modal__options"},(0,u.createElement)(h.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,u.createElement)("span",{id:y},(0,_.__)("Lock all")),checked:E,indeterminate:C,onChange:e=>r({move:e,remove:e,...c?{edit:e}:{}})}),(0,u.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},c&&(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(h.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Restrict editing"),checked:!!o.edit,onChange:e=>r((t=>({...t,edit:e})))}),(0,u.createElement)(h.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Nh:Th})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(h.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Disable movement"),checked:o.move,onChange:e=>r((t=>({...t,move:e})))}),(0,u.createElement)(h.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Nh:Th})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(h.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Prevent removal"),checked:o.remove,onChange:e=>r((t=>({...t,remove:e})))}),(0,u.createElement)(h.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Nh:Th}))),p&&(0,u.createElement)(h.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_.__)("Apply to all blocks inside"),checked:f,disabled:o.move&&!o.remove,onChange:()=>v(!f)})),(0,u.createElement)(h.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(h.Button,{variant:"tertiary",onClick:n},(0,_.__)("Cancel"))),(0,u.createElement)(h.FlexItem,null,(0,u.createElement)(h.Button,{variant:"primary",type:"submit"},(0,_.__)("Apply"))))))}function Ah(e){let{clientId:t}=e;const{canLock:n,isLocked:o}=xh(t),[r,l]=(0,u.useReducer)((e=>!e),!1);if(!n)return null;const i=o?(0,_.__)("Unlock"):(0,_.__)("Lock");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuItem,{icon:o?Th:Mh,onClick:l},i),r&&(0,u.createElement)(Rh,{clientId:t,onClose:l}))}const{Fill:Oh,Slot:Dh}=(0,h.createSlotFill)("BlockSettingsMenuControls");function zh(e){let{...t}=e;return(0,u.createElement)(h.__experimentalStyleProvider,{document:document},(0,u.createElement)(Oh,t))}zh.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:o}=e;const{selectedBlocks:r,selectedClientIds:l,canRemove:i}=(0,g.useSelect)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:o,canRemoveBlocks:r}=e(To),l=null!==n?n:o();return{selectedBlocks:t(l),selectedClientIds:l,canRemove:r(l)}}),[n]),{canLock:a}=xh(l[0]),s=1===l.length&&a,d=Bh(),{isGroupable:p,isUngroupable:m}=d,f=(p||m)&&i;return(0,u.createElement)(Dh,{fillProps:{...t,__unstableDisplayLocation:o,selectedBlocks:r,selectedClientIds:l}},(e=>!(null!=e&&e.length)>0&&!f&&!s?null:(0,u.createElement)(h.MenuGroup,null,s&&(0,u.createElement)(Ah,{clientId:l[0]}),e,f&&(0,u.createElement)(Ih,c({},d,{onClose:null==t?void 0:t.onClose})))))};var Fh=zh;const Vh=()=>{},Hh={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function Gh(e){let{blocks:t,onCopy:n,label:o}=e;const r=(0,m.useCopyToClipboard)((()=>(0,a.serialize)(t)),n),l=t.length>1?(0,_.__)("Copy blocks"):(0,_.__)("Copy block"),i=o||l;return(0,u.createElement)(h.MenuItem,{ref:r},i)}var Uh=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,__unstableDisplayLocation:r,...l}=e;const i=Array.isArray(t)?t:[t],s=i.length,d=i[0],{firstParentClientId:p,isDistractionFree:f,onlyBlock:v,parentBlockType:b,previousBlockClientId:k,nextBlockClientId:y,selectedBlockClientIds:E}=(0,g.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getNextBlockClientId:l,getSelectedBlockClientIds:i,getSettings:s,getBlockAttributes:c}=e(To),{getActiveBlockVariation:u}=e(a.store),p=o(d),m=p&&n(p);return{firstParentClientId:p,isDistractionFree:s().isDistractionFree,onlyBlock:1===t(p),parentBlockType:p&&(u(m,c(p))||(0,a.getBlockType)(m)),previousBlockClientId:r(d),nextBlockClientId:l(d),selectedBlockClientIds:i()}}),[d]),C=(0,g.useSelect)((e=>{const{getShortcutRepresentation:t}=e(xd.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:S,toggleBlockHighlight:w}=(0,g.useDispatch)(To),B=(0,u.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Vh,[n]),I=af({clientId:d,maximumLength:25}),x=(0,u.useCallback)(n?()=>{const e=k||y||p;e&&E.includes(d)&&!E.includes(e)&&n(e)}:Vh,[n,k,y,p,E]),T=(0,_.sprintf)((0,_.__)("Remove %s"),I),M=1===s?T:(0,_.__)("Remove blocks"),N=(0,u.useRef)(),{gestures:P}=Tf({ref:N,onChange(e){e&&f||w(p,e)}}),L=null==E?void 0:E.includes(p);return(0,u.createElement)(kh,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:i,canMove:a,canRemove:g,onDuplicate:f,onInsertAfter:k,onInsertBefore:y,onRemove:E,onCopy:w,onPasteStyles:I,onMoveTo:T,blocks:R}=e;return(0,u.createElement)(h.DropdownMenu,c({icon:cg,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Hh,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(wh.Slot,{fillProps:{onClose:l}}),!L&&!!p&&(0,u.createElement)(h.MenuItem,c({},P,{ref:N,icon:(0,u.createElement)(fd,{icon:b.icon}),onClick:()=>S(p)}),(0,_.sprintf)((0,_.__)("Select parent block (%s)"),b.title)),1===s&&(0,u.createElement)(Eh,{clientId:d}),(0,u.createElement)(Gh,{blocks:R,onCopy:w}),n&&(0,u.createElement)(h.MenuItem,{onClick:(0,m.pipe)(l,f,B),shortcut:C.duplicate},(0,_.__)("Duplicate")),i&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.MenuItem,{onClick:(0,m.pipe)(l,y),shortcut:C.insertBefore},(0,_.__)("Insert before")),(0,u.createElement)(h.MenuItem,{onClick:(0,m.pipe)(l,k),shortcut:C.insertAfter},(0,_.__)("Insert after"))),a&&!v&&(0,u.createElement)(h.MenuItem,{onClick:(0,m.pipe)(l,T)},(0,_.__)("Move to")),1===s&&(0,u.createElement)(yh,{clientId:d,onToggle:l})),(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(Gh,{blocks:R,onCopy:w,label:(0,_.__)("Copy styles")}),(0,u.createElement)(h.MenuItem,{onClick:I},(0,_.__)("Paste styles"))),(0,u.createElement)(Fh.Slot,{fillProps:{onClose:l},clientIds:t,__unstableDisplayLocation:r}),"function"==typeof o?o({onClose:l}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:l}))),g&&(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(h.MenuItem,{onClick:(0,m.pipe)(l,E,x),shortcut:C.remove},M)))}))}))};var $h=function(e){let{clientIds:t,...n}=e;return(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(Uh,c({clientIds:t,toggleProps:e},n)))))};function jh(e){let{clientId:t}=e;const n=lf(t),{canEdit:o,canMove:r,canRemove:l,canLock:i}=xh(t),[a,s]=(0,u.useReducer)((e=>!e),!1);return i?o&&r&&l?null:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,u.createElement)(h.ToolbarButton,{icon:Nh,label:(0,_.sprintf)((0,_.__)("Unlock %s"),n.title),onClick:s})),a&&(0,u.createElement)(Rh,{clientId:t,onClose:s})):null}var Wh=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var Kh=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var qh=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Yh={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Zh=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Bh(),{replaceBlocks:r}=(0,g.useDispatch)(To),{canRemove:l,variations:i}=(0,g.useSelect)((e=>{const{canRemoveBlocks:o}=e(To),{getBlockVariations:r}=e(a.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),s=o=>{const l=(0,a.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),l&&l.length>0&&(l[0].attributes.layout=Yh[o],r(t,l))};if(!o||!l)return null;const c=!!i.find((e=>{let{name:t}=e;return"group-row"===t})),d=!!i.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarButton,{icon:Wh,label:(0,_._x)("Group","verb"),onClick:s}),c&&(0,u.createElement)(h.ToolbarButton,{icon:Kh,label:(0,_._x)("Row","single horizontal line"),onClick:()=>s("row")}),d&&(0,u.createElement)(h.ToolbarButton,{icon:qh,label:(0,_._x)("Stack","verb"),onClick:()=>s("stack")}))};function Qh(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,o=(0,g.useSelect)((e=>!!n&&"html"===e(To).getBlockMode(n)),[n]),{toggleBlockMode:r}=(0,g.useDispatch)(To);return o?(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarButton,{onClick:()=>{r(n)}},(0,_.__)("Edit visually"))):null}var Xh=(0,u.createContext)("");var Jh=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:r,hasFixedToolbar:l,isDistractionFree:i,isValid:s,isVisual:d,isContentLocked:f}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:l,getSettings:i,__unstableGetContentLockingParent:s}=e(To),c=o(),u=c[0],d=l(u),p=i();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,a.getBlockType)(t(u)),hasFixedToolbar:p.hasFixedToolbar,isDistractionFree:p.isDistractionFree,rootClientId:d,isValid:c.every((e=>r(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:v}=(0,g.useDispatch)(To),b=(0,u.useRef)(),{showMovers:k,gestures:_}=Tf({ref:b,onChange(e){e&&i||v(o,e)}}),y=(0,m.useViewportMatch)("medium","<")||l;if(r&&!(0,a.hasBlockSupport)(r,"__experimentalToolbar",!0))return null;const E=y||k;if(0===n.length)return null;const C=s&&d,S=n.length>1,w=(0,a.isReusableBlock)(r)||(0,a.isTemplatePart)(r),B=p()("block-editor-block-toolbar",{"is-showing-movers":E,"is-synced":w});return(0,u.createElement)("div",{className:B},!S&&!y&&!f&&(0,u.createElement)(Mf,null),(0,u.createElement)("div",c({ref:b},_),(C||S)&&!f&&(0,u.createElement)(h.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,u.createElement)(Jf,{clientIds:n}),!S&&(0,u.createElement)(jh,{clientId:n[0]}),(0,u.createElement)(kf,{clientIds:n,hideDragHandle:t}))),C&&S&&(0,u.createElement)(Zh,null),C&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vo.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Vo.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Vo.Slot,{className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Vo.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Vo.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Xh.Provider,{value:null==r?void 0:r.name},(0,u.createElement)(nh.Slot,null))),(0,u.createElement)(Qh,{clientIds:n}),!f&&(0,u.createElement)($h,{clientIds:n}))};var ev=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:r,hasParents:l,showParentSelector:i}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o,__unstableGetContentLockingParent:r}=e(To),{getBlockType:l}=e(a.store),i=o(),s=i[0],c=n(s),u=l(t(c[c.length-1]));return{blockType:s&&l(t(s)),hasParents:c.length,showParentSelector:u&&(0,a.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&i.length<=1&&!r(s)}}),[]);if(r&&!(0,a.hasBlockSupport)(r,"__experimentalToolbar",!0))return null;const s=p()("block-editor-block-contextual-toolbar",{"has-parent":l&&i,"is-fixed":n});return(0,u.createElement)(Cf,c({focusOnMount:t,className:s,"aria-label":(0,_.__)("Block tools")},o),(0,u.createElement)(Jh,{hideDragHandle:n}))};const{CustomSelectControl:tv}=Io(h.privateApis),nv="position",ov="block-editor-hooks__position-selection__select-control__option",rv={key:"default",value:"",name:(0,_.__)("Default"),className:ov},lv={key:"sticky",value:"sticky",name:(0,_._x)("Sticky","Name for the value of the CSS position property"),className:ov,__experimentalHint:(0,_.__)("The block will stick to the top of the window instead of scrolling.")},iv={key:"fixed",value:"fixed",name:(0,_._x)("Fixed","Name for the value of the CSS position property"),className:ov,__experimentalHint:(0,_.__)("The block will not move when the page is scrolled.")},av=["top","right","bottom","left"],sv=["sticky","fixed"];function cv(e){return!!(0,a.getBlockSupport)(e,nv)}function uv(e){var t,n;const o=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===o||"fixed"===o}function dv(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=fr("position.fixed"),n=fr("position.sticky"),o=!t&&!n;return!cv(e)||o}function pv(e){var t;const{attributes:{style:n={}},clientId:o,name:r,setAttributes:l}=e,i=function(e){const t=(0,a.getBlockSupport)(e,nv);return!!(!0===t||null!=t&&t.fixed)}(r),s=function(e){const t=(0,a.getBlockSupport)(e,nv);return!!(!0===t||null!=t&&t.sticky)}(r),c=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:d}=(0,g.useSelect)((e=>{const{getBlockParents:t}=e(To);return{hasParents:t(o).length}}),[o]),p=(0,u.useMemo)((()=>{const e=[rv];return(s&&!d||c===lv.value)&&e.push(lv),(i||c===iv.value)&&e.push(iv),e}),[i,s,d,c]),m=c&&p.find((e=>e.value===c))||rv;return u.Platform.select({web:p.length>1?(0,u.createElement)(jr,{group:"position"},(0,u.createElement)(h.BaseControl,{className:"block-editor-hooks__position-selection"},(0,u.createElement)(tv,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,_.__)("Position"),hideLabelFromVision:!0,describedBy:(0,_.sprintf)((0,_.__)("Currently selected position: %s"),m.name),options:p,value:m,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};l({style:Ar(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const mv=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,nv)&&!dv(t)&&(0,u.createElement)(pv,c({key:"position"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),gv=(0,m.createHigherOrderComponent)((e=>t=>{var n,o,r,l;const{name:i,attributes:s}=t,d=(0,a.hasBlockSupport)(i,nv)&&!dv(t),g=(0,m.useInstanceId)(e),f=(0,u.useContext)(Kv.__unstableElementContext);let h;d&&(h=function(e){let{selector:t,style:n}=e,o="";const{type:r}=(null==n?void 0:n.position)||{};return sv.includes(r)?(o+=`${t} {`,o+=`position: ${r};`,av.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(o+=`${e}: ${n.position[e]};`)})),"sticky"!==r&&"fixed"!==r||(o+="z-index: 10"),o+="}",o):o}({selector:`.wp-container-${g}.wp-container-${g}`,style:null==s?void 0:s.style})||"");const v=p()(null==t?void 0:t.className,{[`wp-container-${g}`]:d&&!!h,[`is-position-${null==s||null===(n=s.style)||void 0===n||null===(o=n.position)||void 0===o?void 0:o.type}`]:d&&!!h&&!(null==s||null===(r=s.style)||void 0===r||null===(l=r.position)||void 0===l||!l.type)});return(0,u.createElement)(u.Fragment,null,d&&f&&!!h&&(0,u.createPortal)((0,u.createElement)("style",null,h),f),(0,u.createElement)(e,c({},t,{className:v})))}));(0,s.addFilter)("editor.BlockListBlock","core/editor/position/with-position-styles",gv),(0,s.addFilter)("editor.BlockEdit","core/editor/position/with-inspector-controls",mv);const fv={placement:"top-start"},hv={...fv,flip:!1,shift:!0},vv={...fv,flip:!0,shift:!1};function bv(e,t,n,o,r){if(!e||!t)return hv;const l=(null==n?void 0:n.scrollTop)||0,i=t.getBoundingClientRect(),a=l+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+o,u=i.top>c,d=i.height>s-o;return r||!u&&!d?vv:hv}function kv(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isBlockInterfaceHidden:l,getSettings:i,getLastMultiSelectedBlockClientId:a}=Io(e(To));return{editorMode:t(),hasMultiSelection:o(),isMultiSelecting:n(),isTyping:r(),isBlockInterfaceHidden:l(),hasFixedToolbar:i().hasFixedToolbar,isDistractionFree:i().isDistractionFree,lastClientId:o()?a():null}}function _v(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:o,showContents:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:d,isMultiSelecting:f,isTyping:h,isBlockInterfaceHidden:v,hasFixedToolbar:b,isDistractionFree:k,lastClientId:_}=(0,g.useSelect)(kv,[]),y=(0,g.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(To);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),E=(0,m.useViewportMatch)("medium"),C=(0,u.useRef)(!1),{stopTyping:S}=(0,g.useDispatch)(To),w=!h&&"edit"===s&&o,B=!d&&("navigation"===s||"zoom-out"===s),I="edit"===s&&!b&&E&&!f&&!w&&!h&&!v,x=!("edit"!==s||I||b||k||o);(0,xd.useShortcut)("core/block-editor/focus-toolbar",(()=>{C.current=!0,S(!0)}),{isDisabled:!x}),(0,u.useEffect)((()=>{C.current=!1}));const T=(0,u.useRef)(),M=function(e){let{contentElement:t,clientId:n}=e;const o=tr(n),[r,l]=(0,u.useState)(0),{blockIndex:i,isSticky:a}=(0,g.useSelect)((e=>{const{getBlockIndex:t,getBlockAttributes:o}=e(To);return{blockIndex:t(n),isSticky:uv(o(n))}}),[n]),s=(0,u.useMemo)((()=>{if(t)return(0,Ri.getScrollContainer)(t)}),[t]),[c,d]=(0,u.useState)((()=>bv(t,o,s,r,a))),p=(0,m.useRefEffect)((e=>{l(e.offsetHeight)}),[]),f=(0,u.useCallback)((()=>d(bv(t,o,s,r,a))),[t,o,s,r]);return(0,u.useLayoutEffect)(f,[i,f]),(0,u.useLayoutEffect)((()=>{var e,n,r;if(!t||!o)return;const l=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let i;null==l||null===(n=l.addEventHandler)||void 0===n||n.call(l,"resize",f);const a=null==o||null===(r=o.ownerDocument)||void 0===r?void 0:r.defaultView;return a.ResizeObserver&&(i=new a.ResizeObserver(f),i.observe(o)),()=>{var e;null==l||null===(e=l.removeEventHandler)||void 0===e||e.call(l,"resize",f),i&&i.disconnect()}}),[f,t,o]),{...c,ref:p}}({contentElement:null==a?void 0:a.current,clientId:t});return w?(0,u.createElement)(Zr,c({clientId:l||t,__unstableCoverTarget:!0,bottomClientId:_,className:p()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":y}),__unstablePopoverSlot:i,__unstableContentRef:a,resize:!1,shift:!1},M),(0,u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,u.createElement)(Gg,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):B||I?(0,u.createElement)(Zr,c({clientId:l||t,bottomClientId:_,className:p()("block-editor-block-list__block-popover",{"is-insertion-point-visible":y}),__unstablePopoverSlot:i,__unstableContentRef:a,resize:!1},M),I&&r&&(0,u.createElement)(ev,{focusOnMount:C.current,__experimentalInitialIndex:T.current,__experimentalOnIndexChange:e=>{T.current=e},key:t}),B&&(0,u.createElement)(_f,{clientId:t,rootClientId:n})):null}function yv(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:r,getBlockParents:l,getSettings:i,isNavigationMode:s,__experimentalGetBlockListSettingsForBlocks:c}=e(To),u=t()||n();if(!u)return;const{name:d,attributes:p={}}=r(u)||{},m=l(u),g=c(m),f=m.find((e=>{var t;return null===(t=g[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),h=i();return{clientId:u,rootClientId:o(u),name:d,isDistractionFree:h.isDistractionFree,isNavigationMode:s(),isEmptyDefaultBlock:d&&(0,a.isUnmodifiedDefaultBlock)({name:d,attributes:p}),capturingClientId:f}}function Ev(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,g.useSelect)(yv,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:d}=o;return i?(0,u.createElement)(_v,{clientId:r,rootClientId:l,isEmptyDefaultBlock:a,showContents:!c||d,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Cv(e){let{children:t}=e;const n=(0,u.useContext)(Jg),o=(0,u.useContext)(h.Disabled.Context);return n||o?t:(W()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,u.createElement)(tf,{__unstablePopoverSlot:"block-toolbar"},(0,u.createElement)(Ev,{__unstablePopoverSlot:"block-toolbar"}),t))}var Sv=(0,m.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Ro();return(0,u.createElement)(e,c({},t,{clientId:n}))}),"withClientId");var wv=Sv((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,u.createElement)(Wg,{className:p()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})}));var Bv=(0,m.compose)([Sv,(0,g.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(To),r=o(n);return{lastBlockClientId:r[r.length-1]}}))])((e=>{let{clientId:t}=e;return(0,u.createElement)(Ug,{rootClientId:t})}));const Iv=new WeakMap;function xv(e,t,n,o,r,l,i){return s=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===d){i();const e=p.map((e=>(0,a.cloneBlock)(e)));l(e,!0,null)}if("block"===d){const l=n(u[0]);if(c===e&&l===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,a=u.length;r(u,c,i&&l{if(!n)return;const i=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(n=>"files"===n.type&&r(n.blockName,e)&&n.isMatch(t)));if(i){const e=i.transform(t,o);l(e)}}}function Mv(e,t,n){return e=>{const t=(0,a.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function Nv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:o="insert"}=n,r=(0,g.useSelect)((e=>e(To).getSettings().mediaUpload),[]),{canInsertBlockType:l,getBlockIndex:i,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,g.useSelect)(To),{insertBlocks:d,moveBlocksToPosition:p,updateBlockAttributes:m,clearSelectedBlock:f,replaceBlocks:h,removeBlocks:v}=(0,g.useDispatch)(To),b=(0,g.useRegistry)(),k=(0,u.useCallback)((function(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===o){const o=s(e)[t];h(o,n,void 0,l)}else d(n,t,e,r,l)}),[o,s,d,h,t,e]),_=(0,u.useCallback)(((n,r,l)=>{if("replace"===o){const o=c(n),r=s(e)[t];b.batch((()=>{v(n,!1),h(r,o,void 0,0)}))}else p(n,r,e,l)}),[o,s,c,d,p,v,t,e]),y=xv(e,t,i,a,_,k,f),E=Tv(e,0,r,m,l,k),C=Mv(0,0,k);return e=>{const t=(0,Ri.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?C(n):t.length?E(t):y(e)}}function Pv(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,a=o?l:r,s=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=s&&i<=c?i:i2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=Pv(e,t,r);(void 0===n||l=e.x&&t.top<=e.y&&t.bottom>=e.y}function Av(e,t){var n,o;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const l="horizontal"===r?["left","right"]:["top","bottom"],i=(0,_.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:o,blockIndex:r}=e;const u=o();let[d,p]=Lv(t,u,l);n&&Rv(t,u)&&(d=0),d0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,u.useState)({index:null,operation:"insert"}),o=(0,g.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:o,__unstableHasActiveBlockOverlayActive:r}=t(To),l=n(e);return["all","contentOnly"].some((e=>e===l))||r(e)||o(e)}),[e]),{getBlockListSettings:r,getBlocks:l,getBlockIndex:i}=(0,g.useSelect)(To),{showInsertionPoint:s,hideInsertionPoint:c}=(0,g.useDispatch)(To),d=Nv(e,t.index,{operation:t.operation}),p=(0,m.useThrottle)((0,u.useCallback)(((t,o)=>{var c;const u=l(e);if(0===u.length)return void n({index:0,operation:"insert"});const d=u.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,a.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>o.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:i(t)}})),[p,m]=Av(d,{x:t.clientX,y:t.clientY},null===(c=r(e))||void 0===c?void 0:c.orientation);n({index:p,operation:m}),s(e,p,{operation:m})}),[e]),200);return(0,m.__experimentalUseDropZone)({isDisabled:o,onDrop:d,onDragOver(e){p(e,e.currentTarget.ownerDocument)},onDragLeave(){p.cancel(),c()},onDragEnd(){p.cancel(),c()}})}const Dv={};function zv(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:r,template:l,templateLock:i,wrapperRef:s,templateInsertUpdatesSelection:c,__experimentalCaptureToolbars:d,__experimentalAppenderTagName:p,renderAppender:m,orientation:f,placeholder:h,layout:v}=e;!function(e,t,n,o,r,l,i,a){const{updateBlockListSettings:s}=(0,g.useDispatch)(To),c=(0,g.useRegistry)(),{blockListSettings:d,parentLock:p}=(0,g.useSelect)((t=>{const n=t(To).getBlockRootClientId(e);return{blockListSettings:t(To).getBlockListSettings(e),parentLock:t(To).getTemplateLock(n)}}),[e]),m=(0,u.useMemo)((()=>t),t);(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:m,templateLock:void 0===r||"contentOnly"===p?p:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=li(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Kr()(d,t)||(Iv.get(c)||Iv.set(c,[]),Iv.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Iv.get(c))&&void 0!==e&&e.length&&c.batch((()=>{Iv.get(c).forEach((e=>{s(...e)})),Iv.set(c,[])}))})))}),[e,d,m,n,o,r,p,l,i,s,a,c])}(t,n,o,r,i,d,f,v),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:l,isBlockSelected:i}=(0,g.useSelect)(To),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,g.useDispatch)(To),{innerBlocks:d}=(0,g.useSelect)((t=>({innerBlocks:t(To).getBlocks(e)})),[e]),p=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const d=r(e),m=0===d.length||"all"===n||"contentOnly"===n,g=!k()(t,p.current);if(!m||!g)return;p.current=t;const f=(0,a.synchronizeBlocksWithTemplate)(d,t);k()(f,d)||(c(),s(e,f,0===d.length&&o&&0!==f.length&&i(e),l()))})),()=>{u=!0}}),[d,t,n,e])}(t,l,i,c);const b=function(e){return(0,g.useSelect)((t=>{const n=t(To).getBlock(e);if(!n)return;const o=t(a.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((e=>{let[t,o]=e;return[t,n.attributes[o]]}))):void 0}),[e])}(t),_=(0,g.useSelect)((e=>{var n;return null===(n=e(To).getBlock(t))||void 0===n?void 0:n.name}),[t]),y=(0,a.getBlockSupport)(_,"__experimentalLayout")||Dv,{allowSizingOnChildren:E=!1}=y,C=fr("layout")||Dv,S=v||y,w=(0,u.useMemo)((()=>({...C,...S,...E&&{allowSizingOnChildren:!0}})),[C,S,E]);return(0,u.createElement)(Oi,{value:b},(0,u.createElement)(Yv,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:p,__experimentalLayout:w,wrapperRef:s,placeholder:h}))}function Fv(e){return kd(e),(0,u.createElement)(zv,e)}const Vv=(0,u.forwardRef)(((e,t)=>{const n=Hv({ref:t},e);return(0,u.createElement)("div",{className:"block-editor-inner-blocks"},(0,u.createElement)("div",n))}));function Hv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o}=t,{clientId:r,layout:l=null,__unstableLayoutClassNames:i=""}=Ro(),s=(0,m.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:d,hasOverlay:f}=(0,g.useSelect)((e=>{if(!r)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:l}=e(To),i=t(r),c="navigation"===l()||s;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(i,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==i&&!n(r)&&!o(r,!0)&&c}}),[r,s]),h=Ov({rootClientId:r}),v=(0,m.useMergeRefs)([e.ref,o?null:h]),b={__experimentalCaptureToolbars:d,layout:l,...t},k=b.value&&b.onChange?Fv:zv;return{...e,ref:v,className:p()(e.className,"block-editor-block-list__layout",n?"":i,{"has-overlay":f}),children:r?(0,u.createElement)(k,c({},b,{clientId:r})):(0,u.createElement)(Yv,t)}}Hv.save=a.__unstableGetInnerBlocksProps,Vv.DefaultBlockAppender=Bv,Vv.ButtonBlockAppender=wv,Vv.Content=()=>Hv.save().children;var Gv=Vv;const Uv=(0,u.createContext)(),$v=(0,u.createContext)(),jv=new WeakMap;function Wv(e){let{className:t,...n}=e;const[o,r]=(0,u.useState)(),l=(0,m.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,editorMode:s}=(0,g.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(To),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,editorMode:n()}}),[]),c=(0,g.useRegistry)(),{setBlockVisibility:d}=(0,g.useDispatch)(To),f=(0,m.useDebounce)((0,u.useCallback)((()=>{const e={};jv.get(c).forEach((t=>{let[n,o]=t;e[n]=o})),d(e)}),[c]),300,{trailing:!0}),h=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{jv.get(c)||jv.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");jv.get(c).push([e,t.isIntersecting])}f()}))}),[]),v=Hv({ref:(0,m.useMergeRefs)([Ed(),nf(),r]),className:p()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":a&&l,"is-navigate-mode":"navigation"===s})},n);return(0,u.createElement)(Uv.Provider,{value:o},(0,u.createElement)($v.Provider,{value:h},(0,u.createElement)("div",v)))}function Kv(e){return function(){const{patterns:e,isPreviewMode:t}=(0,g.useSelect)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(To).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,u.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,o=-1;const r=()=>{o++,o>=e.length||((0,g.select)(To).__experimentalGetParsedPattern(e[o].name),n=of(r))};return n=of(r),()=>rf(n)}),[e,t])}(),(0,u.createElement)(Cv,null,(0,u.createElement)(Lo,{value:No},(0,u.createElement)(Wv,e)))}function qv(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=ii}=e;const{order:i,selectedBlocks:a,visibleBlocks:s}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o,__unstableGetVisibleBlocks:r}=e(To);return{order:t(n),selectedBlocks:o(),visibleBlocks:r()}}),[n]);return(0,u.createElement)(si,{value:l},i.map((e=>(0,u.createElement)(g.AsyncModeProvider,{key:e,value:!s.has(e)&&!a.includes(e)},(0,u.createElement)(ad,{rootClientId:n,clientId:e})))),i.length<1&&t,(0,u.createElement)(qg,{tagName:r,rootClientId:n,renderAppender:o}))}function Yv(e){return(0,u.createElement)(g.AsyncModeProvider,{value:!1},(0,u.createElement)(qv,e))}function Zv(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Qv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||Zv(Object.values(n).filter(Boolean))||"px"}function Xv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,h.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Zv(o),i=0===r||r?`${r}${l}`:void 0;return i}function Jv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Xv(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function eb(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function tb(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...l}=e,i=Xv(r);void 0===i&&(i=Qv(n));const a=eb(r)&&Jv(r),s=a?(0,_.__)("Mixed"):null;return(0,u.createElement)(h.__experimentalUnitControl,c({},l,{"aria-label":(0,_.__)("Border radius"),disableUnits:a,isOnly:!0,value:i,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{o({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}Kv.__unstableElementContext=Uv;const nb={topLeft:(0,_.__)("Top left"),topRight:(0,_.__)("Top right"),bottomLeft:(0,_.__)("Bottom left"),bottomRight:(0,_.__)("Bottom right")};function ob(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...l}=e;const i=e=>n=>{if(!t)return;const o=!isNaN(parseFloat(n))?n:void 0;t({...a,[e]:o})},a="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};return(0,u.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(nb).map((e=>{let[t,r]=e;const[s,d]=(0,h.__experimentalParseQuantityAndUnitFromRawValue)(a[t]),p=a[t]?d:n[t]||n.flat;return(0,u.createElement)(h.Tooltip,{text:r,position:"top",key:t},(0,u.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,u.createElement)(h.__experimentalUnitControl,c({},l,{"aria-label":r,value:[s,p].join(""),onChange:i(t),onUnitChange:(m=t,e=>{const t={...n};t[m]=e,o(t)}),size:"__unstable-large"}))));var m})))}function rb(e){let{isLinked:t,...n}=e;const o=t?(0,_.__)("Unlink radii"):(0,_.__)("Link radii");return(0,u.createElement)(h.Tooltip,{text:o},(0,u.createElement)("span",null,(0,u.createElement)(h.Button,c({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Er:Cr,iconSize:24,"aria-label":o}))))}const lb={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},ib={px:100,em:20,rem:20};function ab(e){let{onChange:t,values:n}=e;const[o,r]=(0,u.useState)(!eb(n)||!Jv(n)),[l,i]=(0,u.useState)({flat:"string"==typeof n?(0,h.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,h.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,h.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,h.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,h.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),a=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["px","em","rem"]}),s=Qv(l),c=a&&a.find((e=>e.value===s)),d=(null==c?void 0:c.step)||1,[p]=(0,h.__experimentalParseQuantityAndUnitFromRawValue)(Xv(n));return(0,u.createElement)("fieldset",{className:"components-border-radius-control"},(0,u.createElement)(h.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Radius")),(0,u.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(tb,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:l,setSelectedUnits:i,units:a}),(0,u.createElement)(h.RangeControl,{label:(0,_.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:0,max:ib[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:d,__nextHasNoMarginBottom:!0})):(0,u.createElement)(ob,{min:0,onChange:t,selectedUnits:l,setSelectedUnits:i,values:n||lb,units:a}),(0,u.createElement)(rb,{onClick:()=>r(!o),isLinked:o})))}function sb(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,u.createElement)(ab,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=Ar({...n,border:{...null==n?void 0:n.border,radius:e}});o({style:t})}})}fp([hp,kp]);const cb=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},ub=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function db(e,t){if(e&&t)return`has-${(0,f.kebabCase)(t)}-${e}`}function pb(){const e={disableCustomColors:!fr("color.custom"),disableCustomGradients:!fr("color.customGradient")},t=fr("color.palette.custom"),n=fr("color.palette.theme"),o=fr("color.palette.default"),r=fr("color.defaultPalette");e.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,_._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=fr("color.gradients.custom"),i=fr("color.gradients.theme"),a=fr("color.gradients.default"),s=fr("color.defaultGradients");return e.gradients=(0,u.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),s&&a&&a.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),l&&l.length&&e.push({name:(0,_._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,a]),e}const mb="__experimentalBorder",gb=["top","right","bottom","left"],fb=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},hb=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},vb=e=>{let{colors:t,namedColor:n,customColor:o}=e;if(n){const e=hb(t,"slug",n);if(e)return e}if(!o)return{color:void 0};const r=hb(t,"color",o);return r||{color:o}};function bb(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function kb(e){const{attributes:t,clientId:n,setAttributes:o}=e,{style:r}=t,{colors:l}=pb(),i=_b(e.name),s=fr("border.color")&&_b(e.name,"color"),c=fr("border.radius")&&_b(e.name,"radius"),d=fr("border.style")&&_b(e.name,"style"),p=fr("border.width")&&_b(e.name,"width");if([!s,!c,!d,!p].every(Boolean)||!i)return null;const m=(0,a.getBlockSupport)(e.name,[mb,"__experimentalDefaultControls"]),g=(null==m?void 0:m.color)||(null==m?void 0:m.width),f=((e,t)=>{const{borderColor:n,style:o}=e,{border:r}=o||{};if(n){const{color:e}=vb({colors:t,namedColor:n});return e?{...r,color:e}:r}if(!r)return r;const l={...r};return gb.forEach((e=>{var n;const o=bb(null===(n=l[e])||void 0===n?void 0:n.color);if(o){const{color:n}=vb({colors:t,namedColor:o});l[e]={...l[e],color:n}}})),l})(t,l);return(0,u.createElement)(jr,{group:"border"},(p||s)&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,h.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,_.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:o}=e;const{style:r}=n;o({borderColor:void 0,style:{...r,border:Ar({radius:null==r||null===(t=r.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:g,resetAllFilter:fb,panelId:n},(0,u.createElement)(h.__experimentalBorderBoxControl,{colors:l,enableAlpha:!0,enableStyle:d,onChange:e=>{var t;let n,i={...e};if((0,h.__experimentalHasSplitBorders)(e))i={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},gb.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var o;const n=vb({colors:l,customColor:null===(o=e[t])||void 0===o?void 0:o.color});n.slug&&(i[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,o=vb({colors:l,customColor:t});o.slug&&(n=o.slug,i.color=void 0)}const a=Ar({...r,border:{radius:null==r||null===(t=r.border)||void 0===t?void 0:t.radius,...i}});o({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",size:"__unstable-large",value:f,__experimentalIsRenderedInSidebar:!0})),c&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,_.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:yb(o,"radius")})}(e),isShownByDefault:null==m?void 0:m.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,u.createElement)(sb,e)))}function _b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,mb);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function yb(e,t){return Ar({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function Eb(e,t,n){if(!_b(t,"color")||Fr(t,mb,"color"))return e;const o=Cb(n),r=p()(e.className,o);return e.className=r||void 0,e}function Cb(e){var t;const{borderColor:n,style:o}=e,r=db("border-color",n);return p()({"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color),[r]:!!r})}const Sb=(0,m.createHigherOrderComponent)((e=>t=>{var n,o,r,l,i,a,s,d,p;const{name:m,attributes:g}=t,{borderColor:f,style:h}=g,{colors:v}=pb();if(!_b(m,"color")||Fr(m,mb,"color"))return(0,u.createElement)(e,t);const{color:b}=vb({colors:v,namedColor:f}),{color:k}=vb({colors:v,namedColor:bb(null==h||null===(n=h.border)||void 0===n||null===(o=n.top)||void 0===o?void 0:o.color)}),{color:_}=vb({colors:v,namedColor:bb(null==h||null===(r=h.border)||void 0===r||null===(l=r.right)||void 0===l?void 0:l.color)}),{color:y}=vb({colors:v,namedColor:bb(null==h||null===(i=h.border)||void 0===i||null===(a=i.bottom)||void 0===a?void 0:a.color)}),{color:E}=vb({colors:v,namedColor:bb(null==h||null===(s=h.border)||void 0===s||null===(d=s.left)||void 0===d?void 0:d.color)}),C={borderTopColor:k||b,borderRightColor:_||b,borderBottomColor:y||b,borderLeftColor:E||b};let S=t.wrapperProps;return S={...t.wrapperProps,style:{...null===(p=t.wrapperProps)||void 0===p?void 0:p.style,...C}},(0,u.createElement)(e,c({},t,{wrapperProps:S}))}));function wb(e){if(e)return`has-${e}-gradient-background`}function Bb(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Ib(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}function xb(e,t){const n=Ib(e,t);return n&&n.slug}function Tb(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Ro(),o=fr("color.gradients.custom"),r=fr("color.gradients.theme"),l=fr("color.gradients.default"),i=(0,u.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:a,customGradient:s}=(0,g.useSelect)((o=>{const{getBlockAttributes:r}=o(To),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,g.useDispatch)(To),d=(0,u.useCallback)((o=>{const r=xb(i,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,c]),p=wb(a);let m;return m=a?Bb(i,a):s,{gradientClass:p,gradientValue:m,setGradient:d}}(0,s.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return _b(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Eb),(0,s.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!_b(e,"color")||Fr(e,mb,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Eb(o,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Sb);const Mb=["colors","disableCustomColors","gradients","disableCustomGradients"],Nb={name:"color",title:"Solid",value:"color"},Pb={name:"gradient",title:"Gradient",value:"gradient"},Lb=[Nb,Pb];function Rb(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:l,className:i,label:a,onColorChange:s,onGradientChange:c,colorValue:d,gradientValue:m,clearable:g,showTitle:v=!0,enableAlpha:b}=e;const k=s&&(!(0,f.isEmpty)(t)||!o),_=c&&(!(0,f.isEmpty)(n)||!r);if(!k&&!_)return null;const y={[Nb.value]:(0,u.createElement)(h.ColorPalette,{value:d,onChange:_?e=>{s(e),c()}:s,colors:t,disableCustomColors:o,__experimentalIsRenderedInSidebar:l,clearable:g,enableAlpha:b}),[Pb.value]:(0,u.createElement)(h.GradientPicker,{__nextHasNoMargin:!0,value:m,onChange:k?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:r,__experimentalIsRenderedInSidebar:l,clearable:g})},E=e=>(0,u.createElement)("div",{className:"block-editor-color-gradient-control__panel"},y[e]);return(0,u.createElement)(h.BaseControl,{__nextHasNoMarginBottom:!0,className:p()("block-editor-color-gradient-control",i)},(0,u.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,u.createElement)(h.__experimentalVStack,{spacing:1},v&&(0,u.createElement)("legend",null,(0,u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,u.createElement)(h.BaseControl.VisualLabel,null,a))),k&&_&&(0,u.createElement)(h.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Lb,initialTabName:m?Pb.value:!!k&&Nb.value},(e=>E(e.value))),!_&&E(Nb.value),!k&&E(Pb.value))))}function Ab(e){const t={};return t.colors=fr("color.palette"),t.gradients=fr("color.gradients"),t.disableCustomColors=!fr("color.custom"),t.disableCustomGradients=!fr("color.customGradient"),(0,u.createElement)(Rb,c({},t,e))}var Ob=function(e){return Mb.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(Rb,e):(0,u.createElement)(Ab,e)};const Db=e=>{let{setting:t,children:n,panelId:o,...r}=e;return(0,u.createElement)(h.__experimentalToolsPanelItem,c({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},r,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:t.resetAllFilter}),n)},zb=e=>{let{colorValue:t,label:n}=e;return(0,u.createElement)(h.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(h.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,u.createElement)(h.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},Fb=e=>t=>{let{onToggle:n,isOpen:o}=t;const{colorValue:r,label:l}=e,i={onClick:n,className:p()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o};return(0,u.createElement)(h.Button,i,(0,u.createElement)(zb,{colorValue:r,label:l}))};function Vb(e){let t,{colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:l,gradients:i,settings:a,__experimentalIsRenderedInSidebar:s,...d}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,u.createElement)(u.Fragment,null,a.map(((e,a)=>{var p;const m={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:l,gradientValue:e.gradientValue,gradients:i,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},g={colorValue:null!==(p=e.gradientValue)&&void 0!==p?p:e.colorValue,label:e.label};return e&&(0,u.createElement)(Db,c({key:a,setting:e},d),(0,u.createElement)(h.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:Fb(g),renderContent:()=>(0,u.createElement)(h.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,u.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,u.createElement)(Ob,m)))}))})))}fp([hp,kp]);var Hb=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fallbackLinkColor:r,fontSize:l,isLargeText:i,textColor:a,linkColor:s,enableAlphaChecker:c=!1}=e;const d=t||n;if(!d)return null;const p=a||o,m=s||r;if(!p&&!m)return null;const g=[{color:p,description:(0,_.__)("text color")},{color:m,description:(0,_.__)("link color")}],f=mp(d),v=f.alpha()<1,b=f.brightness(),k={level:"AA",size:i||!1!==i&&l>=24?"large":"small"};let y="",E="";for(const e of g){if(!e.color)continue;const t=mp(e.color),n=t.isReadable(f,k),o=t.alpha()<1;if(!n){if(v||o)continue;y=bnull==e?void 0:e.colorValue));(0,u.useEffect)((()=>{var e;if(!r)return;if(!g.length)return l&&i(),a&&s(),void(d&&s());if(!m.current)return;s(Gb(m.current).color);const t=null===(e=m.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&p(Gb(t).color);let n=m.current,o=Gb(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,o=Gb(n).backgroundColor;i(o)}));const f=pb();return(0,u.createElement)(jr,{group:"color"},(0,u.createElement)(Vb,c({enableAlpha:t,panelId:o,settings:n,__experimentalIsItemGroup:!1,__experimentalIsRenderedInSidebar:!0},f)),r&&(0,u.createElement)(Hb,{backgroundColor:l,textColor:a,enableAlphaChecker:t,linkColor:d}))}const $b="color",jb=e=>{const t=(0,a.getBlockSupport)(e,$b);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Wb=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,a.getBlockSupport)(e,$b);return null!==t&&"object"==typeof t&&!!t.link},Kb=e=>{const t=(0,a.getBlockSupport)(e,$b);return null!==t&&"object"==typeof t&&!!t.gradients},qb=e=>{const t=(0,a.getBlockSupport)(e,$b);return t&&!1!==t.background},Yb=e=>{const t=(0,a.getBlockSupport)(e,$b);return t&&!1!==t.text},Zb=(e,t)=>Ar(Dr(t,e,void 0)),Qb=e=>({textColor:void 0,style:Zb(["color","text"],e.style)}),Xb=e=>({style:Zb(["elements","link","color","text"],e.style)}),Jb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function ek(e,t,n){var o,r,l,i,a,s;if(!jb(t)||Fr(t,$b))return e;const c=Kb(t),{backgroundColor:u,textColor:d,gradient:m,style:g}=n,f=e=>!Fr(t,$b,e),h=f("text")?db("color",d):void 0,v=f("gradients")?wb(m):void 0,b=f("background")?db("background-color",u):void 0,k=f("background")||f("gradients"),_=u||(null==g||null===(o=g.color)||void 0===o?void 0:o.background)||c&&(m||(null==g||null===(r=g.color)||void 0===r?void 0:r.gradient)),y=p()(e.className,h,v,{[b]:!(c&&null!=g&&null!==(l=g.color)&&void 0!==l&&l.gradient||!b),"has-text-color":f("text")&&(d||(null==g||null===(i=g.color)||void 0===i?void 0:i.text)),"has-background":k&&_,"has-link-color":f("link")&&(null==g||null===(a=g.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=y||void 0,e}const tk=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?cb(e,n[1]).color:t};function nk(e){var t,n,o,r,l,i;const{name:s,attributes:c}=e,d=fr("color.palette.custom"),p=fr("color.palette.theme"),m=fr("color.palette.default"),g=(0,u.useMemo)((()=>[...d||[],...p||[],...m||[]]),[d,p,m]),f=fr("color.gradients.custom"),h=fr("color.gradients.theme"),v=fr("color.gradients.default"),b=(0,u.useMemo)((()=>[...f||[],...h||[],...v||[]]),[f,h,v]),k=fr("color.custom"),y=fr("color.customGradient"),E=fr("color.background"),C=fr("color.link"),S=fr("color.text"),w=k||!p||(null==p?void 0:p.length)>0,B=y||!h||(null==h?void 0:h.length)>0,I=(0,u.useRef)(c);if((0,u.useEffect)((()=>{I.current=c}),[c]),!jb(s))return null;const x=Wb(s)&&C&&w,T=Yb(s)&&S&&w,M=qb(s)&&E&&w,N=Kb(s)&&B;if(!(x||T||M||N))return null;const{style:P,textColor:L,backgroundColor:R,gradient:A}=c;let O;if(N&&A)O=Bb(b,A);else if(N){var D;O=null==P||null===(D=P.color)||void 0===D?void 0:D.gradient}const z=t=>n=>{var o,r;const l=ub(g,n),i=t+"Color",a={...I.current.style,color:{...null===(o=I.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},s=null!=l&&l.slug?l.slug:void 0,c={style:Ar(a),[i]:s};e.setAttributes(c),I.current={...I.current,...c}},F=(0,a.getBlockSupport)(e.name,[$b,"__experimentalDefaultControls"]),V="web"===u.Platform.OS&&!A&&!(null!=P&&null!==(t=P.color)&&void 0!==t&&t.gradient)&&M&&(x||T)&&!1!==(0,a.getBlockSupport)(e.name,[$b,"enableContrastChecker"]);return(0,u.createElement)(Ub,{enableContrastChecking:V,clientId:e.clientId,enableAlpha:!0,settings:[...T?[{label:(0,_.__)("Text"),onColorChange:z("text"),colorValue:cb(g,L,null==P||null===(n=P.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==F?void 0:F.text,resetAllFilter:Qb}]:[],...M||N?[{label:(0,_.__)("Background"),onColorChange:M?z("background"):void 0,colorValue:cb(g,R,null==P||null===(o=P.color)||void 0===o?void 0:o.background).color,gradientValue:O,onGradientChange:N?t=>{const n=xb(b,t);let o;if(n){var r,l,i;const e={...null===(r=I.current)||void 0===r?void 0:r.style,color:{...null===(l=I.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:Ar(e),gradient:n}}else{var a,s,c;const e={...null===(a=I.current)||void 0===a?void 0:a.style,color:{...null===(s=I.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};o={style:Ar(e),gradient:void 0}}e.setAttributes(o),I.current={...I.current,...o}}:void 0,isShownByDefault:null==F?void 0:F.background,resetAllFilter:Jb}]:[],...x?[{label:(0,_.__)("Link"),onColorChange:t=>{var n;const o=ub(g,t),r=null!=o&&o.slug?`var:preset|color|${o.slug}`:t,l=Ar(Dr(null===(n=I.current)||void 0===n?void 0:n.style,["elements","link","color","text"],r));e.setAttributes({style:l}),I.current={...I.current,style:l}},colorValue:tk(g,null==P||null===(r=P.elements)||void 0===r||null===(l=r.link)||void 0===l||null===(i=l.color)||void 0===i?void 0:i.text),isShownByDefault:null==F?void 0:F.link,resetAllFilter:Xb}]:[]]})}const ok=(0,m.createHigherOrderComponent)((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:l,textColor:i}=r,a=fr("color.palette.custom"),s=fr("color.palette.theme"),d=fr("color.palette.default"),p=(0,u.useMemo)((()=>[...a||[],...s||[],...d||[]]),[a,s,d]);if(!jb(o)||Fr(o,$b))return(0,u.createElement)(e,t);const m={};var g,f;i&&!Fr(o,$b,"text")&&(m.color=null===(g=cb(p,i))||void 0===g?void 0:g.color);l&&!Fr(o,$b,"background")&&(m.backgroundColor=null===(f=cb(p,l))||void 0===f?void 0:f.color);let h=t.wrapperProps;return h={...t.wrapperProps,style:{...m,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,u.createElement)(e,c({},t,{wrapperProps:h}))})),rk={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,s.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return jb(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Kb(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",ek),(0,s.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!jb(e)||Fr(e,$b))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),ek(o,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ok),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return zr({linkColor:Wb(r),textColor:Yb(r),backgroundColor:qb(r),gradient:Kb(r)},rk,e,t,n,o)}));const lk=[{name:(0,_._x)("Regular","font style"),value:"normal"},{name:(0,_._x)("Italic","font style"),value:"italic"}],ik=[{name:(0,_._x)("Thin","font weight"),value:"100"},{name:(0,_._x)("Extra Light","font weight"),value:"200"},{name:(0,_._x)("Light","font weight"),value:"300"},{name:(0,_._x)("Regular","font weight"),value:"400"},{name:(0,_._x)("Medium","font weight"),value:"500"},{name:(0,_._x)("Semi Bold","font weight"),value:"600"},{name:(0,_._x)("Bold","font weight"),value:"700"},{name:(0,_._x)("Extra Bold","font weight"),value:"800"},{name:(0,_._x)("Black","font weight"),value:"900"}],ak=(e,t)=>e?t?(0,_.__)("Appearance"):(0,_.__)("Font style"):(0,_.__)("Font weight");function sk(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l},...i}=e,a=n||o,s=ak(n,o),d={key:"default",name:(0,_.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},p=(0,u.useMemo)((()=>n&&o?(()=>{const e=[d];return lk.forEach((t=>{let{name:n,value:o}=t;ik.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,_.sprintf)((0,_.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[d];return lk.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[d];return ik.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),m=p.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||p[0];return a&&(0,u.createElement)(h.CustomSelectControl,c({},i,{className:"components-font-appearance-control",label:s,describedBy:m?n?o?(0,_.sprintf)((0,_.__)("Currently selected font appearance: %s"),m.name):(0,_.sprintf)((0,_.__)("Currently selected font style: %s"),m.name):(0,_.sprintf)((0,_.__)("Currently selected font weight: %s"),m.name):(0,_.__)("No selected font appearance"),options:p,value:m,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const ck=1.5,uk=.1;var dk=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:o=!1,__unstableInputWidth:r="60px",...l}=e;const i=function(e){return void 0!==e&&""!==e}(t),a=i?t:"";o||W()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",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 s=o?void 0:{marginBottom:24};return(0,u.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,u.createElement)(h.__experimentalNumberControl,c({},l,{__unstableInputWidth:r,__unstableStateReducer:(e,t)=>{var n;const o=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),r=((e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return ck;default:return e}})(e.value,o);return{...e,value:r}},onChange:n,label:(0,_.__)("Line height"),placeholder:ck,step:uk,value:a,min:0,spinControls:"custom"})))};const pk="typography.lineHeight";function mk(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,u.createElement)(dk,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:Ar(t)})},size:"__unstable-large"})}function gk(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!fr("typography.lineHeight");return!(0,a.hasBlockSupport)(e,pk)||t}const fk="typography.__experimentalFontStyle",hk="typography.__experimentalFontWeight";function vk(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!bk(e),i=!kk(e),a=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,s=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,u.createElement)(sk,{onChange:e=>{r({style:Ar({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:s},size:"__unstable-large"})}function bk(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,fk),n=fr("typography.fontStyle");return!t||!n}function kk(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,hk),n=fr("typography.fontWeight");return!t||!n}function _k(e){const t=bk(e),n=kk(e);return t&&n}function yk(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=fr("typography.fontFamilies");if(o||(o=l),!o||0===o.length)return null;const i=[{value:"",label:(0,_.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,u.createElement)(h.SelectControl,c({label:(0,_.__)("Font"),options:i,value:t,onChange:n,labelPosition:"top"},r))}const Ek="typography.__experimentalFontFamily";function Ck(e,t,n){if(!(0,a.hasBlockSupport)(t,Ek))return e;if(Fr(t,c_,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const o=new(zf())(e.className);o.add(`has-${(0,f.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}function Sk(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=fr("typography.fontFamilies"),l=null==r||null===(t=r.find((e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,u.createElement)(yk,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=null==r?void 0:r.find((t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function wk(e){let{name:t}=e;const n=fr("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,Ek)}(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Ek)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Ck),(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Ek))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Ck(o,e,n)},e}));const Bk=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}};function Ik(e,t){const n=null==e?void 0:e.find((e=>{let{size:n}=e;return n===t}));return n||{size:t}}function xk(e){if(e)return`has-${(0,f.kebabCase)(e)}-font-size`}var Tk=function(e){const t=fr("typography.fontSizes"),n=!fr("typography.customFontSize");return(0,u.createElement)(h.FontSizePicker,c({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Mk="1600px",Nk="768px",Pk=1,Lk=.75;function Rk(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:o,minimumViewPortWidth:r=Nk,maximumViewPortWidth:l=Mk,scaleFactor:i=Pk,minimumFontSizeFactor:a=Lk,minimumFontSizeLimit:s}=e;if(s=Ak(s)?s:"14px",o){const e=Ak(o);if(null==e||!e.unit)return null;const r=Ak(s,{coerceTo:e.unit});if(null!=r&&r.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==r?void 0:r.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Ok(e.value*a,3);t=null!=r&&r.value&&n<(null==r?void 0:r.value)?`${r.value}${r.unit}`:`${n}${e.unit}`}}const c=Ak(t),u=(null==c?void 0:c.unit)||"rem",d=Ak(n,{coerceTo:u});if(!c||!d)return null;const p=Ak(t,{coerceTo:"rem"}),m=Ak(l,{coerceTo:u}),g=Ak(r,{coerceTo:u});if(!m||!g||!p)return null;const f=Ok(g.value/100,3),h=Ok(f,3)+u,v=Ok(((d.value-c.value)/(m.value-g.value)*100||1)*i,3);return`clamp(${t}, ${`${p.value}${p.unit} + ((1vw - ${h}) * ${v})`}, ${n})`}function Ak(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=null==r?void 0:r.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),a=e.match(i);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Ok(u,3),unit:c}}function Ok(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Dk="typography.fontSize";function zk(e,t,n){if(!(0,a.hasBlockSupport)(t,Dk))return e;if(Fr(t,c_,"fontSize"))return e;const o=new(zf())(e.className);o.add(xk(n.fontSize));const r=o.value;return e.className=r||void 0,e}function Fk(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=fr("typography.fontSizes"),a=Bk(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),s=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,u.createElement)(Tk,{onChange:e=>{const t=Ik(i,e).slug;l({style:Ar({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:s,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Vk(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=fr("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Dk)||!n}const Hk=(0,m.createHigherOrderComponent)((e=>t=>{var n,o;const r=fr("typography.fontSizes"),{name:l,attributes:{fontSize:i,style:s},wrapperProps:c}=t;if(!(0,a.hasBlockSupport)(l,Dk)||Fr(l,c_,"fontSize")||!i||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,u.createElement)(e,t);const d=Bk(r,i,null==s||null===(o=s.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...c,style:{fontSize:d,...null==c?void 0:c.style}}};return(0,u.createElement)(e,p)}),"withFontSizeInlineStyles"),Gk={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,s.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Dk)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",zk),(0,s.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Dk))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),zk(o,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Hk),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return zr({fontSize:(0,a.hasBlockSupport)(r,Dk)},Gk,e,t,n,o)})),(0,s.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,a.hasBlockSupport)(e,Dk)||Fr(e,c_,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,o,r;const l=t?t(e):{},i=null==l||null===(n=l.style)||void 0===n?void 0:n.fontSize,a=null===(o=(0,g.select)(To).getSettings().__experimentalFeatures)||void 0===o||null===(r=o.typography)||void 0===r?void 0:r.fluid,s="object"==typeof a?a:{},c=i&&a?Rk({fontSize:i,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?l:{...l,style:{...null==l?void 0:l.style,fontSize:c}}},e}),11);var Uk=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M7 11.5h10V13H7z"}));var $k=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var jk=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const Wk=[{name:(0,_.__)("None"),value:"none",icon:Uk},{name:(0,_.__)("Underline"),value:"underline",icon:$k},{name:(0,_.__)("Strikethrough"),value:"line-through",icon:jk}];function Kk(e){let{value:t,onChange:n,className:o}=e;return(0,u.createElement)("fieldset",{className:p()("block-editor-text-decoration-control",o)},(0,u.createElement)(h.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Decoration")),(0,u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Wk.map((e=>(0,u.createElement)(h.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const qk="typography.__experimentalTextDecoration";function Yk(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,u.createElement)(Kk,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:Ar({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Zk(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,qk),n=fr("typography.textDecoration");return t||!n}var Qk=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var Xk=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var Jk=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const e_=[{name:(0,_.__)("None"),value:"none",icon:Uk},{name:(0,_.__)("Uppercase"),value:"uppercase",icon:Qk},{name:(0,_.__)("Lowercase"),value:"lowercase",icon:Xk},{name:(0,_.__)("Capitalize"),value:"capitalize",icon:Jk}];function t_(e){let{className:t,value:n,onChange:o}=e;return(0,u.createElement)("fieldset",{className:p()("block-editor-text-transform-control",t)},(0,u.createElement)(h.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Letter case")),(0,u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},e_.map((e=>(0,u.createElement)(h.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{o(e.value===n?void 0:e.value)}})))))}const n_="typography.__experimentalTextTransform";function o_(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,u.createElement)(t_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:Ar({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function r_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,n_),n=fr("typography.textTransform");return t||!n}function l_(e){let{value:t,onChange:n,__unstableInputWidth:o="60px",...r}=e;const l=(0,h.__experimentalUseCustomUnits)({availableUnits:fr("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,u.createElement)(h.__experimentalUnitControl,c({},r,{label:(0,_.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:l,onChange:n}))}const i_="typography.__experimentalLetterSpacing";function a_(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,u.createElement)(l_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:Ar({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function s_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,i_),n=fr("typography.letterSpacing");return t||!n}const c_="typography",u_=[pk,Dk,fk,hk,Ek,qk,n_,i_];function d_(e){const{clientId:t}=e,n=wk(e),o=Vk(e),r=_k(e),l=gk(e),i=Zk(e),s=r_(e),c=s_(e),d=!bk(e),p=!kk(e),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[_k(e),Vk(e),gk(e),wk(e),Zk(e),r_(e),s_(e)];return t.filter(Boolean).length===t.length}(e),g=p_(e.name);if(m||!g)return null;const f=(0,a.getBlockSupport)(e.name,[c_,"__experimentalDefaultControls"]),v=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,u.createElement)(jr,{group:"typography"},!n&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,_.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==f?void 0:f.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,u.createElement)(Sk,e)),!o&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,_.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:Ar({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==f?void 0:f.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,u.createElement)(Fk,e)),!r&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:ak(d,p),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==f?void 0:f.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,u.createElement)(vk,e)),!l&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,_.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==f?void 0:f.lineHeight,resetAllFilter:v("lineHeight"),panelId:t},(0,u.createElement)(mk,e)),!c&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,_.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==f?void 0:f.letterSpacing,resetAllFilter:v("letterSpacing"),panelId:t},(0,u.createElement)(a_,e)),!i&&(0,u.createElement)(h.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,_.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==f?void 0:f.textDecoration,resetAllFilter:v("textDecoration"),panelId:t},(0,u.createElement)(Yk,e)),!s&&(0,u.createElement)(h.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,_.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ar({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==f?void 0:f.textTransform,resetAllFilter:v("textTransform"),panelId:t},(0,u.createElement)(o_,e)))}const p_=e=>u_.some((t=>(0,a.hasBlockSupport)(e,t)));const m_=[...u_,mb,$b,fl,hl],g_=e=>m_.some((t=>(0,a.hasBlockSupport)(e,t)));function f_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,ni.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const h_={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$b],[`${c_}.__experimentalSkipSerialization`]:[c_],[`${fl}.__experimentalSkipSerialization`]:[fl],[`${hl}.__experimentalSkipSerialization`]:[hl]},v_={...h_,[`${hl}`]:["spacing.blockGap"]},b_={gradients:"gradient"};function k_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;k_(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function __(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v_;if(!g_(t))return e;let{style:r}=n;return Object.entries(o).forEach((e=>{let[n,o]=e;const l=(0,a.getBlockSupport)(t,n);!0===l&&(r=k_(r,o)),Array.isArray(l)&&l.forEach((e=>{const t=b_[e]||e;r=k_(r,[[...o,t]])}))})),e.style={...f_(r),...e.style},e}const y_=(0,m.createHigherOrderComponent)((e=>t=>{const n=Ao();return(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(nk,t),(0,u.createElement)(d_,t),(0,u.createElement)(kb,t),(0,u.createElement)(_l,t)),(0,u.createElement)(e,t))}),"withToolbarControls"),E_=(0,m.createHigherOrderComponent)((e=>t=>{var n,o;const r=`wp-elements-${(0,m.useInstanceId)(e)}`,l=Fr(t.name,$b,"link"),i=(0,u.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,o=[];if(n&&Object.keys(n).length>0){var i;const e={...n,link:{...n.link,color:l||null===(i=n.link)||void 0===i?void 0:i.color}};for(const[t,n]of Object.entries(e)){const e=(0,ni.compileCSS)(n,{selector:`.editor-styles-wrapper .${r} ${a.__EXPERIMENTAL_ELEMENTS[t]}`});e&&o.push(e)}}return o.length>0?o:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),s=(0,u.useContext)(Kv.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,i&&s&&(0,u.createPortal)((0,u.createElement)("style",{dangerouslySetInnerHTML:{__html:i}}),s),(0,u.createElement)(e,c({},t,{className:null!==(o=t.attributes.style)&&void 0!==o&&o.elements?p()(t.className,r):t.className})))}));(0,s.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return g_(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",__),(0,s.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!g_(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),__(o,e,n,h_)},e})),(0,s.addFilter)("editor.BlockEdit","core/style/with-block-controls",y_),(0,s.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",E_);(0,s.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var C_=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var S_=function(e){let t,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}=e;return t="unset"===i?(0,u.createElement)(h.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,u.createElement)(h.DuotoneSwatch,{values:i}):(0,u.createElement)(Jl,{icon:C_}),(0,u.createElement)(h.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_.__)("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,u.createElement)(h.ToolbarButton,{showTooltip:!0,onClick:o,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==Qu.DOWN||(e.preventDefault(),o())},label:(0,_.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,u.createElement)(h.MenuGroup,{label:(0,_.__)("Duotone")},(0,u.createElement)("div",{className:"block-editor-duotone-control__description"},(0,_.__)("Create a two-tone color effect without losing your original image.")),(0,u.createElement)(h.DuotonePicker,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}))})};const w_=[];function B_(e){let{selector:t,id:n,colors:o}=e;return"unset"===o?(0,u.createElement)(Wp,{selector:t}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Kp,{id:n,colors:o}),(0,u.createElement)(jp,{id:n,selector:t}))}function I_(e){let{presetSetting:t,defaultSetting:n}=e;const o=!fr(n),r=fr(`${t}.custom`)||w_,l=fr(`${t}.theme`)||w_,i=fr(`${t}.default`)||w_;return(0,u.useMemo)((()=>[...r,...l,...o?w_:i]),[o,r,l,i])}function x_(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=I_({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=I_({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!fr("color.custom"),c=!fr("color.customDuotone")||0===(null==a?void 0:a.length)&&s;return 0===(null==i?void 0:i.length)&&c?null:(0,u.createElement)(Vo,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(S_,{duotonePalette:i,colorPalette:a,disableCustomDuotone:c,disableCustomColors:s,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}fp([hp]);const T_=(0,m.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone"),o=(0,g.useSelect)((e=>e(To).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&!o&&(0,u.createElement)(x_,t))}),"withDuotoneControls");const M_=(0,m.createHigherOrderComponent)((e=>t=>{var n,o,r;const l=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),i=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(r=o.color)||void 0===r?void 0:r.duotone;if(!l||!i)return(0,u.createElement)(e,t);const s=`wp-duotone-${(0,m.useInstanceId)(e)}`,d=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(", ")}(`.editor-styles-wrapper .${s}`,l),g=p()(null==t?void 0:t.className,s),f=(0,u.useContext)(Kv.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,f&&(0,u.createPortal)((0,u.createElement)(B_,{selector:d,id:s,colors:i}),f),(0,u.createElement)(e,c({},t,{className:g})))}),"withDuotoneStyles");(0,s.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",T_),(0,s.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",M_);const N_="__experimentalLayout";function P_(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,g.useSelect)((e=>{var t;const{getSettings:n}=e(To);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),r=fr("layout")||{},{attributes:l={},name:i}=n,{layout:s}=l,{default:c}=(0,a.getBlockSupport)(i,N_)||{},u=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},d=[];var p,m;null!=r&&null!==(e=r.definitions)&&void 0!==e&&null!==(t=e[(null==u?void 0:u.type)||"default"])&&void 0!==t&&t.className&&d.push(null==r||null===(p=r.definitions)||void 0===p||null===(m=p[(null==u?void 0:u.type)||"default"])||void 0===m?void 0:m.className);return(null!=u&&u.inherit||null!=u&&u.contentSize||"constrained"===(null==u?void 0:u.type))&&o&&d.push("has-global-padding"),null!=u&&u.orientation&&d.push(`is-${(0,f.kebabCase)(u.orientation)}`),null!=u&&u.justifyContent&&d.push(`is-content-justification-${(0,f.kebabCase)(u.justifyContent)}`),null!=u&&u.flexWrap&&"nowrap"===u.flexWrap&&d.push("is-nowrap"),d}function L_(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:o={},name:r}=t,{layout:l={},style:i={}}=o,a=null!=l&&l.inherit||null!=l&&l.contentSize||null!=l&&l.wideSize?{...l,type:"constrained"}:l||{},s=li((null==a?void 0:a.type)||"default"),c=fr("layout")||{},u=fr("spacing.blockGap"),d=null!==u,p=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:r,selector:n,layout:l,layoutDefinitions:null==c?void 0:c.definitions,style:i,hasBlockGapSupport:d});return p}function R_(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:r}=n,l=fr("layout"),i=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return t().supportsLayout}),[]),s=(0,a.getBlockSupport)(o,N_,{}),{allowSwitching:c,allowEditing:d=!0,allowInheriting:p=!0,default:m}=s;if(!d)return null;const f=!(!p||!l||null!=r&&r.type&&"default"!==(null==r?void 0:r.type)&&"constrained"!==(null==r?void 0:r.type)&&(null==r||!r.inherit)),v=r||m||{},{inherit:b=!1,type:k="default",contentSize:y=null}=v;if(("default"===k||"constrained"===k)&&!i)return null;const E=li(k),C=li("constrained"),S=!v.type&&(y||b),w=!!b||!!y,B=e=>t({layout:e});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr,null,(0,u.createElement)(h.PanelBody,{title:(0,_.__)("Layout")},f&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,_.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||w,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||w?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||w?(0,_.__)("Nested blocks use content width with options for full and wide widths."):(0,_.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!b&&c&&(0,u.createElement)(A_,{type:k,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,u.createElement)(E.inspectorControls,{layout:v,onChange:B,layoutBlockSupport:s}),C&&S&&(0,u.createElement)(C.inspectorControls,{layout:v,onChange:B,layoutBlockSupport:s}))),!b&&E&&(0,u.createElement)(E.toolBarControls,{layout:v,onChange:B,layoutBlockSupport:s}))}function A_(e){let{type:t,onChange:n}=e;return(0,u.createElement)(h.ButtonGroup,null,ri.map((e=>{let{name:o,label:r}=e;return(0,u.createElement)(h.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const O_=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,N_)&&(0,u.createElement)(R_,c({key:"layout"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),D_=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o,block:r}=t,l=(0,a.hasBlockSupport)(n,N_),i=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return!!t().disableLayoutStyles})),s=l&&!i,d=(0,m.useInstanceId)(e),f=fr("layout")||{},h=(0,u.useContext)(Kv.__unstableElementContext),{layout:v}=o,{default:b}=(0,a.getBlockSupport)(n,N_)||{},k=null!=v&&v.inherit||null!=v&&v.contentSize||null!=v&&v.wideSize?{...v,type:"constrained"}:v||b||{},_=l?P_(r):null,y=`.wp-container-${d}.wp-container-${d}`,E=null!==fr("spacing.blockGap");let C;if(s){var S;const e=li((null==k?void 0:k.type)||"default");C=null==e||null===(S=e.getLayoutStyle)||void 0===S?void 0:S.call(e,{blockName:n,selector:y,layout:k,layoutDefinitions:null==f?void 0:f.definitions,style:null==o?void 0:o.style,hasBlockGapSupport:E})}const w=p()({[`wp-container-${d}`]:s&&!!C},_);return(0,u.createElement)(u.Fragment,null,s&&h&&!!C&&(0,u.createPortal)((0,u.createElement)(ui,{blockName:n,selector:y,css:C,layout:k,style:null==o?void 0:o.style}),h),(0,u.createElement)(e,c({},t,{__unstableLayoutClassNames:w})))})),z_=(0,m.createHigherOrderComponent)((e=>t=>{const{attributes:n}=t,{style:{layout:o={}}={}}=n,{selfStretch:r,flexSize:l}=o,i=r||l,a=(0,g.useSelect)((e=>{const{getSettings:t}=e(To);return!!t().disableLayoutStyles})),s=i&&!a,d=(0,u.useContext)(Kv.__unstableElementContext),f=(0,m.useInstanceId)(e),h=`.wp-container-content-${f}`;let v="";"fixed"===r&&l?v+=`${h} {\n\t\t\t\tflex-basis: ${l};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===r&&(v+=`${h} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const b=p()(null==t?void 0:t.className,{[`wp-container-content-${f}`]:s&&!!v});return(0,u.createElement)(u.Fragment,null,s&&d&&!!v&&(0,u.createPortal)((0,u.createElement)("style",null,v),d),(0,u.createElement)(e,c({},t,{className:b})))}));function F_(e){let{clientId:t,stopEditingAsBlock:n}=e;const o=(0,g.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=e(To);return n(t)||o(t,!0)}),[t]);return(0,u.useEffect)((()=>{o||n()}),[o]),null}(0,s.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,N_)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",D_),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",z_),(0,s.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",O_);const V_=(0,m.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:o}=(0,g.useSelect)(To),r=(0,u.useRef)(),{templateLock:l,isLockedByParent:i,isEditingAsBlocks:a}=(0,g.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=e(To);return{templateLock:o(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:r()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:d,__unstableSetTemporarilyEditingAsBlocks:m}=(0,g.useDispatch)(To),f=!i&&"contentOnly"===l,{__unstableMarkNextChangeAsNotPersistent:v,updateBlockAttributes:b}=(0,g.useDispatch)(To),k=(0,u.useCallback)((()=>{v(),b(t.clientId,{templateLock:"contentOnly"}),d(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:r.current}),m()}),[t.clientId,r,s,d,n,v,b,m]);return f||a?(0,u.createElement)(u.Fragment,null,a&&!f&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(F_,{clientId:t.clientId,stopEditingAsBlock:k}),(0,u.createElement)(Vo,{group:"other"},(0,u.createElement)(h.ToolbarButton,{onClick:()=>{k()}},(0,_.__)("Done")))),!a&&f&&t.isSelected&&(0,u.createElement)(Fh,null,(e=>{let{onClose:l}=e;return(0,u.createElement)(h.MenuItem,{onClick:()=>{v(),b(t.clientId,{templateLock:void 0}),d(t.clientId,{...n(t.clientId),templateLock:!1}),r.current=o().focusMode,s({focusMode:!0}),m(t.clientId),l()}},(0,_.__)("Modify"))})),(0,u.createElement)(e,c({},t,{className:p()(t.className,a&&"is-content-locked-editing-as-blocks")}))):(0,u.createElement)(e,t)}),"withToolbarControls");(0,s.addFilter)("editor.BlockEdit","core/content-lock-ui/with-block-controls",V_);const H_="metadata";function G_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=(0,a.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function U_(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Cb(e)||void 0,style:f_({border:n})}}function $_(e){const{colors:t}=pb(),n=U_(e),{borderColor:o}=e;if(o){const e=vb({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function j_(e){var t,n,o,r,l,i;const{backgroundColor:a,textColor:s,gradient:c,style:u}=e,d=db("background-color",a),m=db("color",s),g=wb(c),f=g||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:p()(m,g,{[d]:!f&&!!d,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":a||(null==u||null===(o=u.color)||void 0===o?void 0:o.background)||c||(null==u||null===(r=u.color)||void 0===r?void 0:r.gradient),"has-link-color":null==u||null===(l=u.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:f_({color:(null==u?void 0:u.color)||{}})}}(0,s.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||G_(e,"name")&&(e.attributes={...e.attributes,[H_]:{type:"object"}}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return G_(t)&&(e.metadata=n.metadata),e})),(0,s.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||G_(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:o}=e;if("list-view"===n&&null!=o&&o.name)return o.name}),e}));const W_={};function K_(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=fr("color.palette.custom"),l=fr("color.palette.theme"),i=fr("color.palette.default"),a=fr("color.gradients")||W_,s=(0,u.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),c=(0,u.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),d=j_(e);if(t){const e=cb(s,t);d.style.backgroundColor=e.color}if(o&&(d.style.background=Bb(c,o)),n){const e=cb(s,n);d.style.color=e.color}return d}function q_(e){const{style:t}=e;return{style:f_({spacing:(null==t?void 0:t.spacing)||{}})}}function Y_(e,t){var n;let o=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};if(t&&(!0===t||0!==Object.keys(t).length)){var r,l,i,a;const n=Rk({fontSize:null==e||null===(r=e.style)||void 0===r||null===(l=r.typography)||void 0===l?void 0:l.fontSize,minimumFontSizeLimit:null==t?void 0:t.minFontSize})||(null==e||null===(i=e.style)||void 0===i||null===(a=i.typography)||void 0===a?void 0:a.fontSize);o={...o,fontSize:n}}const s=f_({typography:o}),c=null!=e&&e.fontFamily?`has-${(0,f.kebabCase)(e.fontFamily)}-font-family`:"";return{className:p()(c,xk(null==e?void 0:e.fontSize)),style:s}}function Z_(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}const Q_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},X_=e=>(0,m.createHigherOrderComponent)((t=>n=>(0,u.createElement)(t,c({},n,{colors:e}))),"withCustomColorPalette"),J_=()=>(0,m.createHigherOrderComponent)((e=>t=>{const n=fr("color.palette.custom"),o=fr("color.palette.theme"),r=fr("color.palette.default"),l=(0,u.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,u.createElement)(e,c({},t,{colors:l}))}),"withEditorColorPalette");function ey(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,f.kebabCase)(t)}:t})),{});return(0,m.compose)([t,e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=mp(t),o=e=>{let{color:t}=e;return n.contrast(t)},r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=Q_(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=ub(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return Object.entries(n).reduce(((e,n)=>{let[l,i]=n;const a=cb(r,o[l],o[`custom${Q_(l)}`]),s=t[l];return(null==s?void 0:s.color)===a.color&&s?e[l]=s:e[l]={...a,class:db(i,a.slug)},e}),{})}render(){return(0,u.createElement)(e,c({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function ty(e){return function(){const t=X_(e);for(var n=arguments.length,o=new Array(n),r=0;r{let[t,...n]=e;return t.toUpperCase()+n.join("")};var ly=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${ry(t)}`,e)),{});return(0,m.createHigherOrderComponent)((0,m.compose)([(0,m.createHigherOrderComponent)((e=>t=>{const n=fr("typography.fontSizes")||oy;return(0,u.createElement)(e,c({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(o).reduce(((e,t)=>{let[n,o]=t;return e[`set${ry(n)}`]=this.createSetFontSize(n,o),e}),{})}createSetFontSize(e,t){return n=>{var o;const r=null===(o=this.props.fontSizes)||void 0===o?void 0:o.find((e=>{let{size:t}=e;return t===Number(n)}));this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!Object.values(o).some(l))return null;const i=Object.entries(o).filter((e=>{let[t,n]=e;return l(n,t)})).reduce(((e,t)=>{let[o,l]=t;const i=n[o],a=Bk(r,i,n[l]);return e[o]={...a,class:xk(i)},e}),{});return{...t,...i}}render(){return(0,u.createElement)(e,c({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var iy=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var ay=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var sy=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const cy=[{icon:iy,title:(0,_.__)("Align text left"),align:"left"},{icon:ay,title:(0,_.__)("Align text center"),align:"center"},{icon:sy,title:(0,_.__)("Align text right"),align:"right"}],uy={position:"bottom right",variant:"toolbar"};var dy=function(e){let{value:t,onChange:n,alignmentControls:o=cy,label:r=(0,_.__)("Align text"),describedBy:l=(0,_.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:a}=e;function s(e){return()=>n(t===e?void 0:e)}const d=o.find((e=>e.align===t)),p=a?h.ToolbarGroup:h.ToolbarDropdownMenu,m=a?{isCollapsed:i}:{toggleProps:{describedBy:l},popoverProps:uy};return(0,u.createElement)(p,c({icon:d?d.icon:(0,_.isRTL)()?sy:iy,label:r,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:i?"menuitemradio":void 0,onClick:s(n)}}))},m))};const py=e=>(0,u.createElement)(dy,c({},e,{isToolbar:!1})),my=e=>(0,u.createElement)(dy,c({},e,{isToolbar:!0})),gy=()=>{};var fy={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(To),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=pm(t,gy),i=(0,u.useMemo)((()=>(e.trim()?$m(o,r,l,e):Y(o,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]),a=(0,u.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(fd,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i]);return[a]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(o))}}},hy=window.wp.apiFetch,vy=n.n(hy);var by=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var ky=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var _y={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await vy()({path:(0,lg.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jl,{key:"icon",icon:"page"===e.subtype?by:ky}),e.title)},getOptionCompletion(e){return(0,u.createElement)("a",{href:e.url},e.title)}};const yy=[];function Ey(e){let{completers:t=yy}=e;const{name:n}=Ro();return(0,u.useMemo)((()=>{let e=[...t,_y];return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,fy]),(0,s.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=(0,s.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Cy=function(e){return(0,u.createElement)(h.Autocomplete,c({},e,{completers:Ey(e)}))};var Sy=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var wy=function(e){let{isActive:t,label:n=(0,_.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,u.createElement)(h.ToolbarButton,{isActive:t,icon:Sy,label:n,onClick:()=>o(!t),disabled:r})};const By=()=>{};var Iy=function(e){const{label:t=(0,_.__)("Change matrix alignment"),onChange:n=By,value:o="center",isDisabled:r}=e,l=(0,u.createElement)(h.__experimentalAlignmentMatrixControl.Icon,{value:o});return(0,u.createElement)(h.Dropdown,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,u.createElement)(h.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==Qu.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,u.createElement)(h.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};var xy=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Ty=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,g.useDispatch)(To),{clientId:r,parents:l,hasSelection:i}=(0,g.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(To),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),a=t||(0,_.__)("Document");return(0,u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,_.__)("Block breadcrumb")},(0,u.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},a),!i&&a,!!r&&(0,u.createElement)(Jl,{icon:xy,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,u.createElement)("li",{key:e},(0,u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,u.createElement)(sf,{clientId:e,maximumLength:35})),(0,u.createElement)(Jl,{icon:xy,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,u.createElement)(sf,{clientId:r,maximumLength:35})))};const My=()=>(0,u.createElement)(h.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,u.createElement)(h.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Ny=e=>{let{style:t,className:n}=e;return(0,u.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,u.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,u.createElement)(My,null)))},Py=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(h.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,_.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==Qu.DOWN||(e.preventDefault(),o())},icon:(0,u.createElement)(n,null,(0,u.createElement)(t,null,(0,u.createElement)(Ny,null)))}))}};var Ly=e=>{let{children:t,...n}=e;return W()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,u.createElement)(h.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Py(n),renderContent:()=>t})};var Ry=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Ay=Ru(h.__experimentalTreeGridRow);var Oy=(0,u.forwardRef)(((e,t)=>{let{isSelected:n,position:o,level:r,rowCount:l,children:i,className:a,path:s,...d}=e;const g=Du({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s}),f=(0,m.useMergeRefs)([t,g]);return(0,u.createElement)(Ay,c({ref:f,className:p()("block-editor-list-view-leaf",a),level:r,positionInSet:o,setSize:l},d),i)}));var Dy=(0,u.createElement)(G.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(G.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"}));var zy=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function Fy(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,_.isRTL)()?zy:xy}))}var Vy=(0,u.forwardRef)((function(e,t){let{className:n,block:{clientId:o},onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:a,onDragStart:s,onDragEnd:c,draggable:d}=e;const m=lf(o),g=af({clientId:o,context:"list-view"}),{isLocked:f}=xh(o);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!==Qu.ENTER&&e.keyCode!==Qu.SPACE||r(e)},ref:t,tabIndex:i,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:d,href:`#block-${o}`,"aria-hidden":!0},(0,u.createElement)(Fy,{onClick:l}),(0,u.createElement)(fd,{icon:null==m?void 0:m.icon,showColors:!0}),(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"},g)),(null==m?void 0:m.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"},m.anchor)),f&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Jl,{icon:Dy})))))}));const Hy=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:i,siblingBlockCount:a,level:s,isExpanded:d,selectedClientIds:m,...f}=e;const{clientId:h}=r,{blockMovingClientId:v,selectedBlockInBlockEditor:b}=(0,g.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(To);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[h]),k=v&&b===h,_=p()("block-editor-list-view-block-contents",{"is-dropping-before":k}),y=m.includes(h)?m:[h];return(0,u.createElement)(cf,{clientIds:y},(e=>{let{draggable:p,onDragStart:m,onDragEnd:g}=e;return(0,u.createElement)(Vy,c({ref:t,className:_,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:i,siblingBlockCount:a,level:s,draggable:p,onDragStart:m,onDragEnd:g,isExpanded:d},f))}))}));var Gy=Hy;const Uy=(0,u.createContext)({}),$y=()=>(0,u.useContext)(Uy);var jy=(0,u.memo)((function e(t){let{block:n,isDragged:o,isSelected:r,isBranchSelected:l,selectBlock:i,position:s,level:c,rowCount:d,siblingBlockCount:f,showBlockMovers:v,path:b,isExpanded:k,selectedClientIds:y,preventAnnouncement:E,isSyncedBranch:C}=t;const S=(0,u.useRef)(null),w=(0,u.useRef)(null),[B,I]=(0,u.useState)(!1),{clientId:x}=n,{isLocked:T,isContentLocked:M,canEdit:N}=xh(x),P=(0,g.useSelect)((e=>!r&&(!!M&&e(To).hasSelectedInnerBlock(x,!0))),[M,x,r]),L=!M&&N,R=P||r&&y[0]===x,A=P||r&&y[y.length-1]===x,{toggleBlockHighlight:O}=(0,g.useDispatch)(To),D=lf(x),z=(0,g.useSelect)((e=>e(To).getBlockName(x)),[x]),F=(0,a.hasBlockSupport)(z,"__experimentalToolbar",!0),V=`list-view-block-select-button__${(0,m.useInstanceId)(e)}`,H=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,f,c);let G=(0,_.__)("Link");D&&(G=T?(0,_.sprintf)((0,_.__)("%s link (locked)"),D.title):(0,_.sprintf)((0,_.__)("%s link"),D.title));const U=D?(0,_.sprintf)((0,_.__)("Options for %s block"),D.title):(0,_.__)("Options"),{isTreeGridMounted:$,expand:j,collapse:W}=$y(),K=v&&f>0,q=p()("block-editor-list-view-block__mover-cell",{"is-visible":B||r}),Y=p()("block-editor-list-view-block__menu-cell",{"is-visible":B||R});(0,u.useEffect)((()=>{!$&&r&&S.current.focus()}),[]);const Z=(0,u.useCallback)((()=>{I(!0),O(x,!0)}),[x,I,O]),Q=(0,u.useCallback)((()=>{I(!1),O(x,!1)}),[x,I,O]),X=(0,u.useCallback)((e=>{i(e,x),e.preventDefault()}),[x,i]),J=(0,u.useCallback)((e=>{i(void 0,e)}),[i]),ee=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===k?W(x):!1===k&&j(x)}),[x,j,W,k]);let te;K?te=2:F||(te=3);const ne=p()({"is-selected":r||P,"is-first-selected":R,"is-last-selected":A,"is-branch-selected":l,"is-synced-branch":C,"is-dragging":o,"has-single-cell":!F,"is-synced":null==D?void 0:D.isSynced}),oe=y.includes(x)?y:[x];return function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:o}=e;const r=1===n.length;(0,u.useLayoutEffect)((()=>{if(!t||!r||!o.current)return;const e=(0,Ri.getScrollContainer)(o.current),{ownerDocument:n}=o.current;if(e===n.body||e===n.documentElement||!e)return;const l=o.current.getBoundingClientRect(),i=e.getBoundingClientRect();(l.topi.bottom)&&o.current.scrollIntoView()}),[t,r,o])}({isSelected:r,rowItemRef:w,selectedClientIds:y}),(0,u.createElement)(Oy,{className:ne,onMouseEnter:Z,onMouseLeave:Q,onFocus:Z,onBlur:Q,level:c,position:s,rowCount:d,path:b,id:`list-view-block-${x}`,"data-block":x,isExpanded:L?k:void 0,"aria-selected":!!r||P,ref:w},(0,u.createElement)(h.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:te,ref:S,"aria-label":G,"aria-selected":!!r||P,"aria-expanded":L?k:void 0,"aria-describedby":V},(e=>{let{ref:t,tabIndex:o,onFocus:l}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(Gy,{block:n,onClick:X,onToggleExpanded:ee,isSelected:r,position:s,siblingBlockCount:f,level:c,ref:t,tabIndex:o,onFocus:l,isExpanded:k,selectedClientIds:y,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:V},H))})),K&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalTreeGridCell,{className:q,withoutGridItem:!0},(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,u.createElement)(vf,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:o})})),(0,u.createElement)(h.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,u.createElement)(bf,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:o})})))),F&&(0,u.createElement)(h.__experimentalTreeGridCell,{className:Y,"aria-selected":!!r||P},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,u.createElement)(Uh,{clientIds:oe,icon:cg,label:U,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:J})})))}));function Wy(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(Ky(t,n,o),0):1}const Ky=(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+Wy(r,e,t,n):o+1},qy=()=>{};var Yy=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=qy,showBlockMovers:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:d,isExpanded:p,parentId:m,shouldShowInnerBlocks:f=!0,isSyncedBranch:h=!1}=t,v=lf(m),b=h||!(null==v||!v.isSynced),k=(0,g.useSelect)((e=>{if(!m)return!0;const t="contentOnly"===e(To).getTemplateLock(m),n=e(To).canEditBlock(m);return!t&&n}),[m]),{expandedState:_,draggedClientIds:y}=$y();if(!k)return null;const E=n.filter(Boolean),C=E.length;let S=c;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:m,innerBlocks:h}=t;n>0&&(S+=Wy(E[n-1],_,y,p));const{itemInView:v}=d,k=v(S),w=n+1,B=a.length>0?`${a}_${w}`:`${w}`,I=!(null==h||!h.length),x=I&&f?null!==(c=_[m])&&void 0!==c?c:p:void 0,T=!(null==y||!y.includes(m)),M=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(m,l),N=s||M&&I,P=T||k||M;return(0,u.createElement)(g.AsyncModeProvider,{key:m,value:!M},P&&(0,u.createElement)(jy,{block:t,selectBlock:o,isSelected:M,isBranchSelected:N,isDragged:T,level:i,position:w,rowCount:C,siblingBlockCount:C,showBlockMovers:r,path:B,isExpanded:x,listPosition:S,selectedClientIds:l,isSyncedBranch:b}),!P&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,u.createElement)(e,{parentId:m,blocks:h,selectBlock:o,showBlockMovers:r,level:i+1,path:B,listPosition:S+1,fixedListWindow:d,isBranchSelected:N,selectedClientIds:l,isExpanded:p,isSyncedBranch:b}))})))}));function Zy(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(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]),s=a||i,c=(0,u.useCallback)((()=>{if(!i)return 0;const e=s.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,s]),d=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),p=(0,u.useMemo)((()=>{if(s&&("top"===l||"bottom"===l||"inside"===l))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.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 a=o-n,u=i-r;return new window.DOMRect(n,r,a,u)}}}),[s,l,c]);return s?(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 Qy(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(To),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getBlockSelectionEnd:i,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:d}=(0,g.useSelect)(To),{getBlockType:p}=(0,g.useSelect)(a.store);return{updateBlockSelection:(0,u.useCallback)((async(i,a,u)=>{if(null==i||!i.shiftKey)return void n(a);i.preventDefault();const m="keydown"===i.type&&(i.keyCode===Qu.UP||i.keyCode===Qu.DOWN||i.keyCode===Qu.HOME||i.keyCode===Qu.END);if(!m&&!d()&&!c())return void n(a,null);const g=s(),f=[...r(a),a];m&&!g.some((e=>f.includes(e)))&&await e();let h=l(),v=a;m&&(d()||c()||(h=a),u&&(v=u));const b=r(h),k=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,k);await t(y,E,null);const C=s();if((i.keyCode===Qu.HOME||i.keyCode===Qu.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,_.sprintf)((0,_.__)("%s deselected."),e))}else S.length>1&&(w=(0,_.sprintf)((0,_.__)("%s blocks deselected."),S.length));w&&(0,pn.speak)(w)}),[e,o,p,r,l,i,s,c,d,t,n])}}const Xy=["top","bottom"];function Jy(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,g.useSelect)(To),[l,i]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=l||{},c=Nv(a,s),d=o(),p=(0,m.useThrottle)((0,u.useCallback)(((o,l)=>{const a={x:o.clientX,y:o.clientY},s=!(null==d||!d.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const a=i.element.getBoundingClientRect(),[s,c]=Lv(t,a,Xy),u=Rv(t,a);if(void 0===r||s0||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 a=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+a,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:!!s&&d.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!s||r(d,i),canInsertDraggedBlocksAsChild:!s||r(d,l)}})),a);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 eE=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var tE=(0,u.forwardRef)((function(e,t){let{id:n,blocks:o,showBlockMovers:r=!1,isExpanded:l=!1}=e;const{clientIdsTree:i,draggedClientIds:a,selectedClientIds:s}=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:c,shouldShowInnerBlocks:d}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(To),r=(null==a?void 0:a.length)>0?n(a).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[a]),{updateBlockSelection:p}=Qy(),[f,v]=(0,u.useReducer)(eE,{}),{ref:b,target:k}=Jy(),y=(0,u.useRef)(),E=(0,m.useMergeRefs)([y,b,t]),C=(0,u.useRef)(!1),{setSelectedTreeId:S}=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:s[0],setExpandedState:v}),w=(0,u.useCallback)(((e,t)=>{p(e,t),S(t)}),[S,p]);(0,u.useEffect)((()=>{C.current=!0}),[]);const[B]=(0,m.__experimentalUseFixedWindowList)(y,36,c,{useWindowing:!0,windowOverscan:40}),I=(0,u.useCallback)((e=>{e&&v({type:"expand",clientIds:[e]})}),[v]),x=(0,u.useCallback)((e=>{e&&v({type:"collapse",clientIds:[e]})}),[v]),T=(0,u.useCallback)((e=>{var t;I(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[I]),M=(0,u.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),N=(0,u.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&p(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)}),[p]),P=(0,u.useMemo)((()=>({isTreeGridMounted:C.current,draggedClientIds:a,expandedState:f,expand:I,collapse:x})),[C.current,a,f,I,x]);return(0,u.createElement)(g.AsyncModeProvider,{value:!0},(0,u.createElement)(Zy,{listViewRef:y,blockDropTarget:k}),(0,u.createElement)(h.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:E,onCollapseRow:M,onExpandRow:T,onFocusRow:N,applicationAriaLabel:(0,_.__)("Block navigation structure")},(0,u.createElement)(Uy.Provider,{value:P},(0,u.createElement)(Yy,{blocks:i,selectBlock:w,showBlockMovers:r,fixedListWindow:B,selectedClientIds:s,isExpanded:l,shouldShowInnerBlocks:d}))))}));function nE(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,u.createElement)(h.Button,c({},l,{ref:r,icon:Ry,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,_.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var oE=(0,u.forwardRef)((function(e,t){let{isDisabled:n,...o}=e;W()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const r=(0,g.useSelect)((e=>!!e(To).getBlockCount()),[])&&!n;return(0,u.createElement)(h.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:e=>{let{isOpen:n,onToggle:l}=e;return(0,u.createElement)(nE,c({},o,{innerRef:t,isOpen:n,onToggle:l,isEnabled:r}))},renderContent:()=>(0,u.createElement)("div",{className:"block-editor-block-navigation__container"},(0,u.createElement)("p",{className:"block-editor-block-navigation__label"},(0,_.__)("List view")),(0,u.createElement)(tE,null))})}));function rE(e){var t;let{genericPreviewBlock:n,style:o,className:r,activeStyle:l}=e;const i=null===(t=(0,a.getBlockType)(n.name))||void 0===t?void 0:t.example,s=Ff(r,l,o),c=(0,u.useMemo)((()=>({...n,title:o.label||o.name,description:o.description,initialAttributes:{...n.attributes,className:s+" block-editor-block-styles__block-preview-container"},example:i})),[n,s]);return(0,u.createElement)(tm,{item:c,isStylePreview:!0})}const lE=()=>{};function iE(e){let{clientId:t,onSwitch:n=lE,onHoverClassName:o=lE}=e;const{onSelect:r,stylesToRender:l,activeStyle:i,genericPreviewBlock:a,className:s}=Hf({clientId:t,onSwitch:n}),[c,d]=(0,u.useState)(null),g=(0,m.useViewportMatch)("medium","<");if(!l||0===l.length)return null;const f=(0,m.debounce)(d,250),v=e=>{var t;c!==e?(f(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):f.cancel()};return(0,u.createElement)("div",{className:"block-editor-block-styles"},(0,u.createElement)("div",{className:"block-editor-block-styles__variants"},l.map((e=>{const t=e.isDefault?(0,_.__)("Default"):e.label||e.name;return(0,u.createElement)(h.Button,{className:p()("block-editor-block-styles__item",{"is-active":i.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>v(e),onFocus:()=>v(e),onMouseLeave:()=>v(null),onBlur:()=>v(null),onClick:()=>(e=>{r(e),o(null),d(null),f.cancel()})(e),"aria-current":i.name===e.name},(0,u.createElement)(h.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!g&&(0,u.createElement)(h.Popover,{placement:"left-start",offset:20},(0,u.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>v(null)},(0,u.createElement)(rE,{activeStyle:i,className:s,genericPreviewBlock:a,style:c}))))}var aE=iE;iE.Slot=()=>(W()("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);var sE=(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.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var cE=function(e){let{icon:t=sE,label:n=(0,_.__)("Choose variation"),instructions:o=(0,_.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const a=p()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,u.createElement)(h.Placeholder,{icon:t,label:n,instructions:o,className:a},(0,u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_.__)("Block variations")},r.map((e=>(0,u.createElement)("li",{key:e.name},(0,u.createElement)(h.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),i&&(0,u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,u.createElement)(h.Button,{variant:"link",onClick:()=>l()},(0,_.__)("Skip"))))};var uE=(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-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const dE={carousel:"carousel",grid:"grid"},pE=e=>{let{onBlockPatternSelect:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,u.createElement)(h.Button,{variant:"primary",onClick:t},(0,_.__)("Choose")))},mE=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,u.createElement)(h.Button,{icon:md,label:(0,_.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,u.createElement)(h.Button,{icon:pd,label:(0,_.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var gE=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:a}=e;const s=t===dE.carousel,c=(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,u.createElement)(h.Button,{icon:bi,label:(0,_.__)("Carousel view"),onClick:()=>n(dE.carousel),isPressed:s}),(0,u.createElement)(h.Button,{icon:uE,label:(0,_.__)("Grid view"),onClick:()=>n(dE.grid),isPressed:t===dE.grid}));return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&(0,u.createElement)(mE,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),c,s&&(0,u.createElement)(pE,{onBlockPatternSelect:a}))};var fE=function(e,t,n){return(0,g.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(To),a=r(e);return n?i(a).filter(n):l(t,a)}),[e,t,n])};const hE=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r,showTitles:l}=e;const i=(0,h.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===dE.carousel){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,u.createElement)("div",{className:a},(0,u.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,u.createElement)(bE,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,u.createElement)(h.__unstableComposite,c({},i,{role:"listbox",className:a,"aria-label":(0,_.__)("Patterns list")}),o.map((e=>(0,u.createElement)(vE,{key:e.name,pattern:e,onSelect:r,composite:i,showTitles:l})))))};function vE(e){let{pattern:t,onSelect:n,composite:o,showTitles:r}=e;const l="block-editor-block-pattern-setup-list",{blocks:i,description:a,viewportWidth:s=700}=t,d=(0,m.useInstanceId)(vE,`${l}__item-description`);return(0,u.createElement)("div",{className:`${l}__list-item`,"aria-label":t.title,"aria-describedby":t.description?d:void 0},(0,u.createElement)(h.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:`${l}__item`,onClick:()=>n(i)}),(0,u.createElement)(Jp,{blocks:i,viewportWidth:s}),r&&(0,u.createElement)("div",{className:`${l}__item-title`},t.title),!!a&&(0,u.createElement)(h.VisuallyHidden,{id:d},a)))}function bE(e){let{className:t,pattern:n,minHeight:o}=e;const{blocks:r,title:l,description:i}=n,a=(0,m.useInstanceId)(bE,"block-editor-block-pattern-setup-list__item-description");return(0,u.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":l,"aria-describedby":i?a:void 0},(0,u.createElement)(Jp,{blocks:r,minHeight:o}),!!i&&(0,u.createElement)(h.VisuallyHidden,{id:a},i))}var kE=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:l=dE.carousel,showTitles:i=!1}=e;const[s,c]=(0,u.useState)(l),[d,p]=(0,u.useState)(0),{replaceBlock:m}=(0,g.useDispatch)(To),f=fE(t,n,o);if(null==f||!f.length)return null;const h=r||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));m(t,n)});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,u.createElement)(hE,{viewMode:s,activeSlide:d,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,u.createElement)(gE,{viewMode:s,setViewMode:c,activeSlide:d,totalSlides:f.length,handleNext:()=>{p((e=>e+1))},handlePrevious:()=>{p((e=>e-1))},onBlockPatternSelect:()=>{h(f[d].blocks)}})))};function _E(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;return(0,u.createElement)("fieldset",{className:t},(0,u.createElement)(h.VisuallyHidden,{as:"legend"},(0,_.__)("Transform to variation")),r.map((e=>(0,u.createElement)(h.Button,{key:e.name,icon:(0,u.createElement)(fd,{icon:e.icon,showColors:!0}),isPressed:o===e.name,label:o===e.name?e.title:(0,_.sprintf)((0,_.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function yE(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;const l=r.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}}));return(0,u.createElement)(h.DropdownMenu,{className:t,label:(0,_.__)("Transform to variation"),text:(0,_.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:df,toggleProps:{iconPosition:"right"}},(()=>(0,u.createElement)("div",{className:`${t}__container`},(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(h.MenuItemsChoice,{choices:l,value:o,onSelect:n})))))}var EE=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,g.useDispatch)(To),{activeBlockVariation:o,variations:r}=(0,g.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:o}=e(a.store),{getBlockName:r,getBlockAttributes:l}=e(To),i=t&&r(t);return{activeBlockVariation:n(i,l(t)),variations:i&&o(i,"transform")}}),[t]),l=null==o?void 0:o.name,i=(0,u.useMemo)((()=>{const e=new Set;return!!r&&(r.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===r.length)}),[r]);if(null==r||!r.length)return null;const s=i?_E:yE;return(0,u.createElement)(s,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...r.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:l,variations:r})},CE=(0,m.createHigherOrderComponent)((e=>t=>{const n=fr("color.palette"),o=!fr("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,i=!(0,f.isEmpty)(r)||!l;return(0,u.createElement)(e,c({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:i}))}),"withColorContext"),SE=CE(h.ColorPalette);function wE(e){let{onChange:t,value:n,...o}=e;return(0,u.createElement)(Ob,c({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var BE=window.wp.date;const IE=new Date(2022,0,25);function xE(e){let{format:t,defaultFormat:n,onChange:o}=e;return(0,u.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,u.createElement)(h.VisuallyHidden,{as:"legend"},(0,_.__)("Date format")),(0,u.createElement)(h.ToggleControl,{label:(0,u.createElement)(u.Fragment,null,(0,_.__)("Default format"),(0,u.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,BE.dateI18n)(n,IE))),checked:!t,onChange:e=>o(e?null:n)}),t&&(0,u.createElement)(TE,{format:t,onChange:o}))}function TE(e){var t;let{format:n,onChange:o}=e;const r=[...new Set(["Y-m-d",(0,_._x)("n/j/Y","short date format"),(0,_._x)("n/j/Y g:i A","short date format with time"),(0,_._x)("M j, Y","medium date format"),(0,_._x)("M j, Y g:i A","medium date format with time"),(0,_._x)("F j, Y","long date format"),(0,_._x)("M j","short date format without the year")])],l=r.map(((e,t)=>({key:`suggested-${t}`,name:(0,BE.dateI18n)(e,IE),format:e}))),i={key:"custom",name:(0,_.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,_.__)("Enter your own date format")},[a,s]=(0,u.useState)((()=>!!n&&!r.includes(n)));return(0,u.createElement)(h.__experimentalVStack,null,(0,u.createElement)(h.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,_.__)("Choose a format"),options:[...l,i],value:a?i:null!==(t=l.find((e=>e.format===n)))&&void 0!==t?t:i,onChange:e=>{let{selectedItem:t}=e;t===i?s(!0):(s(!1),o(t.format))}}),a&&(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,_.__)("Enter a date or time format string."),{Link:(0,u.createElement)(h.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>o(e)}))}const ME=["colors","disableCustomColors","gradients","disableCustomGradients"],NE=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:i,settings:a,title:s,showTitle:c=!0,__experimentalIsRenderedInSidebar:d,enableAlpha:v}=e;const b=(0,m.useInstanceId)(NE),{batch:k}=(0,g.useRegistry)();return(0,f.isEmpty)(n)&&(0,f.isEmpty)(o)&&r&&l&&null!=a&&a.every((e=>(0,f.isEmpty)(e.colors)&&(0,f.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,u.createElement)(h.__experimentalToolsPanel,{className:p()("block-editor-panel-color-gradient-settings",t),label:c?s:void 0,resetAll:()=>{k((()=>{a.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:o,onGradientChange:r}=e;t?o():n&&r()}))}))},panelId:b,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,u.createElement)(Vb,{settings:a,panelId:b,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalIsRenderedInSidebar:d,enableAlpha:v}),!!i&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.__experimentalSpacer,{marginY:4})," ",i))},PE=e=>{const t=pb();return(0,u.createElement)(NE,c({},t,e))};var LE=e=>ME.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(NE,e):(0,u.createElement)(PE,e);const RE=(0,u.createContext)({}),AE=()=>(0,u.useContext)(RE);function OE(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,onFinishEditing:l,onSaveImage:i,children:a}=e;const c=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,l]=(0,u.useState)(),[i,a]=(0,u.useState)(),[c,d]=(0,u.useState)({x:0,y:0}),[p,m]=(0,u.useState)(100),[g,f]=(0,u.useState)(0),h=n/o,[v,b]=(0,u.useState)(h),k=(0,u.useCallback)((()=>{const e=(g+90)%360;let n=h;if(g%180==90&&(n=1/h),0===e)return l(),f(e),b(h),void d({x:-c.y*n,y:c.x*n});const o=new window.Image;o.src=t,o.onload=function(t){const o=document.createElement("canvas");let r=0,i=0;e%180?(o.width=t.target.height,o.height=t.target.width):(o.width=t.target.width,o.height=t.target.height),90!==e&&180!==e||(r=o.width),270!==e&&180!==e||(i=o.height);const a=o.getContext("2d");a.translate(r,i),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),o.toBlob((t=>{l(URL.createObjectURL(t)),f(e),b(o.width/o.height),d({x:-c.y*n,y:c.x*n})}))};const r=(0,s.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof r&&(o.crossOrigin=r)}),[g,h]);return(0,u.useMemo)((()=>({editedUrl:r,setEditedUrl:l,crop:i,setCrop:a,position:c,setPosition:d,zoom:p,setZoom:m,rotation:g,setRotation:f,rotateClockwise:k,aspect:v,setAspect:b,defaultAspect:h})),[r,i,c,p,g,k,v,h])}({url:n,naturalWidth:o,naturalHeight:r}),d=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:a,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:d}=(0,g.useDispatch)(hm.store),[p,m]=(0,u.useState)(!1),f=(0,u.useCallback)((()=>{m(!1),c()}),[m,c]),h=(0,u.useCallback)((()=>{m(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,vy()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,_.sprintf)((0,_.__)("Could not edit image. %s"),(0,Ri.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{m(!1),c()}))}),[m,t,n,o,r,l,i,s,d,m,c]);return(0,u.useMemo)((()=>({isInProgress:p,apply:h,cancel:f})),[p,h,f])}({id:t,url:n,onSaveImage:i,onFinishEditing:l,...c}),p=(0,u.useMemo)((()=>({...c,...d})),[c,d]);return(0,u.createElement)(RE.Provider,{value:p},a)} + */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("᠎"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="᠎";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?y(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function v(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e1?arguments[1]:g,this.value=e}function b(e){var t=arguments.length>1?arguments[1]:g;return new v(e,t)}v.prototype.get=function(e){for(var t=this.value,n=0;t&&n-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),m=n(1586),y=n(817),g=n(3842),h=n(6740),v=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var b,_=n.length,k=p(e);b=k===-1/0?0:k<0?a(_+k,0):s(k,_);var E,S=void 0===t?_:p(t);E=S===-1/0?0:S<0?a(_+S,0):s(S,_);var w=a(E-b,0),C=y(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(m(n)===m(C))for(var I=h(n),A=h(C),x=f(n),B=b*x+v(n),P=v(C),T=P+w*x;P-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,C=Array.prototype.slice,I=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-I(-e):I(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var R=n(5794),F=R.custom,L=V(F)?F:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return b.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return _?M(t,E):E}if("bigint"==typeof t){var I=String(t)+"n";return _?M(t,I):I}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var F=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=C.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return F&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+Z(ie,F)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(S.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&y){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:x-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,F)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,F)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return J(G(A.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(m.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?v.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":F?fe+"{"+Z(ce,F)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return y.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+r}return D(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?t:"Object"===t&&function(e){var t=!1;return r(y,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(y,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var v,b=m.size["$"+n];if(!b)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");v=a(new l(e,t),0,b);var _=arguments.length>5?arguments[5]:"little"===y,k=_?a(f([0,0,0,0,0,0,0,0],v),-b):a(f(v,[0,0,0,0,0,0,0,0]),0,b);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),m=n(3647),y=n(7511),g=n(1520),h=n(806),v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},b={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(v,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(v));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return m(t,n);if("FLOAT64"===e)return y(t,n);var i=v[e],l=(0,b[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),m=n(7604),y=n(2367),g=n(8172),h=n(1824),v=o("Array.prototype.reverse"),b=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=b(t,0,r),n||v(t),"FLOAT32"===e?f(t):"FLOAT64"===e?m(t):y(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),m=n(2170),y=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,v){var b=d(e);if(!p(e)&&!b)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(m.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==v&&"UNORDERED"!==v&&"INIT"!==v)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=m.size["$"+n],k=arguments.length>6?arguments[6]:"little"===y,E=u(n,r,k);if(b)throw new o("SharedArrayBuffer is not supported by this implementation");var S=new l(e,t,_);g(E,(function(e,t){S[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),m=c(new i("["+["…","​","￾"].join("")+"]","g")),y=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(m(t)||f(t))return NaN;var n=y(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return na+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,m=255&(d>>=8),y=255&(d>>=8),g=255&(d>>=8);return t?[f,m,y,g]:[g,y,m,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,m="11111111111",y="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=m,r="1"+g;else if(isFinite(e))if(0===e)n=y,r="0"+g;else{e=i(e);var h,v=l(e),b=p(v),_=u(e-v);if(b)n=b.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=b+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(y+p(n+f),-11),r=c(r+g+"0",0,52)}else n=m,r="0"+g;for(var E=a+n+r,S=[],w=0;w<8;w++){S[t?8-w-1:w]=o(c(E,8*w,8*(w+1)),2)}return S}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})};var r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return mk},AlignmentToolbar:function(){return yk},Autocomplete:function(){return Ck},BlockAlignmentControl:function(){return El},BlockAlignmentToolbar:function(){return Sl},BlockBreadcrumb:function(){return Tk},BlockColorsStyleSelector:function(){return Rk},BlockContextProvider:function(){return Fl},BlockControls:function(){return Ur},BlockEdit:function(){return jl},BlockEditorKeyboardShortcuts:function(){return rI},BlockEditorProvider:function(){return Sp},BlockFormatControls:function(){return Dr},BlockIcon:function(){return hp},BlockInspector:function(){return YC},BlockList:function(){return Jh},BlockMover:function(){return ky},BlockNavigationDropdown:function(){return iE},BlockPreview:function(){return tf},BlockSelectionClearer:function(){return Cp},BlockSettingsMenu:function(){return $g},BlockSettingsMenuControls:function(){return zg},BlockStyles:function(){return cE},BlockTitle:function(){return uy},BlockToolbar:function(){return th},BlockTools:function(){return XC},BlockVerticalAlignmentControl:function(){return Li},BlockVerticalAlignmentToolbar:function(){return Di},ButtonBlockAppender:function(){return Jm},ButtonBlockerAppender:function(){return qm},ColorPalette:function(){return IE},ColorPaletteControl:function(){return AE},ContrastChecker:function(){return Gv},CopyHandler:function(){return sg},DefaultBlockAppender:function(){return $m},FontSizePicker:function(){return Tb},HeightControl:function(){return ni},InnerBlocks:function(){return Hh},Inserter:function(){return Wm},InspectorAdvancedControls:function(){return Ho},InspectorControls:function(){return Wo},JustifyContentControl:function(){return zi},JustifyToolbar:function(){return Vi},LineHeightControl:function(){return fb},MediaPlaceholder:function(){return bw},MediaReplaceFlow:function(){return dw},MediaUpload:function(){return Am},MediaUploadCheck:function(){return Im},MultiSelectScrollIntoView:function(){return oI},NavigableToolbar:function(){return Cy},ObserveTyping:function(){return sI},PanelColorSettings:function(){return _w},PlainText:function(){return eC},RichText:function(){return Qw},RichTextShortcut:function(){return rC},RichTextToolbarButton:function(){return oC},SETTINGS_DEFAULTS:function(){return E},SkipToSelectedBlock:function(){return EC},ToolSelector:function(){return aC},Typewriter:function(){return dI},URLInput:function(){return CS},URLInputButton:function(){return pC},URLPopover:function(){return gw},Warning:function(){return Vl},WritingFlow:function(){return Up},__experimentalBlockAlignmentMatrixControl:function(){return Bk},__experimentalBlockFullHeightAligmentControl:function(){return Ak},__experimentalBlockPatternSetup:function(){return kE},__experimentalBlockPatternsList:function(){return wf},__experimentalBlockVariationPicker:function(){return pE},__experimentalBlockVariationTransforms:function(){return wE},__experimentalBorderRadiusControl:function(){return cv},__experimentalColorGradientControl:function(){return Dv},__experimentalColorGradientSettingsDropdown:function(){return Vv},__experimentalDateFormatPicker:function(){return PE},__experimentalDuotoneControl:function(){return I_},__experimentalFontAppearanceControl:function(){return ub},__experimentalFontFamilyControl:function(){return Sb},__experimentalGetBorderClassesAndStyles:function(){return W_},__experimentalGetColorClassesAndStyles:function(){return K_},__experimentalGetElementClassName:function(){return _I},__experimentalGetGapCSSValue:function(){return Ii},__experimentalGetGradientClass:function(){return Av},__experimentalGetGradientObjectByGradientValue:function(){return Bv},__experimentalGetMatchingVariation:function(){return EI},__experimentalGetSpacingClassesAndStyles:function(){return Y_},__experimentalImageEditor:function(){return mS},__experimentalImageSizeControl:function(){return hS},__experimentalImageURLInputUI:function(){return bC},__experimentalInspectorPopoverHeader:function(){return hI},__experimentalLayoutStyle:function(){return ul},__experimentalLetterSpacingControl:function(){return a_},__experimentalLibrary:function(){return tI},__experimentalLinkControl:function(){return lw},__experimentalLinkControlSearchInput:function(){return qS},__experimentalLinkControlSearchItem:function(){return MS},__experimentalLinkControlSearchResults:function(){return jS},__experimentalListView:function(){return rE},__experimentalPanelColorGradientSettings:function(){return RE},__experimentalPreviewOptions:function(){return _C},__experimentalPublishDateTimePicker:function(){return vI},__experimentalRecursionProvider:function(){return mI},__experimentalResponsiveBlockControl:function(){return nC},__experimentalSpacingSizesControl:function(){return Co},__experimentalTextDecorationControl:function(){return Jb},__experimentalTextTransformControl:function(){return r_},__experimentalUnitControl:function(){return sC},__experimentalUseBlockOverlayActive:function(){return rp},__experimentalUseBlockPreview:function(){return nf},__experimentalUseBorderProps:function(){return $_},__experimentalUseColorProps:function(){return J_},__experimentalUseCustomSides:function(){return Ei},__experimentalUseGradient:function(){return Tv},__experimentalUseHasRecursion:function(){return yI},__experimentalUseMultipleOriginColorsAndGradients:function(){return mv},__experimentalUseResizeCanvas:function(){return kC},__experimentaluseLayoutClasses:function(){return M_},__experimentaluseLayoutStyles:function(){return R_},__unstableBlockNameContext:function(){return eh},__unstableBlockSettingsMenuFirstItem:function(){return Ag},__unstableBlockToolbarLastItem:function(){return og},__unstableDuotoneFilter:function(){return Jd},__unstableDuotoneStylesheet:function(){return Kd},__unstableDuotoneUnsetStylesheet:function(){return qd},__unstableEditorStyles:function(){return Wd},__unstableGetValuesFromColors:function(){return $d},__unstableIframe:function(){return Vp},__unstableInserterMenuExtension:function(){return Om},__unstablePresetDuotoneFilter:function(){return Yd},__unstableRichTextInputEvent:function(){return iC},__unstableUseBlockSelectionClearer:function(){return wp},__unstableUseClipboardHandler:function(){return ag},__unstableUseMouseMoveTypingReset:function(){return lI},__unstableUseTypewriter:function(){return pI},__unstableUseTypingObserver:function(){return aI},createCustomColorsHOC:function(){return rk},getColorClassName:function(){return fv},getColorObjectByAttributeValues:function(){return pv},getColorObjectByColorValue:function(){return dv},getComputedFluidTypographyValue:function(){return Fb},getFontSize:function(){return xb},getFontSizeClass:function(){return Pb},getFontSizeObjectByValue:function(){return Bb},getGradientSlugByValue:function(){return Pv},getGradientValueBySlug:function(){return xv},getPxFromCssUnit:function(){return OI},getTypographyClassesAndStyles:function(){return Q_},privateApis:function(){return MA},store:function(){return xr},storeConfig:function(){return Ar},transformStyles:function(){return Vd},useBlockDisplayInformation:function(){return sy},useBlockEditContext:function(){return Nr},useBlockProps:function(){return op},useCachedTruthy:function(){return Z_},useInnerBlocksProps:function(){return Gh},useSetting:function(){return yo},withColorContext:function(){return CE},withColors:function(){return ok},withFontSizes:function(){return ak}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Qt},__experimentalGetAllowedBlocks:function(){return Bt},__experimentalGetAllowedPatterns:function(){return Nt},__experimentalGetBlockListSettingsForBlocks:function(){return jt},__experimentalGetDirectInsertBlock:function(){return Pt},__experimentalGetGlobalBlocksByName:function(){return se},__experimentalGetLastBlockAttributeChanges:function(){return Gt},__experimentalGetParsedPattern:function(){return Tt},__experimentalGetPatternTransformItems:function(){return Ft},__experimentalGetPatternsByBlockTypes:function(){return Rt},__experimentalGetReusableBlockTitle:function(){return zt},__unstableGetBlockWithoutInnerBlocks:function(){return te},__unstableGetClientIdWithClientIdsTree:function(){return re},__unstableGetClientIdsTree:function(){return oe},__unstableGetContentLockingParent:function(){return tn},__unstableGetEditorMode:function(){return $t},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ge},__unstableGetTemporarilyEditingAsBlocks:function(){return nn},__unstableGetVisibleBlocks:function(){return en},__unstableHasActiveBlockOverlayActive:function(){return rn},__unstableIsFullySelected:function(){return Ue},__unstableIsLastBlockChangeIgnored:function(){return Vt},__unstableIsSelectionCollapsed:function(){return je},__unstableIsSelectionMergeable:function(){return Ve},__unstableIsWithinBlockOverlay:function(){return on},__unstableSelectionHasUnmergeableBlock:function(){return ze},areInnerBlocksControlled:function(){return Yt},canEditBlock:function(){return vt},canInsertBlockType:function(){return dt},canInsertBlocks:function(){return ft},canLockBlockType:function(){return bt},canMoveBlock:function(){return gt},canMoveBlocks:function(){return ht},canRemoveBlock:function(){return mt},canRemoveBlocks:function(){return yt},didAutomaticChange:function(){return qt},getAdjacentBlockClientId:function(){return Ce},getAllowedBlocks:function(){return xt},getBlock:function(){return ee},getBlockAttributes:function(){return X},getBlockCount:function(){return pe},getBlockHierarchyRootClientId:function(){return Se},getBlockIndex:function(){return We},getBlockInsertionPoint:function(){return it},getBlockListSettings:function(){return Lt},getBlockMode:function(){return Ze},getBlockName:function(){return Q},getBlockNamesByClientId:function(){return ue},getBlockOrder:function(){return He},getBlockParents:function(){return ke},getBlockParentsByBlockName:function(){return Ee},getBlockRootClientId:function(){return _e},getBlockSelectionEnd:function(){return ye},getBlockSelectionStart:function(){return me},getBlockTransformItems:function(){return It},getBlocks:function(){return ne},getBlocksByClientId:function(){return ce},getClientIdsOfDescendants:function(){return ie},getClientIdsWithDescendants:function(){return le},getDraggedBlockClientIds:function(){return tt},getFirstMultiSelectedBlockClientId:function(){return Oe},getGlobalBlockCount:function(){return ae},getInserterItems:function(){return Ct},getLastMultiSelectedBlockClientId:function(){return Ne},getLowestCommonAncestorWithSelectedBlock:function(){return we},getMultiSelectedBlockClientIds:function(){return Pe},getMultiSelectedBlocks:function(){return Te},getMultiSelectedBlocksEndClientId:function(){return De},getMultiSelectedBlocksStartClientId:function(){return Le},getNextBlockClientId:function(){return Ae},getPatternsByBlockTypes:function(){return Mt},getPreviousBlockClientId:function(){return Ie},getSelectedBlock:function(){return be},getSelectedBlockClientId:function(){return ve},getSelectedBlockClientIds:function(){return Be},getSelectedBlockCount:function(){return ge},getSelectedBlocksInitialCaretPosition:function(){return xe},getSelectionEnd:function(){return fe},getSelectionStart:function(){return de},getSettings:function(){return Dt},getTemplate:function(){return st},getTemplateLock:function(){return ct},hasBlockMovingClientId:function(){return Kt},hasInserterItems:function(){return At},hasMultiSelection:function(){return Je},hasSelectedBlock:function(){return he},hasSelectedInnerBlock:function(){return Ke},isAncestorBeingDragged:function(){return rt},isAncestorMultiSelected:function(){return Fe},isBlockBeingDragged:function(){return nt},isBlockHighlighted:function(){return Jt},isBlockInsertionPointVisible:function(){return lt},isBlockMultiSelected:function(){return Re},isBlockSelected:function(){return $e},isBlockValid:function(){return Z},isBlockVisible:function(){return Xt},isBlockWithinSelection:function(){return qe},isCaretWithinFormattedText:function(){return ot},isDraggingBlocks:function(){return et},isFirstMultiSelectedBlock:function(){return Me},isLastBlockChangePersistent:function(){return Ut},isMultiSelecting:function(){return Ye},isNavigationMode:function(){return Wt},isSelectionEnabled:function(){return Qe},isTyping:function(){return Xe},isValidTemplate:function(){return at},wasBlockJustInserted:function(){return Zt}});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:function(){return an},hideBlockInterface:function(){return sn},showBlockInterface:function(){return cn}});var o={};n.r(o),n.d(o,{getLastInsertedBlocksClientIds:function(){return pn},isBlockInterfaceHidden:function(){return un}});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:function(){return Hn},__unstableExpandSelection:function(){return $n},__unstableMarkAutomaticChange:function(){return pr},__unstableMarkLastChangeAsPersistent:function(){return cr},__unstableMarkNextChangeAsNotPersistent:function(){return ur},__unstableSaveReusableBlock:function(){return sr},__unstableSetEditorMode:function(){return fr},__unstableSetTemporarilyEditingAsBlocks:function(){return Er},__unstableSplitSelection:function(){return Wn},clearSelectedBlock:function(){return xn},duplicateBlocks:function(){return yr},enterFormattedText:function(){return nr},exitFormattedText:function(){return rr},flashBlock:function(){return br},hideInsertionPoint:function(){return zn},insertAfterBlock:function(){return hr},insertBeforeBlock:function(){return gr},insertBlock:function(){return Dn},insertBlocks:function(){return Un},insertDefaultBlock:function(){return ir},mergeBlocks:function(){return Kn},moveBlockToPosition:function(){return Ln},moveBlocksDown:function(){return Mn},moveBlocksToPosition:function(){return Fn},moveBlocksUp:function(){return Rn},multiSelect:function(){return An},receiveBlocks:function(){return bn},removeBlock:function(){return Jn},removeBlocks:function(){return qn},replaceBlock:function(){return On},replaceBlocks:function(){return Tn},replaceInnerBlocks:function(){return Yn},resetBlocks:function(){return gn},resetSelection:function(){return vn},selectBlock:function(){return En},selectNextBlock:function(){return wn},selectPreviousBlock:function(){return Sn},selectionChange:function(){return or},setBlockMovingClientId:function(){return mr},setBlockVisibility:function(){return kr},setHasControlledInnerBlocks:function(){return _r},setNavigationMode:function(){return dr},setTemplateValidity:function(){return Vn},showInsertionPoint:function(){return jn},startDraggingBlocks:function(){return er},startMultiSelect:function(){return Cn},startTyping:function(){return Zn},stopDraggingBlocks:function(){return tr},stopMultiSelect:function(){return In},stopTyping:function(){return Xn},synchronizeTemplate:function(){return Gn},toggleBlockHighlight:function(){return vr},toggleBlockMode:function(){return Qn},toggleSelection:function(){return Bn},updateBlock:function(){return kn},updateBlockAttributes:function(){return _n},updateBlockListSettings:function(){return lr},updateSettings:function(){return ar},validateBlocksToTemplate:function(){return hn}});var l={};n.r(l),n.d(l,{GlobalStylesContext:function(){return jI},useGlobalSetting:function(){return GI},useGlobalStyle:function(){return HI},useGlobalStylesOutput:function(){return rA},useGlobalStylesReset:function(){return VI}});var a=window.wp.blocks,s=window.wp.hooks;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),S(o,e.slice(t,t+r),n)}const C=e=>e;function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,r=[];return n.set(t,r),e.forEach((e=>{const{clientId:t,innerBlocks:o}=e;r.push(t),I(o,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],r=[[t,e]];for(;r.length;){const[e,t]=r.shift();t.forEach((t=>{let{innerBlocks:o,...i}=t;n.push([i.clientId,e]),null!=o&&o.length&&r.push([i.clientId,o])}))}return n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;const n=[],r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n.push([o.clientId,t(o)])}return n}function B(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...r}=n.shift();n.push(...e),t[r.clientId]=!0}return t}function P(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function T(e){return x(e,(e=>e.attributes))}function O(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&b()(e.clientIds,t.clientIds)&&function(e,t){return b()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function N(e,t){const n=e.tree,r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n.set(e.clientId,{});for(const t of o)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.tree,o=new Set([]),i=new Set;for(const r of t){let t=n?r:e.parents.get(r);do{if(e.controlledInnerBlocks[t]){i.add(t);break}o.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of o)r.set(e,{...r.get(e)});for(const t of o)r.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>r.get(e)));for(const t of i)r.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>r.get(e)))})}const R=(0,f.pipe)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,o)=>{const{name:i}=t.byClientId.get(o);"core/block"===i&&n.ref===e&&t.attributes.set(o,{...n,ref:r})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":r.tree=new Map(r.tree),N(r,n.blocks),M(r,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(n.clientId,{...r.tree.get(n.clientId),...r.byClientId.get(n.clientId),attributes:r.attributes.get(n.clientId)}),M(r,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":r.tree=new Map(r.tree),n.clientIds.forEach((e=>{r.tree.set(e,{...r.tree.get(e),attributes:r.attributes.get(e)})})),M(r,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(n.blocks);r.tree=new Map(r.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),N(r,n.blocks),M(r,n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!r.byClientId.get(t.parents.get(e))||o.push(t.parents.get(e));M(r,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents.get(o)||""!==t.parents.get(o)&&!r.byClientId.get(t.parents.get(o))||e.push(t.parents.get(o));r.tree=new Map(r.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),M(r,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=new Map(r.tree),M(r,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=new Map(r.tree),M(r,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];r.attributes.forEach(((t,o)=>{"core/block"===r.byClientId.get(o).name&&t.ref===n.updatedId&&e.push(o)})),r.tree=new Map(r.tree),e.forEach((e=>{r.tree.set(e,{...r.byClientId.get(e),attributes:r.attributes.get(e),innerBlocks:r.tree.get(e).innerBlocks})})),M(r,e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order.get(n.rootClientId)&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(n.rootClientId)}));let i=o;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const o=new Map(i.order);Object.keys(r).forEach((e=>{t.order.get(e)&&o.set(e,t.order.get(e))})),i.order=o,i.tree=new Map(i.tree),Object.keys(r).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(P(n.blocks)),attributes:new Map(T(n.blocks)),order:I(n.blocks),parents:new Map(A(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),N(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!O(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...r}=t.updates;if(0===Object.values(r).length)return e;const o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...r}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let r=!1;const o=new Map(e);for(const i of t.clientIds){var n;const l=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===l.length)continue;let a=!1;const s=e.get(i),c={};l.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),r=r||a,a&&o.set(i,{...s,...c})}return r?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const r=I(t.blocks),o=new Map(e);return r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(r[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e.get(n)||[],o=I(t.blocks,n),{index:i=r.length}=t,l=new Map(e);return o.forEach(((e,t)=>{l.set(t,e)})),l.set(n,S(r,o.get(n),i)),l}case"MOVE_BLOCKS_TO_POSITION":{var r,o;const{fromRootClientId:n="",toRootClientId:i="",clientIds:l}=t,{index:a=e.get(i).length}=t;if(n===i){const t=e.get(i).indexOf(l[0]),n=new Map(e);return n.set(i,w(e.get(i),t,a,l.length)),n}const s=new Map(e);return s.set(n,null!==(r=null===(o=e.get(n))||void 0===o?void 0:o.filter((e=>!l.includes(e))))&&void 0!==r?r:[]),s.set(i,S(e.get(i),l,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e.get(r);if(!i.length||o===i[0])return e;const l=i.indexOf(o),a=new Map(e);return a.set(r,w(i,l,l-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e.get(r);if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o),s=new Map(e);return s.set(r,w(l,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=I(t.blocks),o=new Map(e);return t.replacedClientIds.forEach((e=>{o.delete(e)})),r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...r.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);o.set(t,i)})),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,r)=>{var o;const i=null!==(o=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==o?o:[];i.length!==e.length&&n.set(r,i)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks,t.rootClientId||"").forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var L=(0,m.combineReducers)({blocks:R,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:F(o.selectionStart,i),selectionEnd:F(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...r}=e;return r}return e}return b()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:r,__unstableWithInserter:o,operation:i}=t,l={rootClientId:n,index:r,__unstableWithInserter:o,operation:i};return b()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,m.select)(a.store).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const r=n.blocks.map((e=>e.clientId));return{clientIds:r,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}}),D={};function U(e){return[e]}function j(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r(r,o)=>{let i,l;if("function"==typeof e?(i=e(r),l=e(o)):(i=r[e],l=o[e]),i>l)return"asc"===n?1:-1;if(l>i)return"asc"===n?-1:1;const a=t.findIndex((e=>e===r)),s=t.findIndex((e=>e===o));return a>s?1:s>a?-1:0};function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(q(t,e,n))}const Y=[];function Q(e,t){const n=e.blocks.byClientId.get(t),r="core/social-link";if("web"!==u.Platform.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes.get(t),{service:o}=null!=n?n:{};return o?`core/social-link-${o}`:r}return n?n.name:null}function Z(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function X(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ee(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const te=z(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:X(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function ne(e,t){var n;const r=t&&Yt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(r))||void 0===n?void 0:n.innerBlocks)||Y}const re=z(((e,t)=>({clientId:t,innerBlocks:oe(e,t)})),(e=>[e.blocks.order])),oe=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return He(e,t).map((t=>re(e,t)))}),(e=>[e.blocks.order])),ie=z(((e,t)=>{const n=[];for(const r of t)for(const t of He(e,r))n.push(t,...ie(e,[t]));return n}),(e=>[e.blocks.order])),le=z((e=>{const t=[];for(const n of He(e))t.push(n,...ie(e,[n]));return t}),(e=>[e.blocks.order])),ae=z(((e,t)=>{const n=le(e);return t?n.reduce(((n,r)=>e.blocks.byClientId.get(r).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),se=z(((e,t)=>{if(!t)return Y;const n=le(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:Y}),(e=>[e.blocks.order,e.blocks.byClientId])),ce=z(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ee(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ue=z(((e,t)=>ce(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ce(e,t)));function pe(e,t){return He(e,t).length}function de(e){return e.selection.selectionStart}function fe(e){return e.selection.selectionEnd}function me(e){return e.selection.selectionStart.clientId}function ye(e){return e.selection.selectionEnd.clientId}function ge(e){const t=Pe(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function be(e){const t=ve(e);return t?ee(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ke=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents.get(o);)o=e.blocks.parents.get(o),r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),Ee=z((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ke(e,t,r);return o.map((t=>({id:t,name:Q(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function Se(e,t){let n,r=t;do{n=r,r=e.blocks.parents.get(r)}while(r);return n}function we(e,t){const n=ve(e),r=[...ke(e,t),t],o=[...ke(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?Oe(e):Ne(e)),!t)return null;const r=_e(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o.get(r),l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function Ie(e,t){return Ce(e,t,-1)}function Ae(e,t){return Ce(e,t,1)}function xe(e){return e.initialPosition}const Be=z((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return Y;if(t.clientId===n.clientId)return[t.clientId];const r=_e(e,t.clientId);if(null===r)return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?Y:Be(e)}const Te=z((e=>{const t=Pe(e);return t.length?t.map((t=>ee(e,t))):Y}),(e=>[...Be.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Oe(e){return Pe(e)[0]||null}function Ne(e){const t=Pe(e);return t[t.length-1]||null}function Me(e,t){return Oe(e)===t}function Re(e,t){return-1!==Pe(e).indexOf(t)}const Fe=z(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=_e(e,n),r=Re(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ue(e){const t=de(e),n=fe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function je(e){const t=de(e),n=fe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function ze(e){return Be(e).some((t=>{const n=Q(e,t);return!(0,a.getBlockType)(n).merge}))}function Ve(e,t){const n=de(e),r=fe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=_e(e,n.clientId);if(o!==_e(e,r.clientId))return!1;const i=He(e,o);let l,s;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,s=n):(l=n,s=r);const c=t?s.clientId:l.clientId,u=t?l.clientId:s.clientId,p=Q(e,c);if(!(0,a.getBlockType)(p).merge)return!1;const d=ee(e,u);if(d.name===p)return!0;const f=(0,a.switchToBlockType)(d,p);return f&&f.length}const Ge=e=>{const t=de(e),n=fe(e);if(t.clientId===n.clientId)return Y;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return Y;const r=_e(e,t.clientId);if(r!==_e(e,n.clientId))return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[s,c]=i>l?[n,t]:[t,n],u=ee(e,s.clientId),p=(0,a.getBlockType)(u.name),d=ee(e,c.clientId),f=(0,a.getBlockType)(d.name),m=u.attributes[s.attributeKey],y=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let v=(0,H.create)({html:m,...K(g)}),b=(0,H.create)({html:y,...K(h)});return v=(0,H.remove)(v,0,s.offset),b=(0,H.remove)(b,c.offset,b.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,H.toHTMLString)({value:v,...K(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,H.toHTMLString)({value:b,...K(h)})}}]};function He(e,t){return e.blocks.order.get(t||"")||Y}function We(e,t){return He(e,_e(e,t)).indexOf(t)}function $e(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return He(e,t).some((t=>$e(e,t)||Re(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Pe(e),r=n.indexOf(t);return r>-1&&rnt(e,t)))}function ot(){return $()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const it=z((e=>{let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=_e(e,i)||void 0,n=We(e,o.clientId)+1):n=He(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function lt(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,r,o;return t?null!==(n=null===(r=Lt(e,t))||void 0===r?void 0:r.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},pt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:o}=Dt(e),i=ut(o,t,!0);if(!i)return!1;const l=!!ct(e,r);if(l)return!1;const c=Lt(e,r);if(r&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,p=ut(u,t),d=n.parent,f=Q(e,r),m=ut(d,f);let y=!0;const g=n.ancestor;if(g){y=[r,...ke(e,r)].some((t=>ut(g,Q(e,t))))}const h=y&&(null===p&&null===m||!0===p||!0===m);return h?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,r,{getBlock:ee.bind(null,e),getBlockParentsByBlockName:Ee.bind(null,e)}):h},dt=z(pt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>dt(e,Q(e,t),n)))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return!0;const{lock:o}=r,i=!!ct(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function yt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>mt(e,t,n)))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return;const{lock:o}=r,i="all"===ct(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>gt(e,t,n)))}function vt(e,t){const n=X(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function bt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function _t(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const kt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&pt(e,t.name,n),Et=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=_t(e,r)||{};return{...t,id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:St(o,i)}},St=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},wt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(o=ce(e,le(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:i,count:l=0}=_t(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:St(i,l)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},Ct=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=wt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=G;if("web"===u.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=(0,a.getBlockType)(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=_t(e,o)||{},s=St(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=(0,a.getBlockTypes)().filter((n=>kt(e,n,t))).map(n),l=pt(e,"core/block",t)?Ht(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=Et(e,n);t.push(...r.map(o))}return t}),[]),c=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=s.reduce(c,{core:[],noncore:[]}),f=[...p,...d];return[...f,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),It=z((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=Array.isArray(t)?t:[t],[i]=o,l=wt(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>kt(e,t,r))).map(l),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,_.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return J(u,(e=>c[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),At=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,a.getBlockTypes)().some((n=>kt(e,n,t)));if(n)return!0;const r=pt(e,"core/block",t)&&Ht(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),xt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,a.getBlockTypes)().filter((n=>kt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),Bt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),xt(e,t)}),((e,t)=>[...xt.getDependants(e,t)])),Pt=z((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(ee(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Tt=z(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Ot=z((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Dt(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Tt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Nt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ot(e),r=n.filter((n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return dt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Mt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;const r=Nt(e,n),o=Array.isArray(t)?t:[t],i=r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}));return 0===i.length?Y:i}),((e,t,n)=>[...Nt.getDependants(e,n)])),Rt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Mt(e,t,n)}),((e,t,n)=>[...Nt.getDependants(e,n)])),Ft=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Yt(e,n)})))return Y;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Mt(e,r,n)}),((e,t,n)=>[...Mt.getDependants(e,n)]));function Lt(e,t){return e.blockListSettings[t]}function Dt(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}const jt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),zt=z(((e,t)=>{var n;const r=Ht(e).find((e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Ht(e)]));function Vt(e){return e.blocks.isIgnoredChange}function Gt(e){return e.lastBlockAttributesChange}function Ht(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Y}function Wt(e){return"navigation"===e.editorMode}function $t(e){return e.editorMode}function Kt(e){return e.hasBlockMovingClientId}function qt(e){return!!e.automaticChangeStatus}function Jt(e,t){return e.highlightedBlock===t}function Yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Qt=z(((e,t)=>{if(!t.length)return null;const n=ve(e);if(t.includes(Q(e,n)))return n;const r=Pe(e),o=Ee(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Zt(e,t,n){var r;const{lastBlockInserted:o}=e;return(null===(r=o.clientIds)||void 0===r?void 0:r.includes(t))&&o.source===n}function Xt(e,t){var n,r;return null===(n=null===(r=e.blockVisibility)||void 0===r?void 0:r[t])||void 0===n||n}const en=z((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),tn=z(((e,t)=>{let n,r=t;for(;e.blocks.parents.has(r);)r=e.blocks.parents.get(r),r&&"contentOnly"===ct(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function nn(e){return e.temporarilyEditingAsBlocks}function rn(e,t){if(!vt(e,t))return!0;const n=$t(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const r=(0,a.hasBlockSupport)(Q(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Yt(e,t))&&!$e(e,t)&&!Ke(e,t,!0)}function on(e,t){let n=e.blocks.parents.get(t);for(;n;){if(rn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ln=["inserterMediaCategories","blockInspectorAnimation"];function an(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===u.Platform.OS){n={};for(const t in e)ln.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function sn(){return{type:"HIDE_BLOCK_INTERFACE"}}function cn(){return{type:"SHOW_BLOCK_INTERFACE"}}function un(e){return e.isBlockInterfaceHidden}function pn(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}var dn=window.wp.a11y;const fn="†";function mn(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(fn)}))}const yn=e=>Array.isArray(e)?e:[e],gn=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(hn(e))},hn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||(0,a.doBlocksMatchTemplate)(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function bn(e){return $()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function _n(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yn(e),attributes:t,uniqueByBlock:n}}function kn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:r,dispatch:o}=n;const i=r.getPreviousBlockClientId(e);if(i)o.selectBlock(i,-1);else if(t){const t=r.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}}},wn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Cn(){return{type:"START_MULTI_SELECT"}}function In(){return{type:"STOP_MULTI_SELECT"}}const An=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,dn.speak)((0,_.sprintf)((0,_._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function xn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Pn(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,a.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const Tn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=yn(e),t=Pn(yn(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function On(e,t){return Tn(e,t)}const Nn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:yn(t),rootClientId:n})},Mn=Nn("MOVE_BLOCKS_DOWN"),Rn=Nn("MOVE_BLOCKS_UP"),Fn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return Fn([e],t,n,r)}function Dn(e,t,n,r,o){return Un([e],t,n,r,0,o)}const Un=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,$()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Pn(yn(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function jn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r,operation:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:o}}const zn=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Vn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Gn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),o=t.getTemplate(),i=(0,a.synchronizeBlocksWithTemplate)(r,o);n.resetBlocks(i)},Hn=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const s=r.getBlockRootClientId(i.clientId);if(s!==r.getBlockRootClientId(l.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(i.clientId)>c.indexOf(l.clientId)?(u=l,p=i):(u=i,p=l);const d=e?p:u,f=r.getBlock(d.clientId),m=(0,a.getBlockType)(f.name);if(!m.merge)return;const y=u,g=p,h=r.getBlock(y.clientId),v=(0,a.getBlockType)(h.name),b=r.getBlock(g.clientId),_=(0,a.getBlockType)(b.name),k=h.attributes[y.attributeKey],E=b.attributes[g.attributeKey],S=v.attributes[y.attributeKey],w=_.attributes[g.attributeKey];let C=(0,H.create)({html:k,...K(S)}),I=(0,H.create)({html:E,...K(w)});C=(0,H.remove)(C,y.offset,C.text.length),I=(0,H.insert)(I,fn,0,g.offset);const A=(0,a.cloneBlock)(h,{[y.attributeKey]:(0,H.toHTMLString)({value:C,...K(S)})}),x=(0,a.cloneBlock)(b,{[g.attributeKey]:(0,H.toHTMLString)({value:I,...K(w)})}),B=e?A:x,P=h.name===b.name?[B]:(0,a.switchToBlockType)(B,m.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=m.merge(e.attributes,x.attributes)}else{const e=P.shift();T=m.merge(A.attributes,e.attributes)}const O=mn(T),N=T[O],M=(0,H.create)({html:N,...K(m.attributes[O])}),R=M.text.indexOf(fn),F=(0,H.remove)(M,R,R+1),L=(0,H.toHTMLString)({value:F,...K(m.attributes[O])});T[O]=L;const D=r.getSelectedBlockClientIds(),U=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{o.selectionChange(f.clientId,O,R,R),o.replaceBlocks(D,U,0,r.getSelectedBlocksInitialCaretPosition())}))},Wn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let s,c;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(s=o,c=r):(s=r,c=o);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,a.getBlockType)(d.name),m=t.getBlock(p.clientId),y=(0,a.getBlockType)(m.name),g=d.attributes[u.attributeKey],h=m.attributes[p.attributeKey],v=f.attributes[u.attributeKey],b=y.attributes[p.attributeKey];let _=(0,H.create)({html:g,...K(v)}),k=(0,H.create)({html:h,...K(b)});_=(0,H.remove)(_,u.offset,_.text.length),k=(0,H.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,H.toHTMLString)({value:_,...K(v)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...m,attributes:{...m.attributes,[p.attributeKey]:(0,H.toHTMLString)({value:k,...K(b)})}}],1,t.getSelectedBlocksInitialCaretPosition())},$n=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Kn=(e,t)=>n=>{let{registry:r,select:o,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[s,c]=l,u=o.getBlock(s),p=(0,a.getBlockType)(u.name);if(!p)return;const d=o.getBlock(c);if(p&&!p.merge){const e=(0,a.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void r.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,s),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,a.getBlockType)(d.name),{clientId:m,attributeKey:y,offset:g}=o.getSelectionStart(),h=(m===s?p:f).attributes[y],v=(m===s||m===c)&&void 0!==y&&void 0!==g&&!!h;h||("number"==typeof y?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof y):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,a.cloneBlock)(u),_=(0,a.cloneBlock)(d);if(v){const e=m===s?b:_,t=e.attributes[y],n=(0,H.insert)((0,H.create)({html:t,...K(h)}),fn,g,g);e.attributes[y]=(0,H.toHTMLString)({value:n,...K(h)})}const k=u.name===d.name?[_]:(0,a.switchToBlockType)(_,u.name);if(!k||!k.length)return;const E=p.merge(b.attributes,k[0].attributes);if(v){const e=mn(E),t=E[e],n=(0,H.create)({html:t,...K(p.attributes[e])}),r=n.text.indexOf(fn),o=(0,H.remove)(n,r,r+1),l=(0,H.toHTMLString)({value:o,...K(p.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,r,r)}i.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...E}},...k.slice(1)],0)},qn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=yn(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0],t),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function Jn(e,t){return qn([e],t)}function Yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Qn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Zn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function er(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function tr(){return{type:"STOP_DRAGGING_BLOCKS"}}function nr(){return $()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function rr(){return $()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function or(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const ir=(e,t,n)=>r=>{let{dispatch:o}=r;const i=(0,a.getDefaultBlockName)();if(!i)return;const l=(0,a.createBlock)(i,e);return o.insertBlock(l,n,t)};function lr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ar(e){return an(e,!0)}function sr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function cr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ur(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const pr=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},dr=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},fr=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,dn.speak)((0,_.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,dn.speak)((0,_.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,dn.speak)((0,_.__)("You are currently in zoom-out mode."))},mr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,dn.speak)((0,_.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},yr=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if(i.some((e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=yn(e),u=r.getBlockIndex(c[c.length-1]),p=i.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(p,u+1,s,t),p.length>1&&t&&o.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},gr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},hr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function vr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const br=e=>async t=>{let{dispatch:n}=t;n(vr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(vr(e,!1))};function _r(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function kr(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Er(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const Sr="core/block-editor";var wr=window.wp.privateApis;const{lock:Cr,unlock:Ir}=(0,wr.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),Ar={reducer:L,selectors:e,actions:i},xr=(0,m.createReduxStore)(Sr,{...Ar,persist:["preferences"]}),Br=(0,m.registerStore)(Sr,{...Ar,persist:["preferences"]});Ir(Br).registerPrivateActions(t),Ir(Br).registerPrivateSelectors(o);const Pr={name:"",isSelected:!1},Tr=(0,u.createContext)(Pr),{Provider:Or}=Tr;function Nr(){return(0,u.useContext)(Tr)}function Mr(){const{isSelected:e,clientId:t,name:n}=Nr();return(0,m.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(xr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function Rr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=Mr(),{clientId:r}=Nr(),o=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(xr),{hasBlockSupport:i}=e(a.store);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=h[e])||void 0===i?void 0:i.Fill:o?h.parent.Fill:null}(t,o);return i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(i,null,(e=>{const o=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,u.createElement)(g.ToolbarGroup,{controls:n}),r)}))):null}function Fr(e){let{group:t="default",...n}=e;const r=(0,u.useContext)(g.__experimentalToolbarContext),o=h[t].Slot,i=(0,g.__experimentalUseSlotFills)(o.__unstableName);return Boolean(i&&i.length)?"default"===t?(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r})):(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Lr=Rr;Lr.Slot=Fr;const Dr=e=>(0,u.createElement)(Rr,c({group:"inline"},e));Dr.Slot=e=>(0,u.createElement)(Fr,c({group:"inline"},e));var Ur=Lr;var jr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var zr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Vr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Gr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Hr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var Wr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 $r=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function qr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Kr(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Jr(e){const{contentSize:t,wideSize:n,type:r="default"}=e,o={},i=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return i.test(t)&&"constrained"===r&&(o.none=(0,_.sprintf)((0,_.__)("Max %s wide"),t)),i.test(n)&&(o.wide=(0,_.sprintf)((0,_.__)("Max %s wide"),n)),o}const Yr=(0,u.createContext)({refs:new Map,callbacks:new Map});function Qr(e){let{children:t}=e;const n=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,u.createElement)(Yr.Provider,{value:n},t)}function Zr(e){const{refs:t,callbacks:n}=(0,u.useContext)(Yr),r=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,f.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Xr(e){const{refs:t}=(0,u.useContext)(Yr),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function eo(e){const{callbacks:t}=(0,u.useContext)(Yr),n=Xr(e),[r,o]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function to(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function no(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ro(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const oo={all:(0,_.__)("All sides"),top:(0,_.__)("Top"),bottom:(0,_.__)("Bottom"),left:(0,_.__)("Left"),right:(0,_.__)("Right"),mixed:(0,_.__)("Mixed"),vertical:(0,_.__)("Vertical"),horizontal:(0,_.__)("Horizontal")},io={top:void 0,right:void 0,bottom:void 0,left:void 0},lo=["top","right","bottom","left"];function ao(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function so(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lo;return Object.values(e).length>=1&&Object.values(e).length1}function co(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}var uo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));const po=["color","border","dimensions","typography","spacing"],fo={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},mo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function yo(e){const{name:t,clientId:n}=Nr();return(0,m.useSelect)((r=>{if(po.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==o)return o;const i=(e=>mo[e]||e)(e),l=[n,...r(xr).getBlockParents(n,!0)];for(const e of l){const n=r(xr).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=r(xr).getBlockAttributes(e);if(o=null!==(c=(0,y.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==c?c:(0,y.get)(n,`settings.${i}`),void 0!==o)break}}const u=r(xr).getSettings();if(void 0===o){var p;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(p=(0,y.get)(u,n))&&void 0!==p?p:(0,y.get)(u,e)}var d,f;if(void 0!==o)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(f=o.custom)&&void 0!==f?f:o.theme)&&void 0!==d?d:o.default:o;const m=fo[i]?fo[i](u):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,n,e])}const go={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function ho(e){var t,n,r,o,i;let{spacingSizes:l,value:a,side:s,onChange:c,isMixed:p=!1,type:f,minimumCustomValue:y,onMouseOver:h,onMouseOut:v}=e;a=function(e,t){if(to(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(a,l);let b=l;const k=l.length<=8,E=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[S,w]=(0,u.useState)(!E&&void 0!==a&&!to(a)),C=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]});let I=null;!k&&!S&&void 0!==a&&(!to(a)||to(a)&&p)?(b=[...l,{name:p?(0,_.__)("Mixed"):(0,_.sprintf)((0,_.__)("Custom (%s)"),a),slug:"custom",size:a}],I=b.length-1):p||(I=S?function(e,t){if(!to(e))return e;const n=ro(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}(a,l):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ro(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(a,l));const A=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||C[0].value,x=e=>{var t;return void 0===a||null===(t=l[e])||void 0===t?void 0:t.name},B=parseFloat(I,10),P=(e,t)=>{var n;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(n=l[e])||void 0===n?void 0:n.slug}`},T=p?(0,_.__)("Mixed"):null,O=p?(0,_.__)("Mixed"):x(I),N=b.map(((e,t)=>({key:t,name:e.name}))),M=l.map(((e,t)=>({value:t,label:void 0}))),R=(0,_.sprintf)((0,_.__)("%1$s %2$s"),oo[s],null==f?void 0:f.toLowerCase()),F=k&&!S&&void 0!==O;return(0,u.createElement)(u.Fragment,null,"all"!==s&&(0,u.createElement)(g.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},oo[s]),F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},O)),"all"===s&&F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},O),!E&&(0,u.createElement)(g.Button,{label:S?(0,_.__)("Use size preset"):(0,_.__)("Set custom size"),icon:uo,onClick:()=>{w(!S)},isPressed:S,isSmall:!0,className:d()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalUnitControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:C,min:y,placeholder:T,disableUnits:p,label:R,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,value:B,min:0,max:null!==(t=null===(n=go[A])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(r=null===(o=go[A])||void 0===o?void 0:o.steps)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{c([e,A].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),k&&!S&&(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,className:"components-spacing-sizes-control__range-control",value:I,onChange:e=>c(P(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===a&&c("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":null===(i=l[I])||void 0===i?void 0:i.name,renderTooltipContent:x,min:0,max:l.length-1,marks:M,label:R,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:h,onBlur:v}),!k&&!S&&(0,u.createElement)(g.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:N.find((e=>e.key===I))||"",onChange:e=>{c(P(e.selectedItem.key,"selectList"))},options:N,label:R,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v}))}function vo(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao(Object.values(e))}(n),p=co(n)&&so(n,r);return(0,u.createElement)(ho,{value:c,onChange:e=>{const o=(0,g.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:p,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})}function bo(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=null!=n&&n.length?lo.filter((e=>n.includes(e))):lo,p=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,u.createElement)(u.Fragment,null,c.map((e=>(0,u.createElement)(ho,{value:t[e],label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:p(e),spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}))))}const _o=["vertical","horizontal"];function ko(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},p=null!=r&&r.length?_o.filter((e=>r.includes(e))):_o;return(0,u.createElement)(u.Fragment,null,p.map((e=>{const t="vertical"===e?n.top:n.left;return(0,u.createElement)(ho,{value:t,onChange:c(e),label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})})))}var Eo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 So=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));function wo(e){let{isLinked:t,onClick:n}=e;const r=t?(0,_.__)("Unlink sides"):(0,_.__)("Link sides");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,u.createElement)(g.Button,{isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r,onClick:n})))}function Co(e){let{inputProps:t,onChange:n,label:r=(0,_.__)("Spacing Control"),values:o,sides:i,splitOnAxis:l=!1,useSelect:a,minimumCustomValue:s=0,onMouseOver:p,onMouseOut:f}=e;const m=[{name:0,slug:"0",size:0},...yo("spacing.spacingSizes")||[]];m.length>8&&m.unshift({name:(0,_.__)("Default"),slug:"default",size:void 0});const y=o||io,h=co(o),v=1===(null==i?void 0:i.length),[b,k]=(0,u.useState)(!h||!so(y,i)||v),E={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:m,useSelect:a,type:r,minimumCustomValue:s,onMouseOver:p,onMouseOut:f};return(0,u.createElement)("fieldset",{className:d()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},r),!v&&(0,u.createElement)(wo,{onClick:()=>{k(!b)},isLinked:b}),b&&(0,u.createElement)(vo,c({"aria-label":r},E)),!b&&l&&(0,u.createElement)(ko,E),!b&&!l&&(0,u.createElement)(bo,E))}window.wp.warning;const Io=(0,g.createSlotFill)("InspectorControls"),Ao=(0,g.createSlotFill)("InspectorAdvancedControls"),xo=(0,g.createSlotFill)("InspectorControlsBorder"),Bo=(0,g.createSlotFill)("InspectorControlsColor"),Po=(0,g.createSlotFill)("InspectorControlsDimensions"),To=(0,g.createSlotFill)("InspectorControlsPosition"),Oo=(0,g.createSlotFill)("InspectorControlsTypography");var No={default:Io,advanced:Ao,border:xo,color:Bo,dimensions:Po,list:(0,g.createSlotFill)("InspectorControlsListView"),settings:Io,styles:(0,g.createSlotFill)("InspectorControlsStyles"),typography:Oo,position:To};function Mo(e){var t;let{children:n,group:r="default",__experimentalGroup:o}=e;o&&($()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=o);const i=Mr(),l=null===(t=No[r])||void 0===t?void 0:t.Fill;return l?i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(l,null,(e=>{const t=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolsPanelContext.Provider,{value:t},n)}))):null:("undefined"!=typeof process&&process.env,null)}const Ro=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,y.mapValues)(e,Ro)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,y.isEmpty)(t)?void 0:t};function Fo(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,Fo(n)]})))}:e}function Lo(e,t,n){const r=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),o=e?Fo(e):{};return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),o),o}function Do(e,t,n,r,o,i){var l;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,y.get)(a,e);t&&(c={...c,attributes:Lo(c.attributes,e,t)})}))})),c}function Uo(e,t,n){const r=(0,a.getBlockSupport)(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function jo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,m.useDispatch)(xr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,m.useSelect)(xr),c=a(),p=(0,u.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?l():[c];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Ro(o.style)},t[n]=o})),o(n,t,!0)}),[Ro,i,l,s,c,o]);return(0,u.createElement)(g.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function zo(e){let{Slot:t,...n}=e;const r=(0,u.useContext)(g.__experimentalToolsPanelContext);return(0,u.createElement)(t,c({},n,{fillProps:r,bubblesVirtually:!0}))}function Vo(e){var t;let{__experimentalGroup:n,group:r="default",label:o,...i}=e;n&&($()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=n);const l=null===(t=No[r])||void 0===t?void 0:t.Slot,a=(0,g.__experimentalUseSlot)(null==l?void 0:l.__unstableName),s=(0,g.__experimentalUseSlotFills)(null==l?void 0:l.__unstableName);if(!l||!a)return"undefined"!=typeof process&&process.env,null;return Boolean(s&&s.length)?o?(0,u.createElement)(jo,{group:r,label:o},(0,u.createElement)(zo,c({},i,{Slot:l}))):(0,u.createElement)(l,c({},i,{bubblesVirtually:!0})):null}const Go=Mo;Go.Slot=Vo;const Ho=e=>(0,u.createElement)(Mo,c({},e,{group:"advanced"}));Ho.Slot=e=>(0,u.createElement)(Vo,c({},e,{group:"advanced"})),Ho.slotName="InspectorAdvancedControls";var Wo=Go,$o=window.wp.isShallowEqual,Ko=n.n($o);var qo=function(e){return(0,f.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const Jo=Number.MAX_SAFE_INTEGER;var Yo=(0,u.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:l=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:p=!0,...m}=e;const y=eo(n),h=eo(null!=r?r:n),v=(0,f.useMergeRefs)([t,qo(s)]),[b,_]=(0,u.useReducer)((e=>(e+1)%Jo),0);(0,u.useLayoutEffect)((()=>{if(!y)return;const e=new window.MutationObserver(_);return e.observe(y,{attributes:!0}),()=>{e.disconnect()}}),[y]);const k=(0,u.useMemo)((()=>b<0||!y||h!==y?{}:{position:"absolute",width:y.offsetWidth,height:y.offsetHeight}),[y,h,i,b]),E=(0,u.useMemo)((()=>{if(!(b<0||!y||r&&!h))return{getBoundingClientRect(){var e,t,n,r;const o=y.getBoundingClientRect(),i=null==h?void 0:h.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:y.ownerDocument}}),[r,h,y,b]);return!y||r&&!h?null:(0,u.createElement)(g.Popover,c({ref:v,animate:!1,focusOnMount:!1,anchor:E,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:p},m,{className:d()("block-editor-block-popover",m.className),variant:"unstyled"}),l&&(0,u.createElement)("div",{style:k},o),!l&&o)}));function Qo(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.margin)}function Zo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.margin"),n=!Si(e,"margin");return!Qo(e)||t||n}function Xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"margin"),d=p&&p.some((e=>vi.includes(e)));if(Zo(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:!1,onMouseOver:l,onMouseOut:a})),native:null})}function ei(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,a=(0,u.useMemo)((()=>{const e=null!=l&&l.top?no(null==l?void 0:l.top):0,t=null!=l&&l.right?no(null==l?void 0:l.right):0,n=null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,r=null!=l&&l.left?no(null==l?void 0:l.left):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`calc(${e} * -1)`:0,right:t?`calc(${t} * -1)`:0,bottom:n?`calc(${n} * -1)`:0,left:r?`calc(${r} * -1)`:0}}),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}const ti={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function ni(e){var t,n,r,o,i;let{label:l=(0,_.__)("Height"),onChange:a,value:s}=e;const c=parseFloat(s),p=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vh","vw"]}),d=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s)),[s])[1]||(null===(t=p[0])||void 0===t?void 0:t.value)||"px";return(0,u.createElement)("fieldset",{className:"block-editor-height-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},l),(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalUnitControl,{value:s,units:p,onChange:a,onUnitChange:e=>{const[t,n]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s);["em","rem"].includes(e)&&"px"===n?a((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?a(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&a(100+e)},min:0,size:"__unstable-large"})),(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalSpacer,{marginX:2,marginBottom:0},(0,u.createElement)(g.RangeControl,{value:c,min:0,max:null!==(n=null===(r=ti[d])||void 0===r?void 0:r.max)&&void 0!==n?n:100,step:null!==(o=null===(i=ti[d])||void 0===i?void 0:i.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{a([e,d].join(""))},__nextHasNoMarginBottom:!0})))))}function ri(e){const t=(0,a.getBlockSupport)(e,yi);return!!(!0===t||null!=t&&t.minHeight)}function oi(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("dimensions.minHeight");return!ri(e)||t}function ii(e){var t;const{attributes:{style:n},setAttributes:r}=e;if(oi(e))return null;return(0,u.createElement)(ni,{label:(0,_.__)("Min. height"),value:null==n||null===(t=n.dimensions)||void 0===t?void 0:t.minHeight,onChange:e=>{const t={...n,dimensions:{...null==n?void 0:n.dimensions,minHeight:e}};r({style:Ro(t)})}})}function li(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.padding)}function ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.padding"),n=!Si(e,"padding");return!li(e)||t||n}function si(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"padding"),d=p&&p.some((e=>vi.includes(e)));if(ai(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a})),native:null})}function ci(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,a=(0,u.useMemo)((()=>({borderTopWidth:null!=l&&l.top?no(null==l?void 0:l.top):0,borderRightWidth:null!=l&&l.right?no(null==l?void 0:l.right):0,borderBottomWidth:null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,borderLeftWidth:null!=l&&l.left?no(null==l?void 0:l.left):0})),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function ui(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,_.__)("Stretch to fill available space."):"fixed"===e?"horizontal"===n?(0,_.__)("Specify a fixed width."):(0,_.__)("Specify a fixed height."):(0,_.__)("Fit contents.")}function pi(e){let{attributes:t,setAttributes:n,__unstableParentLayout:r}=e;const{style:o={}}=t,{layout:i={}}=o,{selfStretch:l,flexSize:a}=i;return(0,u.useEffect)((()=>{"fixed"!==l||a||n({style:{...o,layout:{...i,selfStretch:"fit"}}})}),[]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:mi(r),value:l||"fit",help:ui(l,r),onChange:e=>{const t="fixed"!==e?null:a;n({style:{...o,layout:{...i,selfStretch:e,flexSize:t}}})},isBlock:!0},(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,_.__)("Fit")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,_.__)("Fill")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,_.__)("Fixed")})),"fixed"===l&&(0,u.createElement)(g.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{n({style:{...o,layout:{...i,flexSize:e}}})},value:a}))}function di(e){let{__unstableParentLayout:t={}}=e;const{type:n="default",default:{type:r="default"}={},allowSizingOnChildren:o=!1}=t;return("flex"===r||"flex"===n)&&o}function fi(e){const t=!yo("layout");return!di(e)||t}function mi(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,_.__)("Width"):(0,_.__)("Height")}const yi="dimensions",gi="spacing",hi=["top","right","bottom","left"],vi=["vertical","horizontal"];function bi(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:r}=Ir((0,m.useDispatch)(xr));return{isMouseOver:e,onMouseOver:e=>{e.stopPropagation(),n(),t(!0)},onMouseOut:e=>{e.stopPropagation(),r(),t(!1)}}}function _i(e){const t=Ai(e),n=ai(e),r=Zo(e),o=oi(e),i=fi(e),l=ki(e),s=function(e){if("web"!==u.Platform.OS)return!1;const{name:t}=e;return wi(t)||ri(t)||li(t)||Qo(t)||di(e)}(e),p=yo("spacing.spacingSizes"),f=bi(),m=bi();if(l||!s)return null;const y=(0,a.getBlockSupport)(e.name,[yi,"__experimentalDefaultControls"]),h=(0,a.getBlockSupport)(e.name,[gi,"__experimentalDefaultControls"]),v=(e,t)=>n=>{var r;return{...n,style:{...n.style,[t]:{...null===(r=n.style)||void 0===r?void 0:r[t],[e]:void 0}}}},b=d()({"tools-panel-item-spacing":p&&p.length>0}),{__unstableParentLayout:k}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,{group:"dimensions"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,_.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:v("padding","spacing"),isShownByDefault:null==h?void 0:h.padding,panelId:e.clientId},(0,u.createElement)(si,c({onMouseOver:f.onMouseOver,onMouseOut:f.onMouseOut},e))),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,_.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:v("margin","spacing"),isShownByDefault:null==h?void 0:h.margin,panelId:e.clientId},(0,u.createElement)(Xo,c({onMouseOver:m.onMouseOver,onMouseOut:m.onMouseOut},e))),!t&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,_.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:v("blockGap","spacing"),isShownByDefault:null==h?void 0:h.blockGap,panelId:e.clientId},(0,u.createElement)(xi,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.dimensions)||void 0===n?void 0:n.minHeight)}(e),label:(0,_.__)("Min. height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,dimensions:{...null==r?void 0:r.dimensions,minHeight:void 0}})})}(e),resetAllFilter:v("minHeight","dimensions"),isShownByDefault:null==y?void 0:y.minHeight,panelId:e.clientId},(0,u.createElement)(ii,e)),!i&&(0,u.createElement)(g.__experimentalVStack,{as:g.__experimentalToolsPanelItem,spacing:2,hasValue:()=>function(e){var t;return void 0!==(null===(t=e.attributes.style)||void 0===t?void 0:t.layout)}(e),label:mi(k),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,layout:void 0}})}(e),resetAllFilter:v("selfStretch","layout"),isShownByDefault:!1,panelId:e.clientId},(0,u.createElement)(pi,e))),!n&&(0,u.createElement)(ci,c({forceShow:f.isMouseOver},e)),!r&&(0,u.createElement)(ei,c({forceShow:m.isMouseOver},e)))}const ki=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ai(e),n=oi(e),r=ai(e),o=Zo(e),i=fi(e);return t&&n&&r&&o&&i};function Ei(e,t){var n;const r=(0,a.getBlockSupport)(e,gi);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Si(e,t){const n=Ei(e,t);return!(n&&n.some((e=>hi.includes(e)))&&n.some((e=>vi.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function wi(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.blockGap)}function Ci(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Ii(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Ci(e);if(!n)return null;const r=no(null==n?void 0:n.top)||t,o=no(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function Ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.blockGap");return!wi(e)||t}function xi(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=yo("spacing.spacingSizes"),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),s=Ei(o,"blockGap"),c=Xr(n);if(Ai(e))return null;const p=s&&s.some((e=>vi.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Ci(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:Ro(o)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;c.current&&l&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},f=Ci(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),m=p?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:{top:null==f?void 0:f.top};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,u.createElement)(g.__experimentalBoxControl,{label:(0,_.__)("Block spacing"),min:0,onChange:d,units:a,sides:s,values:m,allowReset:!1,splitOnAxis:p}):(0,u.createElement)(g.__experimentalUnitControl,{label:(0,_.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:a,value:m})),(null==l?void 0:l.length)>0&&(0,u.createElement)(Co,{values:m,onChange:d,label:(0,_.__)("Block spacing"),sides:p?s:["top"],units:a,allowReset:!1,splitOnAxis:p})),native:null})}const Bi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Pi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ti=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Oi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Ni=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Mi={top:{icon:Ti,title:(0,_._x)("Align top","Block vertical alignment setting")},center:{icon:Pi,title:(0,_._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Bi,title:(0,_._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Oi,title:(0,_._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ni,title:(0,_._x)("Space between","Block vertical alignment setting")}},Ri=["top","center","bottom"];var Fi=function(e){let{value:t,onChange:n,controls:r=Ri,isCollapsed:o=!0,isToolbar:i}=e;const l=Mi[t],a=Mi.top,s=i?g.ToolbarGroup:g.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{variant:"toolbar"}};return(0,u.createElement)(s,c({icon:l?l.icon:a.icon,label:(0,_._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Mi[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const Li=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!1})),Di=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!0})),Ui={left:jr,center:zr,right:Vr,"space-between":Gr,stretch:Hr};var ji=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:l}=e;const a=e=>{r(e===o?void 0:e)},s=o?Ui[o]:Ui.left,p=[{name:"left",icon:jr,title:(0,_.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:zr,title:(0,_.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:Vr,title:(0,_.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:Gr,title:(0,_.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")},{name:"stretch",icon:Hr,title:(0,_.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>a("stretch")}],d=l?g.ToolbarGroup:g.ToolbarDropdownMenu,f=l?{isCollapsed:n}:{};return(0,u.createElement)(d,c({icon:s,popoverProps:i,label:(0,_.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},f))};const zi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!1})),Vi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!0})),Gi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Hi={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Wi={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},$i=["wrap","nowrap"];var Ki={name:"flex",label:(0,_.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(Ji,{layout:t,onChange:n})),(0,u.createElement)(g.FlexItem,null,o&&(0,u.createElement)(Qi,{layout:t,onChange:n}))),(0,u.createElement)(Yi,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Ji,{layout:t,onChange:n,isToolbar:!0}),o&&(0,u.createElement)(qi,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Uo(l,"spacing","blockGap")?Ii(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=Gi[o.justifyContent],d=$i.includes(o.flexWrap)?o.flexWrap:"wrap",f=Wi[o.verticalAlignment],m=Hi[o.justifyContent]||Hi.left;let y="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(f&&g.push(`justify-content: ${f}`),g.push("flex-direction: column"),g.push(`align-items: ${m}`)),g.length&&(y=`${Kr(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(y+=qr(r,s,"flex",u)),y},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function qi(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{orientation:o="horizontal"}=t,i="horizontal"===o?Wi.center:Wi.top,{verticalAlignment:l=i}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,u.createElement)(Li,{onChange:a,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,_.__)("Align items top")},{value:"center",label:(0,_.__)("Align items center")},{value:"flex-end",label:(0,_.__)("Align items bottom")}];return(0,u.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,u.createElement)("legend",null,(0,_.__)("Vertical alignment")),(0,u.createElement)("div",null,s.map(((e,t,n)=>(0,u.createElement)(g.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>a(e)})))))}function Ji(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===i?a.push("space-between"):a.push("stretch"),r)return(0,u.createElement)(zi,{allowedControls:a,value:o,onChange:l,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}];return"horizontal"===i?s.push({value:"space-between",icon:Gr,label:(0,_.__)("Space between items")}):s.push({value:"stretch",icon:Hr,label:(0,_.__)("Stretch items")}),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})})))}function Yi(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,u.createElement)(g.ToggleControl,{label:(0,_.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Qi(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal",verticalAlignment:o,justifyContent:i}=t;return(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,_.__)("Orientation"),value:r,onChange:e=>{let r=o,l=i;return"horizontal"===e?("space-between"===o&&(r="center"),"stretch"===i&&(l="left")):("stretch"===o&&(r="top"),"space-between"===i&&(l="left")),n({...t,orientation:e,verticalAlignment:r,justifyContent:l})}},(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:Wr,value:"horizontal",label:(0,_.__)("Horizontal")}),(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:$r,value:"vertical",label:(0,_.__)("Vertical")}))}var Zi={name:"default",label:(0,_.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Ii(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";Uo(o,"spacing","blockGap")||(null!=a&&a.top?s=Ii(null==a?void 0:a.top):"string"==typeof a&&(s=Ii(a)));let c="";return i&&s&&(c+=qr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e,t){const n=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:o}=e;t&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:n.wide})}return r.unshift({name:"none",info:n.none}),r}};var Xi=function(e){let{icon:t,size:n=24,...r}=e;return(0,u.cloneElement)(t,{width:n,height:n,...r})};var el=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var tl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),nl=window.wp.styleEngine,rl={name:"constrained",label:(0,_.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}],a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,u.createElement)(Xi,{icon:el})),(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,u.createElement)(Xi,{icon:tl}))),(0,u.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,_.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Ii(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";Uo(l,"spacing","blockGap")||(null!=d&&d.top?f=Ii(null==d?void 0:d.top):"string"==typeof d&&(f=Ii(d)));const m="left"===p?"0 !important":"auto !important",y="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${m};\n\t\t\t\t\t\tmargin-right: ${y};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${m}; }`:"right"===p&&(g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${y}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,nl.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=qr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const ol=[Zi,Ki,rl];function il(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ol.find((t=>t.name===e))}const ll={type:"default"},al=(0,u.createContext)(ll),sl=al.Provider;function cl(){return(0,u.useContext)(al)}function ul(e){let{layout:t={},css:n,...r}=e;const o=il(t.type),i=null!==yo("spacing.blockGap");if(o){var l;if(n)return(0,u.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,u.createElement)("style",null,e)}return null}const pl=[],dl=["none","left","center","right","wide","full"],fl=["wide","full"];function ml(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dl;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),o=cl(),i=il(null==o?void 0:o.type),l=i.getAlignments(o,r);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?pl:t}if("default"!==i.name&&"constrained"!==i.name)return pl;const{alignments:a=dl}=o,s=e.filter((e=>(o.alignments||t||!fl.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?pl:s}var yl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var gl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var hl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var vl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const bl={none:{icon:yl,title:(0,_._x)("None","Alignment option")},left:{icon:gl,title:(0,_.__)("Align left")},center:{icon:el,title:(0,_.__)("Align center")},right:{icon:hl,title:(0,_.__)("Align right")},wide:{icon:tl,title:(0,_.__)("Wide width")},full:{icon:vl,title:(0,_.__)("Full width")}},_l={variant:"toolbar"};var kl=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const l=ml(r);if(!!!l.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=bl[t],p=bl.none,f=o?g.ToolbarGroup:g.ToolbarDropdownMenu,m={icon:s?s.icon:p.icon,label:(0,_.__)("Align")},y=o?{isCollapsed:i,controls:l.map((e=>{let{name:n}=e;return{...bl[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,_.__)("Change alignment")},popoverProps:_l,children:e=>{let{onClose:n}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=bl[r],s=r===t||!t&&"none"===r;return(0,u.createElement)(g.MenuItem,{key:r,icon:i,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,u.createElement)(f,c({},m,y))};const El=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!1})),Sl=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!0})),wl=["left","center","right","wide","full"],Cl=["wide","full"];function Il(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?wl.filter((t=>e.includes(t))):!0===e?[...wl]:[],!r||!0===e&&!n?t.filter((e=>!Cl.includes(e))):t}const Al=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,u.createElement)(e,t),{name:r}=t,o=ml(Il((0,a.getBlockSupport)(r,"align"),(0,a.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!o.length||i)return n;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(El,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=(0,a.getBlockType)(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:o})),n)}),"withToolbarControls"),xl=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=ml(Il((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===o)return(0,u.createElement)(e,t);let l=t.wrapperProps;return i.some((e=>e.name===o))&&(l={...l,"data-align":o}),(0,u.createElement)(e,c({},t,{wrapperProps:l}))}));(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...wl,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",xl),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Al),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Il((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=d()(`align${r}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Bl=/[\s#]/g,Pl={type:"string",source:"attribute",attribute:"id",selector:"*"};const Tl=(0,f.createHigherOrderComponent)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===u.Platform.OS,r=(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,_.__)("HTML anchor"),help:(0,u.createElement)(u.Fragment,null,(0,_.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/page-jumps/")},(0,_.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,_.__)("Add an anchor"),onChange:e=>{e=e.replace(Bl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&(0,u.createElement)(Wo,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Heading settings")},r)))}return(0,u.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Pl}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Tl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ol={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ol}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Nl=(0,f.createHigherOrderComponent)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),(0,u.createElement)(Wo,{group:"advanced"},(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,_.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,_.__)("Separate multiple classes with spaces.")}))):(0,u.createElement)(e,t)),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Nl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var Ml=window.wp.dom;const Rl=(0,u.createContext)({});function Fl(e){let{value:t,children:n}=e;const r=(0,u.useContext)(Rl),o=(0,u.useMemo)((()=>({...r,...t})),[r,t]);return(0,u.createElement)(Rl.Provider,{value:o,children:n})}var Ll=Rl;const Dl={};var Ul=(0,g.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,a.getBlockType)(n),o=(0,u.useContext)(Ll),i=(0,u.useMemo)((()=>r&&r.usesContext?Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return r.usesContext.includes(t)}))):Dl),[r,o]);if(!r)return null;const l=r.edit||r.save;if(r.apiVersion>1)return(0,u.createElement)(l,c({},e,{context:i}));const s=(0,a.hasBlockSupport)(r,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,p=d()(s,t.className,e.className);return(0,u.createElement)(l,c({},e,{context:i,className:p}))}));function jl(e){const{name:t,isSelected:n,clientId:r,attributes:o={},__unstableLayoutClassNames:i}=e,{layout:l=null}=o,s={name:t,isSelected:n,clientId:r,layout:(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?l:null,__unstableLayoutClassNames:i};return(0,u.createElement)(Or,{value:(0,u.useMemo)((()=>s),Object.values(s))},(0,u.createElement)(Ul,e))}var zl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vl=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,u.createElement)("div",{style:{display:"contents",all:"initial"}},(0,u.createElement)("div",{className:d()(t,"block-editor-warning")},(0,u.createElement)("div",{className:"block-editor-warning__contents"},(0,u.createElement)("p",{className:"block-editor-warning__message"},r),(u.Children.count(n)>0||o)&&(0,u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,((e,t)=>(0,u.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,u.createElement)(g.DropdownMenu,{className:"block-editor-warning__secondary",icon:zl,label:(0,_.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,u.createElement)(g.MenuGroup,null,o.map(((e,t)=>(0,u.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Gl=n(1973);function Hl(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,u.createElement)("div",{className:l},(0,u.createElement)("div",{className:"block-editor-block-compare__content"},(0,u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,u.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(r)))),(0,u.createElement)("div",{className:"block-editor-block-compare__action"},(0,u.createElement)(g.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var Wl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=(s=o(t),(Array.isArray(s)?s:[s]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const c=(p=t.originalContent,f=l,(0,Gl.Kx)(p,f).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,u.createElement)("span",{key:t,className:n},e.value)})));var p,f;return(0,u.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,u.createElement)(Hl,{title:(0,_.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,_.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,u.createElement)(Hl,{title:(0,_.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:l}))};const $l=e=>(0,a.rawHandler)({HTML:e.originalContent});var Kl=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(xr).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(xr);return{convertToClassic(){r(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,$l(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,a.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!(0,a.getBlockType)("core/html"),s=!!(0,a.getBlockType)("core/freeform"),[c,p]=(0,u.useState)(!1),d=(0,u.useCallback)((()=>p(!0)),[]),f=(0,u.useCallback)((()=>p(!1)),[]),m=(0,u.useMemo)((()=>[{title:(0,_._x)("Resolve","imperative verb"),onClick:d},l&&{title:(0,_.__)("Convert to HTML"),onClick:t},s&&{title:(0,_.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[d,l,t,s,r]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vl,{actions:[(0,u.createElement)(g.Button,{key:"recover",onClick:o,variant:"primary"},(0,_.__)("Attempt Block Recovery"))],secondaryActions:m},(0,_.__)("This block contains unexpected or invalid content.")),c&&(0,u.createElement)(g.Modal,{title:(0,_.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},(0,u.createElement)(Wl,{block:i,onKeep:t,onConvert:n,convertor:$l,convertButtonText:(0,_.__)("Convert to Blocks")})))}));const ql=(0,u.createElement)(Vl,{className:"block-editor-block-list__block-crash-warning"},(0,_.__)("This block has encountered an error and cannot be previewed."));var Jl=()=>ql;class Yl extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Ql=Yl,Zl=n(773);var Xl=function(e){let{clientId:t}=e;const[n,r]=(0,u.useState)(""),o=(0,m.useSelect)((e=>e(xr).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(xr);return(0,u.useEffect)((()=>{r((0,a.getBlockContent)(o))}),[o]),(0,u.createElement)(Zl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(o.name);if(!e)return;const l=(0,a.getBlockAttributes)(e,n,o.attributes),s=n||(0,a.getSaveContent)(e,l),[c]=n?(0,a.validateBlock)({...o,attributes:l,originalContent:s}):[!0];i(t,{attributes:l,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ea=n(9196),ta=n.n(ea),na=Object.defineProperty,ra={};((e,t)=>{for(var n in t)na(e,n,{get:t[n],enumerable:!0})})(ra,{assign:()=>Fa,colors:()=>Na,createStringInterpolator:()=>Ba,skipAnimation:()=>Ma,to:()=>Pa,willAdvance:()=>Ra});var oa=_a(),ia=e=>ga(e,oa),la=_a();ia.write=e=>ga(e,la);var aa=_a();ia.onStart=e=>ga(e,aa);var sa=_a();ia.onFrame=e=>ga(e,sa);var ca=_a();ia.onFinish=e=>ga(e,ca);var ua=[];ia.setTimeout=(e,t)=>{const n=ia.now()+t,r=()=>{const e=ua.findIndex((e=>e.cancel==r));~e&&ua.splice(e,1),ma-=~e?1:0},o={time:n,handler:e,cancel:r};return ua.splice(pa(n),0,o),ma+=1,ha(),o};var pa=e=>~(~ua.findIndex((t=>t.time>e))||~ua.length);ia.cancel=e=>{aa.delete(e),sa.delete(e),ca.delete(e),oa.delete(e),la.delete(e)},ia.sync=e=>{ya=!0,ia.batchedUpdates(e),ya=!1},ia.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ia.onStart(n)}return r.handler=e,r.cancel=()=>{aa.delete(n),t=null},r};var da="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ia.use=e=>da=e,ia.now="undefined"!=typeof performance?()=>performance.now():Date.now,ia.batchedUpdates=e=>e(),ia.catch=console.error,ia.frameLoop="always",ia.advance=()=>{"demand"!==ia.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ba()};var fa=-1,ma=0,ya=!1;function ga(e,t){ya?(t.delete(e),e(0)):(t.add(e),ha())}function ha(){fa<0&&(fa=0,"demand"!==ia.frameLoop&&da(va))}function va(){~fa&&(da(va),ia.batchedUpdates(ba))}function ba(){const e=fa;fa=ia.now();const t=pa(fa);t&&(ka(ua.splice(0,t),(e=>e.handler())),ma-=t),ma?(aa.flush(),oa.flush(e?Math.min(64,fa-e):16.667),sa.flush(),la.flush(),ca.flush()):fa=-1}function _a(){let e=new Set,t=e;return{add(n){ma+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ma-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ma-=t.size,ka(t,(t=>t(n)&&e.add(t))),ma+=e.size,t=e)}}}function ka(e,t){e.forEach((e=>{try{t(e)}catch(e){ia.catch(e)}}))}function Ea(){}var Sa={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function wa(e,t){if(Sa.arr(e)){if(!Sa.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ia(e,t,n){if(Sa.arr(e))for(let r=0;rSa.und(e)?[]:Sa.arr(e)?e:[e];function xa(e,t){if(e.size){const n=Array.from(e);e.clear(),Ca(n,t)}}var Ba,Pa,Ta=(e,...t)=>xa(e,(e=>e(...t))),Oa=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Na=null,Ma=!1,Ra=Ea,Fa=e=>{e.to&&(Pa=e.to),e.now&&(ia.now=e.now),void 0!==e.colors&&(Na=e.colors),null!=e.skipAnimation&&(Ma=e.skipAnimation),e.createStringInterpolator&&(Ba=e.createStringInterpolator),e.requestAnimationFrame&&ia.use(e.requestAnimationFrame),e.batchedUpdates&&(ia.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ra=e.willAdvance),e.frameLoop&&(ia.frameLoop=e.frameLoop)},La=new Set,Da=[],Ua=[],ja=0,za={get idle(){return!La.size&&!Da.length},start(e){ja>e.priority?(La.add(e),ia.onStart(Va)):(Ga(e),ia(Wa))},advance:Wa,sort(e){if(ja)ia.onFrame((()=>za.sort(e)));else{const t=Da.indexOf(e);~t&&(Da.splice(t,1),Ha(e))}},clear(){Da=[],La.clear()}};function Va(){La.forEach(Ga),La.clear(),ia(Wa)}function Ga(e){Da.includes(e)||Ha(e)}function Ha(e){Da.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Da,(t=>t.priority>e.priority)),0,e)}function Wa(e){const t=Ua;for(let n=0;n0}var $a="[-+]?\\d*\\.?\\d+",Ka=$a+"%";function qa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ja=new RegExp("rgb"+qa($a,$a,$a)),Ya=new RegExp("rgba"+qa($a,$a,$a,$a)),Qa=new RegExp("hsl"+qa($a,Ka,Ka)),Za=new RegExp("hsla"+qa($a,Ka,Ka,$a)),Xa=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,es=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ts=/^#([0-9a-fA-F]{6})$/,ns=/^#([0-9a-fA-F]{8})$/;function rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function os(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rs(o,r,e+1/3),l=rs(o,r,e),a=rs(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function is(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ls(e){return(parseFloat(e)%360+360)%360/360}function as(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ss(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ts.exec(e))?parseInt(t[1]+"ff",16)>>>0:Na&&void 0!==Na[e]?Na[e]:(t=Ja.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|255)>>>0:(t=Ya.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|as(t[4]))>>>0:(t=Xa.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ns.exec(e))?parseInt(t[1],16)>>>0:(t=es.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qa.exec(e))?(255|os(ls(t[1]),ss(t[2]),ss(t[3])))>>>0:(t=Za.exec(e))?(os(ls(t[1]),ss(t[2]),ss(t[3]))|as(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var us=(e,t,n)=>{if(Sa.fun(e))return e;if(Sa.arr(e))return us({range:e,output:t,extrapolate:n});if(Sa.str(e.output[0]))return Ba(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ps=1.70158,ds=1.525*ps,fs=ps+1,ms=2*Math.PI/3,ys=2*Math.PI/4.5,gs=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>fs*e*e*e-ps*e*e,easeOutBack:e=>1+fs*Math.pow(e-1,3)+ps*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-ds)/2:(Math.pow(2*e-2,2)*((ds+1)*(2*e-2)+ds)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ms),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ms)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ys)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ys)/2+1,easeInBounce:e=>1-gs(1-e),easeOutBounce:gs,easeInOutBounce:e=>e<.5?(1-gs(1-2*e))/2:(1+gs(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},vs=Symbol.for("FluidValue.get"),bs=Symbol.for("FluidValue.observers"),_s=e=>Boolean(e&&e[vs]),ks=e=>e&&e[vs]?e[vs]():e,Es=e=>e[bs]||null;function Ss(e,t){const n=e[bs];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ws=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Cs(this,e)}},Cs=(e,t)=>Bs(e,vs,t);function Is(e,t){if(e[vs]){let n=e[bs];n||Bs(e,bs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[bs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[bs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var xs,Bs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ps=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ts=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Os=new RegExp(`(${Ps.source})(%|[a-z]+)`,"i"),Ns=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ms=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Rs=e=>{const[t,n]=Fs(e);if(!t||Oa())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ms.test(n)?Rs(n):n||e},Fs=e=>{const t=Ms.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ls=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ds=e=>{xs||(xs=Na?new RegExp(`(${Object.keys(Na).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ks(e).replace(Ms,Rs).replace(Ts,cs).replace(xs,cs))),n=t.map((e=>e.match(Ps).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>us({...e,output:t})));return e=>{const n=!Os.test(t[0])&&t.find((e=>Os.test(e)))?.replace(Ps,"");let r=0;return t[0].replace(Ps,(()=>`${o[r++](e)}${n||""}`)).replace(Ns,Ls)}},Us="react-spring: ",js=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Us}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},zs=js(console.warn);var Vs=js(console.warn);function Gs(e){return Sa.str(e)&&("#"==e[0]||/\d/.test(e)||!Oa()&&Ms.test(e)||e in(Na||{}))}var Hs=Oa()?ea.useEffect:ea.useLayoutEffect;function Ws(){const e=(0,ea.useState)()[1],t=(()=>{const e=(0,ea.useRef)(!1);return Hs((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var $s=e=>(0,ea.useEffect)(e,Ks),Ks=[];function qs(e){const t=(0,ea.useRef)();return(0,ea.useEffect)((()=>{t.current=e})),t.current}var Js=Symbol.for("Animated:node"),Ys=e=>e&&e[Js],Qs=(e,t)=>{return n=e,r=Js,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},Zs=e=>e&&e[Js]&&e[Js].getPayload(),Xs=class{constructor(){Qs(this,this)}getPayload(){return this.payload||[]}},ec=class extends Xs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Sa.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Sa.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Sa.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},tc=class extends ec{constructor(e){super(0),this._string=null,this._toString=us({output:[e,e]})}static create(e){return new tc(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Sa.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=us({output:[this.getValue(),e]})),this._value=0,super.reset()}},nc={dependencies:null},rc=class extends Xs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ia(this.source,((n,r)=>{var o;(o=n)&&o[Js]===o?t[r]=n.getValue(e):_s(n)?t[r]=ks(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ca(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ia(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){nc.dependencies&&_s(e)&&nc.dependencies.add(e);const t=Zs(e);t&&Ca(t,(e=>this.add(e)))}},oc=class extends rc{constructor(e){super(e)}static create(e){return new oc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ic)),!0)}};function ic(e){return(Gs(e)?tc:ec).create(e)}function lc(e){const t=Ys(e);return t?t.constructor:Sa.arr(e)?oc:Gs(e)?tc:ec}var ac=(e,t)=>{const n=!Sa.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ea.forwardRef)(((r,o)=>{const i=(0,ea.useRef)(null),l=n&&(0,ea.useCallback)((e=>{i.current=function(e,t){e&&(Sa.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;nc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new rc(e),nc.dependencies=null,[e,n]}(r,t),c=Ws(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new sc(u,s),d=(0,ea.useRef)();Hs((()=>(d.current=p,Ca(s,(e=>Is(e,p))),()=>{d.current&&(Ca(d.current.deps,(e=>As(e,d.current))),ia.cancel(d.current.update))}))),(0,ea.useEffect)(u,[]),$s((()=>()=>{const e=d.current;Ca(e.deps,(t=>As(t,e)))}));const f=t.getComponentProps(a.getValue());return ea.createElement(e,{...f,ref:l})}))},sc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ia.write(this.update)}};var cc=Symbol.for("AnimatedComponent"),uc=e=>Sa.str(e)?e:e&&Sa.str(e.displayName)?e.displayName:Sa.fun(e)&&e.name||null;function pc(e,...t){return Sa.fun(e)?e(...t):e}var dc=(e,t)=>!0===e||!!(t&&e&&(Sa.fun(e)?e(t):Aa(e).includes(t))),fc=(e,t)=>Sa.obj(e)?t&&e[t]:e,mc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yc=e=>e,gc=(e,t=yc)=>{let n=hc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Sa.und(n)||(r[o]=n)}return r},hc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],vc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bc(e){const t=function(e){const t={};let n=0;if(Ia(e,((e,r)=>{vc[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ia(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function _c(e){return e=ks(e),Sa.arr(e)?e.map(_c):Gs(e)?ra.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kc(e){for(const t in e)return!0;return!1}function Ec(e){return Sa.fun(e)||Sa.arr(e)&&Sa.obj(e[0])}function Sc(e,t){e.ref?.delete(e),t?.delete(e)}function wc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Cc={tension:170,friction:26,mass:1,damping:1,easing:hs.linear,clamp:!1};function Ic(e,t){if(Sa.und(t.decay)){const n=!Sa.und(t.tension)||!Sa.und(t.friction);!n&&Sa.und(t.frequency)&&Sa.und(t.damping)&&Sa.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ac=[];function xc(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=dc(n.cancel??r?.cancel,t);if(u)f();else{Sa.und(n.pause)||(o.paused=dc(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||dc(e,t)),s=pc(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ia.now()}function d(){s>0&&!ra.skipAnimation?(o.delayed=!0,c=ia.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Bc=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Oc(e.get()):t.every((e=>e.noop))?Pc(e.get()):Tc(e.get(),t.every((e=>e.finished))),Pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Tc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Oc=e=>({value:e,cancelled:!0,finished:!1});function Nc(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=gc(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Oc(r)||o!==n.asyncId&&Tc(r,!1);if(t)throw e.result=t,p(e),e},m=(e,t)=>{const i=new Rc,l=new Fc;return(async()=>{if(ra.skipAnimation)throw Mc(n),l.result=Tc(r,!1),p(l),l;f(i);const a=Sa.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ia(c,((e,t)=>{Sa.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let y;if(ra.skipAnimation)return Mc(n),Tc(r,!1);try{let t;t=Sa.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),d]),y=Tc(r.get(),!0,!1)}catch(e){if(e instanceof Rc)y=e.result;else{if(!(e instanceof Fc))throw e;y=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Sa.fun(l)&&ia.batchedUpdates((()=>{l(y,r,r.item)})),y})():s}function Mc(e,t){xa(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Rc=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Fc=class extends Error{constructor(){super("SkipAnimationSignal")}},Lc=e=>e instanceof Uc,Dc=1,Uc=class extends ws{constructor(){super(...arguments),this.id=Dc++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ys(this);return e&&e.getValue()}to(...e){return ra.to(this,e)}interpolate(...e){return zs(`${Us}The "interpolate" function is deprecated in v9 (use "to" instead)`),ra.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ss(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||za.sort(this),Ss(this,{type:"priority",parent:this,priority:e})}},jc=Symbol.for("SpringPhase"),zc=e=>(1&e[jc])>0,Vc=e=>(2&e[jc])>0,Gc=e=>(4&e[jc])>0,Hc=(e,t)=>t?e[jc]|=3:e[jc]&=-3,Wc=(e,t)=>t?e[jc]|=4:e[jc]&=-5,$c=class extends Uc{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ac,this.toValues=null,this.fromValues=Ac,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Cc)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Sa.und(e)||!Sa.und(t)){const n=Sa.obj(e)?{...e}:{...t,from:e};Sa.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vc(this)||this._state.asyncTo)||Gc(this)}get goal(){return ks(this.animation.to)}get velocity(){const e=Ys(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return zc(this)}get isAnimating(){return Vc(this)}get isPaused(){return Gc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=Zs(r.to);!l&&_s(r.to)&&(o=Aa(ks(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==tc?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Sa.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Sa.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Sa.und(r),f=n==c?a.v0>0:nt,m||(u=Math.abs(c-p)<=d,!u));++e){s&&(y=p==c||p>c==f,y&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=Ys(this),s=a.getValue();if(t){const e=ks(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ia.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vc(this)){const{to:e,config:t}=this.animation;ia.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Sa.und(e)?(n=this.queue||[],this.queue=[]):n=[Sa.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Bc(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Mc(this._state,e&&this._lastCallId),ia.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Sa.obj(n)?n[t]:n,(null==n||Ec(n))&&(n=void 0),r=Sa.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return zc(this)||(e.reverse&&([n,r]=[r,n]),r=ks(r),Sa.und(r)?Ys(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,gc(e,((e,t)=>/^on/.test(t)?fc(e,n):e))),Xc(this,e,"onProps"),eu(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return xc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Gc(this)||(Wc(this,!0),Ta(i.pauseQueue),eu(this,"onPause",Tc(this,Kc(this,this.animation.to)),this))},resume:()=>{Gc(this)&&(Wc(this,!1),Vc(this)&&this._resume(),Ta(i.resumeQueue),eu(this,"onResume",Tc(this,Kc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=qc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Oc(this));const r=!Sa.und(e.to),o=!Sa.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Oc(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Sa.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!wa(p,c);d&&(a.from=p),p=ks(p);const f=!wa(u,s);f&&this._focus(u);const m=Ec(t.to),{config:y}=a,{decay:g,velocity:h}=y;(r||o)&&(y.velocity=0),t.config&&!m&&function(e,t,n){n&&(Ic(n={...n},t),t={...n,...t}),Ic(e,t),Object.assign(e,t);for(const t in Cc)null==e[t]&&(e[t]=Cc[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Sa.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(y,pc(t.config,i),t.config!==l.config?pc(l.config,i):void 0);let v=Ys(this);if(!v||Sa.und(u))return n(Tc(this,!0));const b=Sa.und(t.reset)?o&&!t.default:!Sa.und(p)&&dc(t.reset,i),_=b?p:this.get(),k=_c(u),E=Sa.num(k)||Sa.arr(k)||Gs(k),S=!m&&(!E||dc(l.immediate||t.immediate,i));if(f){const e=lc(u);if(e!==v.constructor){if(!S)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(k)}}const w=v.constructor;let C=_s(u),I=!1;if(!C){const e=b||!zc(this)&&d;(f||e)&&(I=wa(_c(_),k),C=!I),(wa(a.immediate,S)||S)&&wa(y.decay,g)&&wa(y.velocity,h)||(C=!0)}if(I&&Vc(this)&&(a.changed&&!b?C=!0:C||this._stop(s)),!m&&((C||_s(s))&&(a.values=v.getPayload(),a.toValues=_s(u)?null:w==tc?[1]:Aa(k)),a.immediate!=S&&(a.immediate=S,S||b||this._set(s)),C)){const{onRest:e}=a;Ca(Zc,(e=>Xc(this,t,e)));const r=Tc(this,Kc(this,s));Ta(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ia.batchedUpdates((()=>{a.changed=!b,e?.(r,this),b?pc(l.onRest,r):a.onStart?.(r,this)}))}b&&this._set(_),m?n(Nc(t.to,t,this._state,this)):C?this._start():Vc(this)&&!f?this._pendingCalls.add(n):n(Pc(_))}_focus(e){const t=this.animation;e!==t.to&&(Es(this)&&this._detach(),t.to=e,Es(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_s(t)&&(Is(t,this),Lc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_s(e)&&As(e,this)}_set(e,t=!0){const n=ks(e);if(!Sa.und(n)){const e=Ys(this);if(!e||!wa(n,e.getValue())){const r=lc(n);e&&e.constructor==r?e.setValue(n):Qs(this,r.create(n)),e&&ia.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ys(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,eu(this,"onStart",Tc(this,Kc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pc(this.animation.onChange,e,this)),pc(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ys(this).reset(ks(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Vc(this)||(Hc(this,!0),Gc(this)||this._resume())}_resume(){ra.skipAnimation?this.finish():za.start(this)}_stop(e,t){if(Vc(this)){Hc(this,!1);const n=this.animation;Ca(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ss(this,{type:"idle",parent:this});const r=t?Oc(this.get()):Tc(this.get(),Kc(this,e??n.to));Ta(this._pendingCalls,r),n.changed&&(n.changed=!1,eu(this,"onRest",r,this))}}};function Kc(e,t){const n=_c(t);return wa(_c(e.get()),n)}function qc(e,t=e.loop,n=e.to){const r=pc(t);if(r){const o=!0!==r&&bc(r),i=(o||e).reverse,l=!o||o.reset;return Jc({...e,loop:t,default:!1,pause:void 0,to:!i||Ec(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function Jc(e){const{to:t,from:n}=e=bc(e),r=new Set;return Sa.obj(t)&&Qc(t,r),Sa.obj(n)&&Qc(n,r),e.keys=r.size?Array.from(r):null,e}function Yc(e){const t=Jc(e);return Sa.und(t.default)&&(t.default=gc(t)),t}function Qc(e,t){Ia(e,((e,n)=>null!=e&&t.add(n)))}var Zc=["onStart","onRest","onChange","onPause","onResume"];function Xc(e,t,n){e.animation[n]=t[n]!==mc(t,n)?fc(t[n],e.key):void 0}function eu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var tu=["onStart","onChange","onRest"],nu=1,ru=class{constructor(e,t){this.id=nu++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Sa.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Jc(e)),this}start(e){let{queue:t}=this;return e?t=Aa(e).map(Jc):this.queue=[],this._flush?this._flush(this,t):(uu(this,t),ou(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ca(Aa(t),(t=>n[t].stop(!!e)))}else Mc(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Sa.und(e))this.start({pause:!0});else{const t=this.springs;Ca(Aa(e),(e=>t[e].pause()))}return this}resume(e){if(Sa.und(e))this.start({pause:!1});else{const t=this.springs;Ca(Aa(e),(e=>t[e].resume()))}return this}each(e){Ia(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,xa(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&xa(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,xa(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ia.onFrame(this._onFrame)}};function ou(e,t){return Promise.all(t.map((t=>iu(e,t)))).then((t=>Bc(e,t)))}async function iu(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Sa.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Sa.arr(o)||Sa.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ca(tu,(n=>{const r=t[n];if(Sa.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,Ta(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===mc(t,"cancel");(u||f&&p.asyncId)&&d.push(xc(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ea,resume:Ea,start(t,n){f?(Mc(p,e._lastAsyncId),n(Oc(e))):(t.onRest=a,n(Nc(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const m=Bc(e,await Promise.all(d));if(l&&m.finished&&(!n||!m.noop)){const n=qc(t,l,o);if(n)return uu(e,[n]),iu(e,n,!0)}return s&&ia.batchedUpdates((()=>s(m,e,e.item))),m}function lu(e,t){const n={...e.springs};return t&&Ca(Aa(t),(e=>{Sa.und(e.keys)&&(e=Jc(e)),Sa.obj(e.to)||(e={...e,to:void 0}),cu(n,e,(e=>su(e)))})),au(e,n),n}function au(e,t){Ia(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Is(t,e))}))}function su(e,t){const n=new $c;return n.key=e,t&&Is(n,t),n}function cu(e,t,n){t.keys&&Ca(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function uu(e,t){Ca(t,(t=>{cu(e.springs,t,(t=>su(t,e)))}))}var pu,du,fu=({children:e,...t})=>{const n=(0,ea.useContext)(mu),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ea.useState)((()=>({inputs:t,result:e()}))),r=(0,ea.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=mu;return ea.createElement(i,{value:t},e)},mu=(pu=fu,du={},Object.assign(pu,ea.createContext(du)),pu.Provider._context=pu,pu.Consumer._context=pu,pu);fu.Provider=mu.Provider,fu.Consumer=mu.Consumer;var yu=()=>{const e=[],t=function(t){Vs(`${Us}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Ca(e,((e,o)=>{if(Sa.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ca(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Ca(e,(e=>e.resume(...arguments))),this},t.set=function(t){Ca(e,((e,n)=>{const r=Sa.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Ca(e,((e,r)=>{if(Sa.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Ca(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Ca(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Sa.fun(e)?e(n,t):e};return t._getProps=n,t};function gu(e,t,n){const r=Sa.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ea.useMemo)((()=>r||3==arguments.length?yu():void 0),[]),i=(0,ea.useRef)(0),l=Ws(),a=(0,ea.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=lu(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ou(e,t):new Promise((r=>{au(e,n),a.queue.push((()=>{r(ou(e,t))})),l()}))}})),[]),s=(0,ea.useRef)([...a.ctrls]),c=[],u=qs(e)||0;function p(e,n){for(let o=e;o{Ca(s.current.slice(e,u),(e=>{Sc(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ea.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>lu(e,c[t]))),f=(0,ea.useContext)(fu),m=qs(f),y=f!==m&&kc(f);Hs((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Ca(e,(e=>e()))),Ca(s.current,((e,t)=>{o?.add(e),y&&e.start({default:f});const n=c[t];n&&(wc(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),$s((()=>()=>{Ca(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function hu(e,t){const n=Sa.fun(e),[[r],o]=gu(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var vu=class extends Uc{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=us(...t);const n=this._get(),r=lc(n);Qs(this,r.create(n))}advance(e){const t=this._get();wa(t,this.get())||(Ys(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&_u(this._active)&&ku(this)}_get(){const e=Sa.arr(this.source)?this.source.map(ks):Aa(ks(this.source));return this.calc(...e)}_start(){this.idle&&!_u(this._active)&&(this.idle=!1,Ca(Zs(this),(e=>{e.done=!1})),ra.skipAnimation?(ia.batchedUpdates((()=>this.advance())),ku(this)):za.start(this))}_attach(){let e=1;Ca(Aa(this.source),(t=>{_s(t)&&Is(t,this),Lc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ca(Aa(this.source),(e=>{_s(e)&&As(e,this)})),this._active.clear(),ku(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Aa(this.source).reduce(((e,t)=>Math.max(e,(Lc(t)?t.priority:0)+1)),0))}};function bu(e){return!1!==e.idle}function _u(e){return!e.size||Array.from(e).every(bu)}function ku(e){e.idle||(e.idle=!0,Ca(Zs(e),(e=>{e.done=!0})),Ss(e,{type:"idle",parent:e}))}ra.assign({createStringInterpolator:Ds,to:(e,t)=>new vu(e,t)});za.advance;var Eu=window.ReactDOM,Su=/^--/;function wu(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Su.test(e)||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}var Cu={};var Iu={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Au=["Webkit","Ms","Moz","O"];Iu=Object.keys(Iu).reduce(((e,t)=>(Au.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Iu);var xu=/^(matrix|translate|scale|rotate|skew)/,Bu=/^(translate)/,Pu=/^(rotate|skew)/,Tu=(e,t)=>Sa.num(e)&&0!==e?e+t:e,Ou=(e,t)=>Sa.arr(e)?e.every((e=>Ou(e,t))):Sa.num(e)?e===t:parseFloat(e)===t,Nu=class extends rc{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Tu(e,"px"))).join(",")})`,Ou(e,0)]))),Ia(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(xu.test(t)){if(delete r[t],Sa.und(e))return;const n=Bu.test(t)?"px":Pu.test(t)?"deg":"";o.push(Aa(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Tu(o,n)})`,Ou(o,0)]:e=>[`${t}(${e.map((e=>Tu(e,n))).join(",")})`,Ou(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Mu(o,i)),super(r)}},Mu=class extends ws{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ca(this.inputs,((n,r)=>{const o=ks(n[0]),[i,l]=this.transforms[r](Sa.arr(o)?o:n.map(ks));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&Is(e,this)))))}observerRemoved(e){0==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&As(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ss(this,e)}};ra.assign({batchedUpdates:Eu.unstable_batchedUpdates,createStringInterpolator:Ds,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Ru=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new rc(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=uc(e)||"Anonymous";return(e=Sa.str(e)?i[e]||(i[e]=ac(e,o)):e[cc]||(e[cc]=ac(e,o))).displayName=`Animated(${t})`,e};return Ia(e,((t,n)=>{Sa.arr(e)&&(n=uc(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cu[t]||(Cu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=wu(t,r[t]);Su.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Nu(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Fu=Ru.animated;const Lu=e=>e+1,Du=e=>({top:e.offsetTop,left:e.offsetLeft});var Uu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,u.useRef)(),l=(0,f.useReducedMotion)()||!r,[a,s]=(0,u.useReducer)(Lu,0),[c,p]=(0,u.useReducer)(Lu,0),[d,m]=(0,u.useState)({x:0,y:0}),y=(0,u.useMemo)((()=>i.current?Du(i.current):null),[o]),g=(0,u.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Ml.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,u.useLayoutEffect)((()=>{a&&p()}),[a]),(0,u.useLayoutEffect)((()=>{if(!y)return;if(l)return void g();i.current.style.transform=void 0;const e=Du(i.current);s(),m({x:Math.round(y.left-e.left),y:Math.round(y.top-e.top)})}),[o]),hu({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const ju=".block-editor-block-list__block",zu=".block-list-appender",Vu=".block-editor-button-block-appender";function Gu(e,t){return t.closest([ju,zu,Vu].join(","))===e}function Hu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ju);return t?t.id.slice("block-".length):void 0}function Wu(e){const t=(0,u.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(xr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,m.useSelect)(xr);return(0,u.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Gu(t.current,i.activeElement))return;const l=Ml.focus.tabbable.find(t.current).filter((e=>(0,Ml.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Gu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Ml.focus.tabbable.findNext(t.current);if(e&&Gu(t.current,e)&&(0,Ml.isFormElement)(e))return void e.focus()}(0,Ml.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function $u(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Ku(){const e=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().outlineMode}),[]);return(0,f.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",$u),t.addEventListener("mouseover",$u),()=>{t.removeEventListener("mouseout",$u),t.removeEventListener("mouseover",$u),t.classList.remove("is-hovered")}}),[e])}function qu(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:f}=t(xr),{outlineMode:m}=s(),y=n(e),g=o(e),h=l(e),v=c(e,!0),b=i(e);return d()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":b,"is-partially-selected":b&&!p()&&!f(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(h)),"is-dragging":y,"has-child-selected":v,"remove-outline":g&&m&&u()})}),[e])}function Ju(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlockName(e),r=(0,a.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function Yu(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr),o=r(e);if(null==o||!o.className)return;const i=(0,a.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function Qu(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(xr);if(!l(e))return;const a=n();return a?d()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function Zu(e){const{isBlockSelected:t}=(0,m.useSelect)(xr),{selectBlock:n,selectionChange:r}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Gu(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var Xu=window.wp.keycodes;function ep(e){const t=(0,m.useSelect)((t=>t(xr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,m.useSelect)(xr),{insertDefaultBlock:o,removeBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Xu.ENTER&&a!==Xu.BACKSPACE&&a!==Xu.DELETE||s!==l||(0,Ml.isTextField)(s)||(t.preventDefault(),a===Xu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function tp(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(xr),{setNavigationMode:r,selectBlock:o}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function np(){const e=(0,u.useContext)($h);return(0,f.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function rp(e){return(0,m.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(xr);return n(e)}),[e])}function op(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,u.useContext)(ip),{index:l,mode:s,name:c,blockApiVersion:p,blockTitle:y,isPartOfSelection:g,adjustScrolling:h,enableAnimation:v}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:l,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:p,isFirstMultiSelectedBlock:d}=e(xr),{getActiveBlockVariation:f}=e(a.store),m=c(n),y=u(n)||p(n),g=i(n),h=(0,a.getBlockType)(g),v=f(g,t(n));return{index:r(n),mode:o(n),name:g,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:(null==v?void 0:v.title)||(null==h?void 0:h.title),isPartOfSelection:m||y,adjustScrolling:m||d(n),enableAnimation:!l()&&s()<=200}}),[n]),b=rp(n),k=(0,_.sprintf)((0,_.__)("Block: %s"),y),E="html"!==s||t?"":"-visual",S=(0,f.useMergeRefs)([e.ref,Wu(n),Zr(n),Zu(n),ep(n),tp(n),Ku(),np(),Uu({isSelected:g,adjustScrolling:h,enableAnimation:v,triggerAnimationOnChange:l}),(0,f.useDisabled)({isDisabled:!b})]),w=Nr();return p<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...o,...e,ref:S,id:`block-${n}${E}`,role:"document","aria-label":k,"data-block":n,"data-type":c,"data-title":y,className:d()(d()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":b}),r,e.className,o.className,qu(n),Ju(n),Yu(n),Qu(n)),style:{...o.style,...e.style}}}op.save=a.__unstableGetBlockProps;const ip=(0,u.createContext)();function lp(e){let{children:t,isHtml:n,...r}=e;return(0,u.createElement)("div",op(r,{__unstableIsHtml:n}),t)}const ap=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(xr),p=s(n),d=o(n),f=a(r),m=c(n,r),y=u(n,r),{name:g,attributes:h,isValid:v}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:m,canMove:y,block:p,name:g,attributes:h,isValid:v,isSelected:d}})),sp=(0,m.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:l,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p}=e(xr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(xr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:l}=n.select(xr),a=l(r);o(e,a+1,i)},onMerge(e){const{clientId:r,rootClientId:l}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:d,getBlockAttributes:f,getBlockName:m,getBlockOrder:y,getBlockIndex:g,getBlockRootClientId:h,canInsertBlockType:v}=n.select(xr);function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=h(e),i=y(e),[l]=i;if(1===i.length&&(0,a.isUnmodifiedBlock)(d(l)))p(e);else{if(v(m(l),r))u([l],e,r,g(e));else{const i=(0,a.switchToBlockType)(d(l),(0,a.getDefaultBlockName)());i&&i.length&&n.batch((()=>{o(i,g(e),r,t),p(l,!1)}))}!y(e).length&&(0,a.isUnmodifiedBlock)(d(e))&&p(e,!1)}}if(e){if(l){const e=c(l);if(e){if(m(l)!==m(e))return void i(l,e);{const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(e),e,l),p(e,!1)}))}}}const e=c(r);if(!e)return;y(e).length?b(e,!1):i(r,e)}else{const e=s(r);if(e)i(e,r);else if(l){const e=s(l);if(e&&m(l)===m(e)){const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(l),l,e),p(l,!1)}))}b(l)}}},onReplace(e,n,r){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),l([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var cp=(0,f.compose)(f.pure,ap,sp,(0,f.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,g.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:s,isSelectionEnabled:c,className:p,__unstableLayoutClassNames:f,name:y,isValid:g,attributes:h,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:E,toggleSelection:S}=e;const{themeSupportsLayout:w,hasContentLockedParent:C,isContentBlock:I,isContentLocking:A,isTemporarilyEditingAsBlocks:x}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr),i=!!n(l);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(a.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:i,isContentLocking:"contentOnly"===r(l)&&!i,isTemporarilyEditingAsBlocks:o()===l}}),[y,l]),{removeBlock:B}=(0,m.useDispatch)(xr),P=(0,u.useCallback)((()=>B(l)),[l]),T=cl()||{};let O=(0,u.createElement)(jl,{name:y,isSelected:s,attributes:h,setAttributes:b,insertBlocksAfter:o?void 0:k,onReplace:i?_:void 0,onRemove:i?P:void 0,mergeBlocks:i?E:void 0,clientId:l,isSelectionEnabled:c,toggleSelection:S,__unstableLayoutClassNames:f,__unstableParentLayout:Object.keys(T).length?T:void 0});const N=(0,a.getBlockType)(y);C&&!I&&(v={...v,tabIndex:-1}),null!=N&&N.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=d()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,N.getEditWrapperProps(h)));const M=v&&!!v["data-align"]&&!w;let R;if(M&&(O=(0,u.createElement)("div",{className:"wp-block","data-align":v["data-align"]},O)),g)R="html"===r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{display:"none"}},O),(0,u.createElement)(lp,{isHtml:!0},(0,u.createElement)(Xl,{clientId:l}))):(null==N?void 0:N.apiVersion)>1?O:(0,u.createElement)(lp,v,O);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(N,h);R=(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Kl,{clientId:l}),(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(e)))}const{"data-align":F,...L}=null!==(t=v)&&void 0!==t?t:{},D={clientId:l,className:d()({"is-content-locked":A,"is-content-locked-temporarily-editing-as-blocks":x,"is-content-block":C&&I},F&&w&&`align${F}`,p),wrapperProps:L,isAligned:M},U=(0,u.useMemo)((()=>D),Object.values(D));return(0,u.createElement)(ip.Provider,{value:U},(0,u.createElement)(Ql,{fallback:(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Jl,null))},R))})),up=window.wp.htmlEntities;var pp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const dp=[(0,u.createInterpolateElement)((0,_.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,_.__)("Drag files into the editor to automatically insert media blocks."),(0,_.__)("Change a block's type by pressing the block icon on the toolbar.")];var fp=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*dp.length));return(0,u.createElement)(g.Tip,null,dp[e])};var mp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var yp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));var hp=(0,u.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o,context:i}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:gp});const l=(0,u.createElement)(g.Icon,{icon:n&&n.src?n.src:n,context:i}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,u.createElement)("span",{style:a,className:d()("block-editor-block-icon",o,{"has-colors":r})},l)}));var vp=function(e){let{title:t,icon:n,description:r,blockType:o,className:i}=e;o&&($()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o));const{parentNavBlockClientId:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(xr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,m.useDispatch)(xr);return(0,u.createElement)("div",{className:d()("block-editor-block-card",i)},l&&(0,u.createElement)(g.Button,{onClick:()=>a(l),label:(0,_.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0}),(0,u.createElement)(hp,{icon:n,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-block-card__content"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,u.createElement)("span",{className:"block-editor-block-card__description"},r)))};const bp=(0,f.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,u.createElement)(e,c({registry:r},o));const[i,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,m.createRegistry)({},r);e.registerStore(Sr,Ar),l(e)}),[r]),i?(0,u.createElement)(m.RegistryProvider,{value:i},(0,u.createElement)(e,c({registry:i},o))):null}))),"withRegistryProvider");const _p=()=>{};function kp(e){let{clientId:t=null,value:n,selection:r,onChange:o=_p,onInput:i=_p}=e;const l=(0,m.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:p,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=l.dispatch(xr),{getBlockName:y,getBlocks:g}=l.select(xr),h=(0,m.useSelect)((e=>!t||e(xr).areInnerBlocksControlled(t)),[t]),v=(0,u.useRef)({incoming:null,outgoing:[]}),b=(0,u.useRef)(!1),_=()=>{n&&(f(),t?l.batch((()=>{d(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));b.current&&(v.current.incoming=e),f(),p(t,e)})):(b.current&&(v.current.incoming=n),s(n)))},k=(0,u.useRef)(i),E=(0,u.useRef)(o);(0,u.useEffect)((()=>{k.current=i,E.current=o}),[i,o]),(0,u.useEffect)((()=>{v.current.outgoing.includes(n)?v.current.outgoing[v.current.outgoing.length-1]===n&&(v.current.outgoing=[]):g(t)!==n&&(v.current.outgoing=[],_(),r&&c(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,u.useEffect)((()=>{h||(v.current.outgoing=[],_())}),[h]),(0,u.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:a}=l.select(xr);let s=g(t),c=o(),u=!1;b.current=!0;const p=l.subscribe((()=>{if(null!==t&&null===y(t))return;if(!(!t||a(t)))return;const l=o(),p=g(t),d=p!==s;if(s=p,d&&(v.current.incoming||i()))return v.current.incoming=null,void(c=l);if(d||u&&!d&&l&&!c){c=l,v.current.outgoing.push(s);(c?E.current:k.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>{b.current=!1,p()}}),[l,t])}const Ep=bp((e=>{const{children:t,settings:n,stripExperimentalSettings:r=!1}=e,{__experimentalUpdateSettings:o}=Ir((0,m.useDispatch)(xr));return(0,u.useEffect)((()=>{o({...n,__internalIsInitialized:!0},r)}),[n]),kp(e),(0,u.createElement)(Qr,null,t)}));var Sp=e=>(0,u.createElement)(Ep,c({},e,{stripExperimentalSettings:!0}),e.children);function wp(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,m.useSelect)(xr),{clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clearBlockSelection:o}=e();return(0,f.useRefEffect)((e=>{if(o)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(o){(t()||n())&&o.target===e&&r()}}),[t,n,r,o])}function Cp(e){return(0,u.createElement)("div",c({ref:wp()},e))}function Ip(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(xr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Ap(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,m.useSelect)(Ip,[]);return(0,f.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function xp(e,t,n,r){let o,i=Ml.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(ju)===t.closest(ju)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Ml.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}}))}function Bp(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,m.useSelect)(xr),{selectBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:p,ctrlKey:d,altKey:f,metaKey:m}=s,y=c===Xu.UP,g=c===Xu.DOWN,h=c===Xu.LEFT,v=c===Xu.RIGHT,b=y||h,_=h||v,k=y||g,E=_||k,S=p||d||f||m,w=k?Ml.isVerticalEdge:Ml.isHorizontalEdge,{ownerDocument:C}=l,{defaultView:I}=C;if(!E)return;if(r()){if(p)return;if(!o())return;return s.preventDefault(),void(b?i(e()):i(t(),-1))}if(!function(e,t,n){if((t===Xu.UP||t===Xu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,S))return;k?a||(a=(0,Ml.computeCaretRect)(I)):a=null;const A=(0,Ml.isRTL)(u)?!b:b,{keepCaretInsideBlock:x}=n();if(p)(function(e,t){const n=xp(e,t,l);return n&&Hu(n)})(u,b)&&w(u,b)&&(l.contentEditable=!0,l.focus());else if(!k||!(0,Ml.isVerticalEdge)(u,b)||f&&!(0,Ml.isHorizontalEdge)(u,A)||x){if(_&&I.getSelection().isCollapsed&&(0,Ml.isHorizontalEdge)(u,A)&&!x){const e=xp(u,A,l);(0,Ml.placeCaretAtHorizontalEdge)(e,b),s.preventDefault()}}else{const e=xp(u,b,l,!0);e&&((0,Ml.placeCaretAtVerticalEdge)(e,f?!b:b,f?void 0:a),s.preventDefault())}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Pp=window.wp.keyboardShortcuts;function Tp(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(xr),{multiSelect:r,selectBlock:o}=(0,m.useDispatch)(xr),i=(0,Pp.__unstableUseShortcutEventMatch)();return(0,f.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ml.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function Op(e,t){e.contentEditable=t,t&&e.focus()}function Np(){const{startMultiSelect:e,stopMultiSelect:t}=(0,m.useDispatch)(xr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;Op(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),Op(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Mp(e,t){e.contentEditable=t,t&&e.focus()}function Rp(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,m.useDispatch)(xr),{getBlockParents:r,getBlockSelectionStart:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Mp(n,!1);let c=Hu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Hu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=Hu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Mp(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Fp(){const{selectBlock:e}=(0,m.useDispatch)(xr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=Hu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Lp(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,m.useSelect)(xr),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===Xu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?o(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):i()):p.keyCode===Xu.BACKSPACE||p.keyCode===Xu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?l(t()):n()?s(p.keyCode===Xu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===Xu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function Dp(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),r=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,m.useSelect)(xr),{setNavigationMode:a}=(0,m.useDispatch)(xr),s=(0,m.useSelect)((e=>e(xr).isNavigationMode()),[])?void 0:"0",c=(0,u.useRef)();function p(t){if(c.current)c.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Ml.focus.tabbable[n](t.target).focus()}}const d=(0,u.createElement)("div",{ref:t,tabIndex:s,onFocus:p}),y=(0,u.createElement)("div",{ref:n,tabIndex:s,onFocus:p}),g=(0,f.useRefEffect)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Xu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Xu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===s&&a(!0));if(((0,Ml.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Ml.isFormElement)(Ml.focus.tabbable[l](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(r){var o;if(r.keyCode!==Xu.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Ml.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=s,{defaultView:m}=f;return m.addEventListener("keydown",d),s.addEventListener("keydown",u),s.addEventListener("focusout",p),()=>{m.removeEventListener("keydown",d),s.removeEventListener("keydown",u),s.removeEventListener("focusout",p)}}),[]);return[d,(0,f.useMergeRefs)([e,g]),y]}(),r=(0,m.useSelect)((e=>e(xr).hasMultiSelection()),[]);return[e,(0,f.useMergeRefs)([t,Lp(),Np(),Rp(),Fp(),Ap(),Tp(),Bp(),(0,f.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,_.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Up=(0,u.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,l]=Dp();return(0,u.createElement)(u.Fragment,null,o,(0,u.createElement)("div",c({},r,{ref:(0,f.useMergeRefs)([i,t]),className:d()(r.className,"block-editor-writing-flow")}),n),l)}));function jp(e){return(0,u.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function zp(e){let{contentRef:t,children:n,head:r,tabIndex:o=0,scale:i=1,frameSize:l=0,readonly:a,forwardedRef:s,...p}=e;const y=(0,m.useSelect)((e=>e(xr).getSettings().__unstableResolvedAssets),[]),[,h]=(0,u.useReducer)((()=>({}))),[v,b]=(0,u.useState)(),[k,E]=(0,u.useState)([]),S=jp(null==y?void 0:y.styles),w=S.map((e=>e.id)),C=(0,u.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:r}=t;if(null===n)return e;if(!r)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(r)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.push(r.cloneNode(!0))}return e}),[])),[]).filter((e=>!w.includes(e.id))),I=jp(null==y?void 0:y.scripts),A=wp(),[x,B,P]=Dp(),[T,{height:O}]=(0,f.useResizeObserver)(),N=(0,f.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),b(r),A(l),E(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),M=(0,f.useRefEffect)((e=>{I.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{h()}))}),[]),R=(0,f.useDisabled)({isDisabled:!a}),F=(0,f.useMergeRefs)([t,A,B,R]),L=(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...S,...C].map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const a=t.toLowerCase();return"style"===a?(0,u.createElement)(a,{id:r,key:r},l):(0,u.createElement)(a,{href:n,id:r,rel:o,media:i,key:r})}))),D=(0,u.useMemo)((()=>""+(0,u.renderToString)(L)),[]);return(0,u.createElement)(u.Fragment,null,o>=0&&x,(0,u.createElement)("iframe",c({},p,{ref:(0,f.useMergeRefs)([s,N]),tabIndex:o,srcDoc:D,title:(0,_.__)("Editor canvas")}),v&&(0,u.createPortal)((0,u.createElement)(u.Fragment,null,(0,u.createElement)("head",{ref:M},L,r,(0,u.createElement)("style",null,`html { transition: background 5s; ${l?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,u.createElement)("body",{ref:F,className:d()("block-editor-iframe__body","editor-styles-wrapper",...k),style:{marginBottom:`-${O*(1-i)-l}px`,marginTop:l,transform:`scale( ${i} )`}},T,(0,u.createElement)(g.__experimentalStyleProvider,{document:v},n))),v.documentElement)),o>=0&&P)}var Vp=(0,u.forwardRef)((function(e,t){return(0,m.useSelect)((e=>e(xr).getSettings().__internalIsInitialized),[])?(0,u.createElement)(zp,c({},e,{forwardedRef:t})):null})),Gp={grad:.9,turn:360,rad:360/(2*Math.PI)},Hp=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Wp=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$p=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Kp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qp=function(e){return{r:$p(e.r,0,255),g:$p(e.g,0,255),b:$p(e.b,0,255),a:$p(e.a)}},Jp=function(e){return{r:Wp(e.r),g:Wp(e.g),b:Wp(e.b),a:Wp(e.a,3)}},Yp=/^#([0-9a-f]{3,8})$/i,Qp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Zp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},Xp=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),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},ed=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),l:$p(e.l,0,100),a:$p(e.a)}},td=function(e){return{h:Wp(e.h),s:Wp(e.s),l:Wp(e.l),a:Wp(e.a,3)}},nd=function(e){return Xp((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},rd=function(e){return{h:(t=Zp(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},od=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,id=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ad=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sd={string:[[function(e){var t=Yp.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?Wp(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?Wp(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ld.exec(e)||ad.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qp({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=od.exec(e)||id.exec(e);if(!t)return null;var n,r,o=ed({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Gp[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return nd(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 Hp(t)&&Hp(n)&&Hp(r)?qp({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(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=ed({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return nd(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),v:$p(e.v,0,100),a:$p(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Xp(l)},"hsv"]]},cd=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Qp(Wp(255*o)):"","#"+Qp(t)+Qp(n)+Qp(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Jp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jp(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 td(rd(this.rgba))},e.prototype.toHslString=function(){return t=(e=td(rd(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=Zp(this.rgba),{h:Wp(e.h),s:Wp(e.s),v:Wp(e.v),a:Wp(e.a,3)};var e},e.prototype.invert=function(){return yd({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),yd(pd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,-e))},e.prototype.grayscale=function(){return yd(pd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),yd(fd(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?yd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Wp(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rd(this.rgba);return"number"==typeof e?yd({h:e,s:t.s,l:t.l,a:t.a}):Wp(t.h)},e.prototype.isEqual=function(e){return this.toHex()===yd(e).toHex()},e}(),yd=function(e){return e instanceof md?e:new md(e)},gd=[],hd=function(e){e.forEach((function(e){gd.indexOf(e)<0&&(e(md,sd),gd.push(e))}))};function vd(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,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f(s=_d(l))?(a+.05)/(s+.05):(s+.05)/(a+.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)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Ed=n(3124),Sd=n.n(Ed);const wd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Cd(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=w()||C());)!1!==t&&(n.push(t),m(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function m(e){let t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){const t=i();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Id(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Id(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(wd,""),value:n?Id(n[0]).replace(wd,""):""});return d(/^[;\s]*/),r}function v(){const e=[];if(!c())return s("missing '{'");let t;for(m(e);t=h();)!1!==t&&(e.push(t),m(e));return u()?e:s("missing '}'")}function b(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=S("import"),k=S("charset"),E=S("namespace");function S(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=m();for(;o=b();)l.push(o),l=l.concat(m());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@media missing '{'");const r=m().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Id(t[1]),media:Id(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@supports missing '{'");const r=m().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||E()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Id(t[1]),r=Id(t[2]);if(!c())return s("@document missing '{'");const o=m().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=m();for(;n=h();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=m().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=m();for(;t=h();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function C(){const e=i(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:v()})):s("selector missing")}return Ad(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Id(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ad(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Ad(e,r)})):n&&"object"==typeof n&&Ad(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var xd=n(8575),Bd=n.n(xd),Pd=Td;function Td(e){this.options=e||{}}Td.prototype.emit=function(e){return e},Td.prototype.visit=function(e){return this[e.type](e)},Td.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Ld(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Dd(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const jd=/^(body|html|:root).*$/;var zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(jd)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(zd(t)),r&&o.push(Ud(r)),o.length?Fd(n,(0,f.compose)(o)):n}))};const Gd=".editor-styles-wrapper";function Hd(e){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Gd);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=yd(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Wd(e){let{styles:t}=e;const n=(0,u.useMemo)((()=>Vd(t,Gd)),[t]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",{ref:Hd(t)}),n.map(((e,t)=>(0,u.createElement)("style",{key:t},e))))}function $d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=yd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Kd(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,u.createElement)("style",null,r)}function qd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,u.createElement)("style",null,n)}function Jd(e){let{id:t,colors:n}=e;const r=$d(n);return(0,u.createElement)(g.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,u.createElement)("defs",null,(0,u.createElement)("filter",{id:t},(0,u.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,u.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,u.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,u.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,u.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,u.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,u.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Yd(e){let{preset:t}=e;return(0,u.createElement)(Jd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let Qd;hd([vd,kd]);const Zd=2e3;function Xd(e){let{viewportWidth:t,containerWidth:n,minHeight:r,additionalStyles:o=[]}=e;t||(t=n);const[i,{height:l}]=(0,f.useResizeObserver)(),{styles:a,duotone:s}=(0,m.useSelect)((e=>{var t,n;const r=e(xr).getSettings();return{styles:r.styles,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,u.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:a),[a,o]),p=(0,u.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);Qd=Qd||(0,f.pure)(Jh);const d=n/t;return(0,u.createElement)(g.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,height:l*d,maxHeight:l>Zd?Zd*d:void 0,minHeight:r}},(0,u.createElement)(Vp,{head:(0,u.createElement)(Wd,{styles:c}),contentRef:(0,f.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:Zd,minHeight:0!==d&&d<1&&r?r/d:r}},i,p.map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug}))),(0,u.createElement)(Qd,{renderAppender:!1})))}function ef(e){const[t,{width:n}]=(0,f.useResizeObserver)();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,u.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,u.createElement)(Xd,c({},e,{containerWidth:n}))))}var tf=(0,u.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:r,additionalStyles:o=[],__experimentalMinHeight:i,__experimentalPadding:l}=e;i&&(r=i,$()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],$()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,m.useSelect)((e=>e(xr).getSettings()),[]),s=(0,u.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,u.createElement)(Ep,{value:c,settings:s},(0,u.createElement)(ef,{viewportWidth:n,minHeight:r,additionalStyles:o})):null}));function nf(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings()),[]),i=(0,u.useMemo)((()=>({...o,__unstableIsPreviewMode:!0})),[o]),l=(0,f.useDisabled)(),a=(0,f.useMergeRefs)([n.ref,l]),s=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),c=(0,u.createElement)(Ep,{value:s,settings:i},(0,u.createElement)(Qh,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:a,className:d()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?c:null}}var rf=function(e){var t;let{item:n}=e;const{name:r,title:o,icon:i,description:l,initialAttributes:s,example:c}=n,p=(0,a.isReusableBlock)(n);return(0,u.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,u.createElement)("div",{className:"block-editor-inserter__preview"},p||c?(0,u.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,u.createElement)(tf,{blocks:c?(0,a.getBlockFromExample)(r,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,a.createBlock)(r,s),viewportWidth:null!==(t=null==c?void 0:c.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,_.__)("No Preview Available."))),!p&&(0,u.createElement)(vp,{title:o,icon:i,description:l}))};var of=(0,u.createContext)();var lf=(0,u.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const l=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeItem,c({ref:t,state:l,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,u.createElement)(r,t,o):"function"==typeof o?o(t):(0,u.createElement)(g.Button,t,o)}))}));var af=(0,u.createElement)(V.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function sf(e){let{count:t,icon:n,isPattern:r}=e;const o=r&&(0,_.__)("Pattern");return(0,u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,u.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,u.createElement)(g.FlexItem,null,n?(0,u.createElement)(hp,{icon:n}):o||(0,_.sprintf)((0,_._n)("%d block","%d blocks",t),t)),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:af})))))}var cf=e=>{let{isEnabled:t,blocks:n,icon:r,children:o,isPattern:i}=e;const l={type:"inserter",blocks:n};return(0,u.createElement)(g.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:r,isPattern:i})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var uf=(0,u.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:l,...s}=e;const p=(0,u.useRef)(!1),f=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,u.useMemo)((()=>[(0,a.createBlock)(r.name,r.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]),y=(0,a.isReusableBlock)(r)||(0,a.isTemplatePart)(r);return(0,u.createElement)(cf,{isEnabled:l&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:l,onDragStart:a,onDragEnd:m}=e;return(0,u.createElement)("div",{className:d()("block-editor-block-types-list__list-item",{"is-synced":y}),draggable:l,onDragStart:e=>{p.current=!0,a&&(i(null),a(e))},onDragEnd:e=>{p.current=!1,m&&m(e)}},(0,u.createElement)(lf,c({isFirst:n,className:d()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Xu.ENTER&&(e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null))},onMouseEnter:()=>{p.current||i(r)},onMouseLeave:()=>i(null)},s),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,u.createElement)(hp,{icon:r.icon,showColors:!0})),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var pf=(0,u.forwardRef)((function(e,t){const[n,r]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,dn.speak)((0,_.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,u.createElement)("div",c({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var df=(0,u.forwardRef)((function(e,t){const n=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeGroup,c({state:n,role:"presentation",ref:t},e))}));var ff=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,u.createElement)(pf,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let r=0,o=e.length;r(0,u.createElement)(df,{key:t},e.map(((e,o)=>(0,u.createElement)(uf,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:l&&!e.isDisabled,isFirst:0===t&&0===o})))))),o)};var mf=function(e){let{title:t,icon:n,children:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,u.createElement)(g.Icon,{icon:n})),(0,u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var yf=(e,t)=>{const{categories:n,collections:r,items:o}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(xr),{getCategories:r,getCollections:o}=t(a.store);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,u.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=(0,a.createBlock)(r,o,(0,a.createBlocksFromInnerBlocksTemplate)(i));t(l,void 0,n)}),[t])]};var gf=function(e){let{children:t}=e;const n=(0,g.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,u.createElement)(of.Provider,{value:n},t)};const hf=[];var vf=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,a,s]=yf(t,n),c=(0,u.useMemo)((()=>J(i,"frecency","desc").slice(0,6)),[i]),p=(0,u.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,u.useMemo)((()=>(0,f.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,y.groupBy)(e,"category")))(i)),[i]),m=(0,u.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,a]);(0,u.useEffect)((()=>()=>r(null)),[]);const g=(0,f.useAsyncList)(l),h=l.length===g.length,v=(0,u.useMemo)((()=>Object.entries(a)),[a]),b=(0,f.useAsyncList)(h?v:hf);return(0,u.createElement)(gf,null,(0,u.createElement)("div",null,o&&!!c.length&&(0,u.createElement)(mf,{title:(0,_._x)("Most used","blocks")},(0,u.createElement)(ff,{items:c,onSelect:s,onHover:r,label:(0,_._x)("Most used","blocks")})),g.map((e=>{const t=d[e.slug];return t&&t.length?(0,u.createElement)(mf,{key:e.slug,title:e.title,icon:e.icon},(0,u.createElement)(ff,{items:t,onSelect:s,onHover:r,label:e.title})):null})),h&&p.length>0&&(0,u.createElement)(mf,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,_.__)("Uncategorized")},(0,u.createElement)(ff,{items:p,onSelect:s,onHover:r,label:(0,_.__)("Uncategorized")})),b.map((e=>{let[t,n]=e;const o=m[t];return o&&o.length?(0,u.createElement)(mf,{key:t,title:n.title,icon:n.icon},(0,u.createElement)(ff,{items:o,onSelect:s,onHover:r,label:n.title})):null}))))},bf=window.wp.notices;var _f=(e,t)=>{const{patternCategories:n,patterns:r}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(xr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,m.useDispatch)(bf.store),i=(0,u.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>(0,a.cloneBlock)(e))),t.name),o((0,_.sprintf)((0,_.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]};const kf=e=>{let{showTooltip:t,title:n,children:r}=e;return t?(0,u.createElement)(g.Tooltip,{text:n},r):(0,u.createElement)(u.Fragment,null,r)};function Ef(e){let{isDraggable:t,pattern:n,onClick:r,onHover:o,composite:i,showTooltip:l}=e;const[a,s]=(0,u.useState)(!1),{blocks:p,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,f.useInstanceId)(Ef)}`;return(0,u.createElement)(cf,{isEnabled:t,blocks:p,isPattern:!!n},(e=>{let{draggable:t,onDragStart:f,onDragEnd:y}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),f&&(null==o||o(null),f(e))},onDragEnd:e=>{s(!1),y&&y(e)}},(0,u.createElement)(kf,{showTooltip:l,title:n.title},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},i,{className:"block-editor-block-patterns-list__item",onClick:()=>{r(n,p),null==o||o(null)},onMouseEnter:()=>{a||null==o||o(n)},onMouseLeave:()=>null==o?void 0:o(null),"aria-label":n.title,"aria-describedby":n.description?m:void 0}),(0,u.createElement)(tf,{blocks:p,viewportWidth:d}),!l&&(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,u.createElement)(g.VisuallyHidden,{id:m},n.description))))}))}function Sf(){return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var wf=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onHover:o,onClickPattern:i,orientation:l,label:a=(0,_.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const p=(0,g.__unstableUseCompositeState)({orientation:l});return(0,u.createElement)(g.__unstableComposite,c({},p,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,u.createElement)(Ef,{key:e.name,pattern:e,onClick:i,onHover:o,isDraggable:t,composite:p,showTooltip:s}):(0,u.createElement)(Sf,{key:e.name}))))};function Cf(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,u.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,u.createElement)(g.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function If(e){let{filterValue:t,setFilterValue:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,_.__)("Search for patterns"),placeholder:(0,_.__)("Search")}))}var Af=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,u.createElement)(If,{filterValue:o,setFilterValue:i}),!o&&(0,u.createElement)(Cf,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var xf=function(){return(0,u.createElement)("div",{className:"block-editor-inserter__no-results"},(0,u.createElement)(Xi,{className:"block-editor-inserter__no-results-icon",icon:gp}),(0,u.createElement)("p",null,(0,_.__)("No results found.")))};var Bf=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0,selectBlockOnInsert:s=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(xr),{destinationRootClientId:p,destinationIndex:d}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(xr),c=i();let u,p=t;return void 0!==n?u=n:r?u=a(r):!o&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:f,insertBlocks:y,showInsertionPoint:g,hideInsertionPoint:h}=(0,m.useDispatch)(xr),v=(0,u.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!o&&r&&(0,a.isUnmodifiedDefaultBlock)(r)?f(r.clientId,e,null,l||n?0:null,t):y(e,d,p,s,l||n?0:null,t);const u=Array.isArray(e)?e.length:1,m=(0,_.sprintf)((0,_._n)("%d block added.","%d blocks added.",u),u);(0,dn.speak)(m),i&&i(e)}),[o,c,f,y,p,d,i,l]),b=(0,u.useCallback)((e=>{e?g(p,d):h()}),[g,h,p,d]);return[p,v,b]},Pf=n(4793),Tf=n.n(Pf);function Of(e){return e.toLowerCase()}var Nf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Mf=/[^A-Z0-9]+/gi;function Rf(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?Nf:n,o=t.stripRegexp,i=void 0===o?Mf:o,l=t.transform,a=void 0===l?Of:l,s=t.delimiter,c=void 0===s?" ":s,u=Ff(Ff(e,r,"$1\0$2"),i,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(a).join(c)}function Ff(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Lf=e=>e.name||"",Df=e=>e.title,Uf=e=>e.description||"",jf=e=>e.keywords||[],zf=e=>e.category,Vf=()=>null;function Gf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Rf(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Hf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Tf()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Gf(Hf(e))},$f=(e,t)=>e.filter((e=>!Wf(t).some((t=>t.includes(e))))),Kf=(e,t,n,r)=>{if(0===Wf(r).length)return e;return qf(e,r,{getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===e.category})))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},qf=function(){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&&void 0!==arguments[2]?arguments[2]:{};const r=Wf(t);if(0===r.length)return e;const o=e.map((e=>[e,Jf(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Lf,getTitle:o=Df,getDescription:i=Uf,getKeywords:l=jf,getCategory:a=zf,getCollection:s=Vf}=n,c=r(e),u=o(e),p=i(e),d=l(e),f=a(e),m=s(e),y=Hf(t),g=Hf(u);let h=0;if(y===g)h+=30;else if(g.startsWith(y))h+=20;else{const e=[c,u,p,...d,f,m].join(" "),t=Gf(y);0===$f(t,e).length&&(h+=10)}if(0!==h&&c.startsWith("core/")){h+=c!==e.id?1:2}return h}function Yf(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,u.createElement)(g.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,_.sprintf)((0,_._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qf=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,f.useDebounce)(dn.speak,500),[i,l]=Bf({shouldFocusBlock:!0}),[a,,s]=_f(l,i),c=(0,u.useMemo)((()=>r.map((e=>e.name))),[r]),p=(0,u.useMemo)((()=>t?qf(a,t):a.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,a]);(0,u.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=(0,f.useAsyncList)(p,{step:2}),m=!(null==p||!p.length);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},m&&(0,u.createElement)(Yf,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,u.createElement)(gf,null,!m&&(0,u.createElement)(xf,null),m&&(0,u.createElement)(wf,{shownPatterns:d,blockPatterns:p,onClickPattern:s,isDraggable:!1})))};function Zf(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,u.useState)(""),[i,l]=(0,u.useState)(null==t?void 0:t.name);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,u.createElement)(Af,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,u.createElement)(Qf,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xf=function(e){let{onModalClose:t,...n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,u.createElement)(Zf,n))};function em(e){let{title:t}=e;return(0,u.createElement)(g.__experimentalVStack,{spacing:0},(0,u.createElement)(g.__experimentalView,null,(0,u.createElement)(g.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,u.createElement)(g.__experimentalHStack,{spacing:2},(0,u.createElement)(g.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0,"aria-label":(0,_.__)("Navigate to the previous view")}),(0,u.createElement)(g.__experimentalSpacer,null,(0,u.createElement)(g.__experimentalHeading,{level:5},t))))))}function tm(e){let{categories:t,children:n}=e;return(0,u.createElement)(g.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,u.createElement)(g.__experimentalNavigatorScreen,{path:"/"},(0,u.createElement)(g.__experimentalItemGroup,null,t.map((e=>(0,u.createElement)(g.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:g.__experimentalItem,isAction:!0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?yp:mp}))))))),t.map((e=>(0,u.createElement)(g.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,u.createElement)(em,{title:(0,_.__)("Back")}),n(e)))))}const nm=()=>{},rm=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function om(e){const[t,n]=_f(void 0,e),r=(0,u.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),o=(0,u.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].some((e=>rm.includes(e)))?[n,r].every((e=>rm.includes(e)))?rm.indexOf(n)-rm.indexOf(r):rm.includes(n)?-1:1:0}));return t.some((e=>!r(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,_._x)("Uncategorized")}),e}),[t,n]);return o}function im(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const l=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(l.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,u.createElement)("div",{ref:l,className:"block-editor-inserter__patterns-category-dialog"},(0,u.createElement)(lm,{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}))}function lm(e){let{rootClientId:t,onInsert:n,onHover:r=nm,category:o,showTitlesAsTooltip:i}=e;const[l,,a]=_f(n,t),s=om(t),c=(0,u.useMemo)((()=>l.filter((e=>{var t,n,r;if("uncategorized"!==o.name)return null===(r=e.categories)||void 0===r?void 0:r.includes(o.name);return 0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[l,o]),p=(0,f.useAsyncList)(c);return(0,u.useEffect)((()=>()=>r(null)),[]),c.length?(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},o.label),(0,u.createElement)("p",null,o.description),(0,u.createElement)(wf,{shownPatterns:p,blockPatterns:c,onClickPattern:a,onHover:r,label:o.label,orientation:"vertical",category:o.label,isDraggable:!0,showTitlesAsTooltip:i})):null}var am=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:r,rootClientId:o}=e;const[i,l]=(0,u.useState)(!1),a=om(o),s=n||a[0],c=(0,f.useViewportMatch)("medium","<");return(0,u.createElement)(u.Fragment,null,!c&&(0,u.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Block pattern categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,_.__)("Explore all patterns")))))),c&&(0,u.createElement)(tm,{categories:a},(e=>(0,u.createElement)(lm,{onInsert:r,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),i&&(0,u.createElement)(Xf,{initialCategory:s,patternCategories:a,onModalClose:()=>l(!1)}))},sm=window.wp.url;function cm(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=yf(r,n),l=(0,u.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,u.createElement)(xf,null):(0,u.createElement)(mf,{title:(0,_.__)("Reusable blocks")},(0,u.createElement)(ff,{items:l,onSelect:i,onHover:t,label:(0,_.__)("Reusable blocks")}))}var um=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cm,{onHover:r,onInsert:n,rootClientId:t}),(0,u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,sm.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,_.__)("Manage Reusable blocks"))))};function pm(e){const[t,n]=(0,u.useState)([]),{canInsertImage:r,canInsertVideo:o,canInsertAudio:i}=(0,m.useSelect)((t=>{const{canInsertBlockType:n}=t(xr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),l=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),r=(0,u.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return r}();return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!l)return;const t=new Map(await Promise.all(l.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:r,video:o,audio:i};l.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,o,i,l]),t}var dm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var fm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"})),mm=window.wp.blob;const ym={image:"img",video:"video",audio:"audio"};function gm(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},r=e.url,o=e.alt||void 0;"image"===t?(n.url=r,n.alt=o):["video","audio"].includes(t)&&(n.src=r);const i=ym[t],l=(0,u.createElement)(i,{src:e.previewUrl||r,alt:o,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=r)}});return[(0,a.createBlock)(`core/${t}`,n),l]}const hm=["image"],vm={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function bm(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const r=t.getReportUrl(n);return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,_.__)("Options"),popoverProps:vm,icon:dm},(()=>(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:()=>window.open(r,"_blank").focus(),icon:fm},(0,_.sprintf)((0,_.__)("Report %s"),t.mediaType)))))}function _m(e){let{onClose:t,onSubmit:n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,u.createElement)(g.__experimentalVStack,{spacing:3},(0,u.createElement)("p",null,(0,_.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,u.createElement)("p",null,(0,_.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:t},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",onClick:n},(0,_.__)("Insert")))))}function km(e){var t;let{media:n,onClick:r,composite:o,category:i}=e;const[l,s]=(0,u.useState)(!1),[p,f]=(0,u.useState)(!1),[y,h]=(0,u.useState)(!1),[v,b]=(0,u.useMemo)((()=>gm(n,i.mediaType)),[n,i.mediaType]),{createErrorNotice:k,createSuccessNotice:E}=(0,m.useDispatch)(bf.store),S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useCallback)((e=>{if(y)return;const t=(0,a.cloneBlock)(e),{id:n,url:o,caption:i}=t.attributes;n?r(t):(h(!0),window.fetch(o).then((e=>e.blob())).then((e=>{S({filesList:[e],additionalData:{caption:i},onFileChange(e){let[n]=e;(0,mm.isBlobURL)(n.url)||(r({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),E((0,_.__)("Image uploaded and inserted."),{type:"snackbar"}),h(!1))},allowedTypes:hm,onError(e){k(e,{type:"snackbar"}),h(!1)}})})).catch((()=>{s(!0),h(!1)})))}),[y,r,S,k,E]),C=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let I;if(C.length>25){const e="...";I=C.slice(0,25-e.length)+e}const A=(0,u.useCallback)((()=>f(!0)),[]),x=(0,u.useCallback)((()=>f(!1)),[]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cf,{isEnabled:!0,blocks:[v]},(e=>{let{draggable:t,onDragStart:r,onDragEnd:l}=e;return(0,u.createElement)("div",{className:d()("block-editor-inserter__media-list__list-item",{"is-hovered":p}),draggable:t,onDragStart:r,onDragEnd:l},(0,u.createElement)(g.Tooltip,{text:I||C},(0,u.createElement)("div",{onMouseEnter:A,onMouseLeave:x},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:"block-editor-inserter__media-list__item",onClick:()=>w(v),"aria-label":C}),(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},b,y&&(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,u.createElement)(g.Spinner,null)))),!y&&(0,u.createElement)(bm,{category:i,media:n}))))})),l&&(0,u.createElement)(_m,{onClose:()=>s(!1),onSubmit:()=>{r((0,a.cloneBlock)(v)),E((0,_.__)("Image inserted."),{type:"snackbar"}),s(!1)}}))}var Em=function(e){let{mediaList:t,category:n,onClick:r,label:o=(0,_.__)("Media List")}=e;const i=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},i,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o}),t.map(((e,t)=>(0,u.createElement)(km,{key:e.id||e.sourceId||t,media:e,category:n,onClick:r,composite:i}))))};function Sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,u.useState)(e),[r,o]=(0,u.useState)(e),i=(0,f.useDebounce)(o,250);return(0,u.useEffect)((()=>{r!==t&&i(t)}),[r,t]),[t,n,r]}function wm(e){let{rootClientId:t,onInsert:n,category:r}=e;const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(o.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,u.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,u.createElement)(Cm,{rootClientId:t,onInsert:n,category:r}))}function Cm(e){let{rootClientId:t,onInsert:n,category:r}=e;const[o,i,l]=Sm(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=(0,u.useState)(),[o,i]=(0,u.useState)(!1),l=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{var n;const o=JSON.stringify({category:e.name,...t});l.current=o,i(!0),r([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));o===l.current&&(r(a),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:o}}(r,{per_page:l?20:10,search:l}),c="block-editor-inserter__media-panel",p=r.labels.search_items||(0,_.__)("Search");return(0,u.createElement)("div",{className:c},(0,u.createElement)(g.SearchControl,{className:`${c}-search`,onChange:i,value:o,label:p,placeholder:p}),s&&(0,u.createElement)("div",{className:`${c}-spinner`},(0,u.createElement)(g.Spinner,null)),!s&&!(null!=a&&a.length)&&(0,u.createElement)(xf,null),!s&&!(null==a||!a.length)&&(0,u.createElement)(Em,{rootClientId:t,onClick:n,mediaList:a,category:r}))}var Im=function(e){let{fallback:t=null,children:n}=e;const r=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().mediaUpload}),[]);return r?n:t};var Am=(0,g.withFilters)("editor.MediaUpload")((()=>null));const xm=["image","video","audio"];var Bm=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:r,onInsert:o}=e;const i=pm(t),l=(0,f.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,u.useCallback)((e=>{if(null==e||!e.url)return;const[t]=gm(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return(0,u.createElement)(u.Fragment,null,!l&&(0,u.createElement)("div",{className:`${a}-container`},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Media categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:a},i.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>r(e),className:d()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.labels.name),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(Im,null,(0,u.createElement)(Am,{multiple:!1,onSelect:s,allowedTypes:xm,render:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,_.__)("Open Media Library"))}})))))),l&&(0,u.createElement)(tm,{categories:c},(e=>(0,u.createElement)(Cm,{onInsert:o,rootClientId:t,category:e}))))};const{Fill:Pm,Slot:Tm}=(0,g.createSlotFill)("__unstableInserterMenuExtension");Pm.Slot=Tm;var Om=Pm;const Nm=[];var Mm=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:p=!1,isDraggable:d=!0,shouldFocusBlock:m=!0,prioritizePatterns:y,selectBlockOnInsert:h,orderInitialBlockItems:v}=e;const b=(0,f.useDebounce)(dn.speak,500),[k,E]=Bf({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,I]=yf(k,E),[A,,x]=_f(E,k),B=(0,u.useMemo)((()=>{if(0===s)return[];const e=qf(A,t);return void 0!==s?e.slice(0,s):e}),[t,A,s]);let P=c;y&&B.length>2&&(P=0);const T=(0,u.useMemo)((()=>{if(0===P)return[];let e=J(S,"frecency","desc");!t&&v&&(e=v(e));const n=Kf(e,w,C,t);return void 0!==P?n.slice(0,P):n}),[t,S,w,C,c,v]);(0,u.useEffect)((()=>{if(!t)return;const e=T.length+B.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const O=(0,f.useAsyncList)(T,{step:9}),N=(0,f.useAsyncList)(O.length===T.length?B:Nm),M=T.length>0||B.length>0,R=!!T.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Blocks"))},(0,u.createElement)(ff,{items:O,onSelect:I,onHover:r,label:(0,_.__)("Blocks"),isDraggable:d})),F=!!B.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Block Patterns"))},(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,u.createElement)(wf,{shownPatterns:N,blockPatterns:B,onClickPattern:x,onHover:r,isDraggable:d})));return(0,u.createElement)(gf,null,!p&&!M&&(0,u.createElement)(xf,null),y?F:R,!!T.length&&!!B.length&&(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),y?R:F,p&&(0,u.createElement)(Om.Slot,{fillProps:{onSelect:I,onHover:r,filterValue:t,hasItems:M,rootClientId:k}},(e=>e.length?e:M?null:(0,u.createElement)(xf,null))))};const Rm={name:"blocks",title:(0,_.__)("Blocks")},Fm={name:"patterns",title:(0,_.__)("Patterns")},Lm={name:"reusable",title:(0,_.__)("Reusable"),icon:G},Dm={name:"media",title:(0,_.__)("Media")};var Um=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,showMedia:o=!1,onSelect:i,prioritizePatterns:l}=e;const a=(0,u.useMemo)((()=>{const e=[];return l&&n&&e.push(Fm),e.push(Rm),!l&&n&&e.push(Fm),o&&e.push(Dm),r&&e.push(Lm),e}),[l,Rm,n,Fm,r,o,Lm]);return(0,u.createElement)(g.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)};var jm=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:p=!0,prioritizePatterns:f}=e;const[y,h,v]=Sm(c),[b,k]=(0,u.useState)(null),[E,S]=(0,u.useState)(null),[w,C]=(0,u.useState)(null),[I,A]=(0,u.useState)(null),[x,B,P]=Bf({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:p}),{showPatterns:T,inserterItems:O}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(xr);return{showPatterns:!!t(x).length,inserterItems:n(x)}}),[x]),N=(0,u.useMemo)((()=>O.some((e=>{let{category:t}=e;return"reusable"===t}))),[O]),M=!!pm(x).length,R=(0,u.useCallback)(((e,t,n)=>{B(e,t,n),l()}),[B,l]),F=(0,u.useCallback)(((e,t)=>{B(e,{patternName:t}),l()}),[B,l]),L=(0,u.useCallback)((e=>{P(!!e),k(e)}),[P,k]),D=(0,u.useCallback)((e=>{P(!!e)}),[P]),U=(0,u.useCallback)((e=>{S(e)}),[S]),j=(0,u.useMemo)((()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__block-list"},(0,u.createElement)(vf,{rootClientId:x,onInsert:R,onHover:L,showMostUsedBlocks:s})),a&&(0,u.createElement)("div",{className:"block-editor-inserter__tips"},(0,u.createElement)(g.VisuallyHidden,{as:"h2"},(0,_.__)("A tip for using the block editor")),(0,u.createElement)(fp,null)))),[x,R,L,v,s,a]),z=(0,u.useMemo)((()=>(0,u.createElement)(am,{rootClientId:x,onInsert:F,onSelectCategory:U,selectedCategory:E})),[x,F,U,E]),V=(0,u.useMemo)((()=>(0,u.createElement)(um,{rootClientId:x,onInsert:R,onHover:L})),[x,R,L]),G=(0,u.useMemo)((()=>(0,u.createElement)(Bm,{rootClientId:x,selectedCategory:w,onSelectCategory:C,onInsert:R})),[x,R,w,C]),H=(0,u.useCallback)((e=>"blocks"===e.name?j:"patterns"===e.name?z:"reusable"===e.name?V:"media"===e.name?G:void 0),[j,z,V,G]),W=(0,u.useRef)();(0,u.useImperativeHandle)(t,(()=>({focusSearch:()=>{W.current.focus()}})));const $="patterns"===I&&!v&&E,K=!v&&(T||N||M),q="media"===I&&!v&&w;return(0,u.createElement)("div",{className:"block-editor-inserter__menu"},(0,u.createElement)("div",{className:d()("block-editor-inserter__main-area",{"show-as-tabs":K})},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&k(null),h(e)},value:y,label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search"),ref:W}),!!v&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,u.createElement)(Mm,{filterValue:v,onSelect:l,onHover:L,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:p})),K&&(0,u.createElement)(Um,{showPatterns:T,showReusableBlocks:N,showMedia:M,prioritizePatterns:f,onSelect:A},H),!v&&!K&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},j)),q&&(0,u.createElement)(wm,{rootClientId:x,onInsert:R,category:w}),a&&b&&(0,u.createElement)(rf,{item:b}),$&&(0,u.createElement)(im,{rootClientId:x,onInsert:F,onHover:D,category:E,showTitlesAsTooltip:!0}))}));function zm(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a}=e;const[s,c]=(0,u.useState)(""),[p,f]=Bf({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:l}),[y]=yf(p,f),[h]=_f(f,p),{setInserterIsOpened:v,insertionIndex:b}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(xr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),k=h.length&&(!!s||i),E=k&&h.length>6||y.length>6;(0,u.useEffect)((()=>{v&&v(!1)}),[v]);let S=0;return k&&(S=i?4:2),(0,u.createElement)("div",{className:d()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":v})},E&&(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search")}),(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,u.createElement)(Mm,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:S,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a})),v&&(0,u.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:s})},"aria-label":(0,_.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,_.__)("Browse all")))}const Vm=e=>{let{onToggle:t,disabled:n,isOpen:r,blockTitle:o,hasSingleBlockType:i,toggleProps:l={},prioritizePatterns:a}=e;const{as:s=g.Button,label:p,onClick:d,...f}=l;let m=p;return!m&&i?m=(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),o):!m&&a?m=(0,_.__)("Add pattern"):m||(m=(0,_._x)("Add block","Generic label for block inserter button")),(0,u.createElement)(s,c({icon:pp,label:m,tooltipPosition:"bottom",onClick:function(e){t&&t(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&r,disabled:n},f))};class Gm extends u.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=Vm,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:p}=this.props;return l?(0,u.createElement)(zm,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a,selectBlockOnInsert:c,orderInitialBlockItems:p}):(0,u.createElement)(jm,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,u.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:d()("block-editor-inserter__popover",{"is-quick":o}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,_.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const Hm=(0,f.compose)([(0,m.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:o,shouldDirectInsert:i=!0}=t;const{getBlockRootClientId:l,hasInserterItems:s,getAllowedBlocks:c,__experimentalGetDirectInsertBlock:u,getSettings:p}=e(xr),{getBlockVariations:d}=e(a.store);o=o||l(r)||void 0;const f=c(o),m=i&&u(o),y=p(),g=1===(null==f?void 0:f.length)&&0===(null===(n=d(f[0].name,"inserter"))||void 0===n?void 0:n.length);let h=!1;return g&&(h=f[0]),{hasItems:s(o),hasSingleBlockType:g,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:m,rootClientId:o,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:p}=t;if(!l&&!c)return;const{insertBlock:d}=e(xr);let f;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=r(xr);if(!e||!o&&!n)return{};const l={};let a={};if(o){const e=t(o),n=t(i(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);f=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else f=(0,a.createBlock)(s.name);var m;(d(f,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:a}=r(xr);if(o)return e(o);const s=t();return!i&&s&&a(s)===n?e(s)+1:l(n).length}(),n,p),u)&&u({clientId:null===(m=f)||void 0===m?void 0:m.clientId});const y=(0,_.sprintf)((0,_.__)("%s block added"),s.title);(0,dn.speak)(y)}}})),(0,f.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(Gm);var Wm=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Hm,c({ref:t},e,{orderInitialBlockItems:void 0}))));var $m=(0,f.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(xr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(xr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,up.decodeEntities)(o)||(0,_.__)("Type / to choose a block");return(0,u.createElement)("div",{"data-root-client-id":i||"",className:d()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,u.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,_.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Xu.ENTER!==e.keyCode&&Xu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,u.createElement)(Wm,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Km(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,u.createElement)(Wm,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:p}=e;n=p?(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),c):(0,_._x)("Add block","Generic label for block inserter button");const f=!p;let m=(0,u.createElement)(g.Button,{ref:t,onFocus:o,tabIndex:i,className:d()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!p&&(0,u.createElement)(g.VisuallyHidden,{as:"span"},n),(0,u.createElement)(Xi,{icon:pp}));return(f||p)&&(m=(0,u.createElement)(g.Tooltip,{text:n},m)),m},isAppender:!0})}const qm=(0,u.forwardRef)(((e,t)=>($()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Km(e,t))));var Jm=(0,u.forwardRef)(Km);function Ym(e){let{rootClientId:t}=e;return(0,m.useSelect)((e=>e(xr).canInsertBlockType((0,a.getDefaultBlockName)(),t)))?(0,u.createElement)($m,{rootClientId:t}):(0,u.createElement)(Jm,{rootClientId:t,className:"block-list-appender__toggle"})}var Qm=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:o="div"}=e;const i=function(e,t){const{hideInserter:n,isParentSelected:r}=(0,m.useSelect)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:r,__unstableGetEditorMode:o}=t(xr),i=r();return{hideInserter:!!n(e)||"zoom-out"===o(),isParentSelected:e===i||!e&&!i}}),[e]);return n||!1===t?null:t?(0,u.createElement)(t,null):r?(0,u.createElement)(Ym,{rootClientId:e}):null}(t,n);return i?(0,u.createElement)(o,{tabIndex:-1,className:d()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},i):null};const Zm=Number.MAX_SAFE_INTEGER;(0,u.createContext)();var Xm=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...l}=e;const[a,s]=(0,u.useReducer)((e=>(e+1)%Zm),0),{orientation:p,rootClientId:f,isVisible:y}=(0,m.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(xr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),h=eo(t),v=eo(n),b="vertical"===p,k=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return{};const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(b)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,_.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[h,v,b,a,y]),E=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return;const{ownerDocument:e}=h||v;return{ownerDocument:e,getBoundingClientRect(){const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return b?(r=e?e.bottom:t.top,n=(0,_.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,_.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[h,v,a,b,y]),S=qo(i);return(0,u.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(s);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]),(0,u.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(s);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,u.useLayoutEffect)((()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=h.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[h]),(h||v)&&y?(0,u.createElement)(g.Popover,c({ref:S,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+f},l,{className:d()("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"bottom-start",variant:"unstyled"}),(0,u.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const ey={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var ty=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:r}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(xr),r=n(),o=t(r.rootClientId);return o.length?{clientId:o[r.index]}:{}}),[]),o=(0,f.useReducedMotion)();return(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,u.createElement)(g.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?ey.show:ey.hide,animate:ey.show,exit:o?ey.show:ey.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const ny=(0,u.createContext)();function ry(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,m.useDispatch)(xr),i=(0,u.useContext)(ny),l=(0,u.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:p,isInserterShown:y,isDistractionFree:h,isNavigationMode:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(xr),u=o(),p=n(u.rootClientId);if(!p.length)return{};let d=p[u.index-1],f=p[u.index];for(;i(d);)d=l(d);for(;i(f);)f=a(f);const m=s();return{previousClientId:d,nextClientId:f,orientation:(null===(t=r(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:m.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),b=(0,f.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:y?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},k={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h&&!v)return null;const E=d()("block-editor-block-list__insertion-point","is-"+a);return(0,u.createElement)(Xm,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,u.createElement)(g.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&c&&r(c,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:d()(E,{"is-with-inserter":y}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,u.createElement)(g.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),y&&(0,u.createElement)(g.__unstableMotion.div,{variants:k,className:d()("block-editor-block-list__insertion-point-inserter")},(0,u.createElement)(Wm,{position:"bottom center",clientId:c,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function oy(e){const{insertionPoint:t,isVisible:n}=(0,m.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(xr);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,u.createElement)(ty,c({key:`${t.rootClientId}-${t.index}`},e)):(0,u.createElement)(ry,e):null}function iy(){const e=(0,u.useContext)(ny),t=(0,m.useSelect)((e=>e(xr).getSettings().isDistractionFree||"zoom-out"===e(xr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,m.useSelect)(xr),{showInsertionPoint:p,hideInsertionPoint:d}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)};function i(t){var r;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void d();let i;if(!t.target.classList.contains("is-root-container")){i=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(i))return;const u=(null===(r=n(i))||void 0===r?void 0:r.orientation)||"vertical",f=t.clientY,m=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>f||e.classList.contains("wp-block")&&"horizontal"===u&&t.left>m}));if(!y)return void d();if(!y.id&&(y=y.firstElementChild,!y))return void d();const g=y.id.slice("block-".length);if(!g||c(g))return;if(a().includes(g))return;const h=y.getBoundingClientRect();if("horizontal"===u&&(t.clientY>h.bottom||t.clientYh.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,ay="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function sy(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(xr),{getBlockType:o,getActiveBlockVariation:i}=t(a.store),l=n(e),s=o(l);if(!s)return null;const c=r(e),u=i(l,c),p=(0,a.isReusableBlock)(s)||(0,a.isTemplatePart)(s),d={isSynced:p,title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{isSynced:p,title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function cy(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:o,name:i,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(xr),i=n(t);if(!i)return{};const l=(0,a.isReusableBlock)((0,a.getBlockType)(i));return{attributes:r(t),name:i,reusableBlockTitle:l&&o(r(t).ref)}}),[t]),s=sy(t);if(!i||!s)return null;const c=(0,a.getBlockType)(i),u=c?(0,a.__experimentalGetBlockLabel)(c,o,r):null,p=l||u,d=p&&p!==c.title?p:s.title;if(n&&n>0&&d.length>n){const e="...";return d.slice(0,n-e.length)+e}return d}function uy(e){let{clientId:t,maximumLength:n,context:r}=e;return cy({clientId:t,maximumLength:n,context:r})}var py=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:s,icon:c}=(0,m.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(xr),l=o(n[0]),s=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,u.useRef)(!1),[d,f,y]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,u.useCallback)((o=>{e.current=o.clientY,n.current=(0,Ml.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:v}=(0,m.useDispatch)(xr);if((0,u.useEffect)((()=>()=>{p.current&&v()}),[]),!s)return t({draggable:!1});const b={type:"block",srcClientIds:n,srcRootClientId:l};return(0,u.createElement)(g.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:b,onDragStart:e=>{h(n),p.current=!0,d(e),o&&o()},onDragOver:f,onDragEnd:()=>{v(),p.current=!1,y(),i&&i()},__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:c})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var dy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var fy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const my=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,_.isRTL)()?"left":"right":"down":null;function yy(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,_.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=my("down",i);if("down"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=my("down",i);if("down"===e)return(0,_.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=my("up",i);if("up"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=my("up",i);if("up"===e)return(0,_.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,_.sprintf)((0,_.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const gy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?mp:yp:dy:"down"===e?"horizontal"===t?(0,_.isRTL)()?yp:mp:fy:null,hy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move right"):(0,_.__)("Move left"):(0,_.__)("Move up"):"down"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move left"):(0,_.__)("Move right"):(0,_.__)("Move down"):null,vy=(0,u.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const l=(0,f.useInstanceId)(vy),s=Array.isArray(n)?n:[n],p=s.length,{blockType:y,isDisabled:h,rootClientId:v,isFirst:b,isLast:_,firstIndex:k,orientation:E="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(xr),u=s[0],p=n(u),d=t(u),f=t(s[s.length-1]),m=i(p),y=l(u),g=0===d,h=f===m.length-1,{orientation:v}=c(p)||{};return{blockType:y?(0,a.getBlockType)(y.name):null,isDisabled:"up"===r?g:h,rootClientId:p,firstIndex:d,isFirst:g,isLast:h,orientation:o||v}}),[n,r]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(xr),C="up"===r?w:S,I=`block-editor-block-mover-button__description-${l}`;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,c({ref:t,className:d()("block-editor-block-mover-button",`is-${r}-button`),icon:gy(r,E),label:hy(r,E),"aria-describedby":I},i,{onClick:h?null:e=>{C(n,v),i.onClick&&i.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,u.createElement)(g.VisuallyHidden,{id:I},yy(p,y&&y.title,k,b,_,"up"===r?-1:1,E)))})),by=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"up",ref:t},e)))),_y=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"down",ref:t},e))));var ky=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:l,orientation:a}=(0,m.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(xr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&l&&!o)return null;const s=(0,_.__)("Drag");return(0,u.createElement)(g.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,u.createElement)(py,{clientIds:t},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,u.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(by,c({clientIds:t},e)))),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(_y,c({clientIds:t},e))))))};var Ey=function(e){let{clientId:t,rootClientId:n}=e;const r=sy(t),o=(0,m.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(xr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:i,name:l,attributes:s,blockMovingMode:p,orientation:f,editorMode:y}=o,{setNavigationMode:h,removeBlock:v}=(0,m.useDispatch)(xr),b=(0,u.useRef)(),k=(0,a.getBlockType)(l),E=(0,a.__experimentalGetAccessibleBlockLabel)(k,s,i+1,f);(0,u.useEffect)((()=>{b.current.focus(),(0,dn.speak)(E)}),[E]);const S=eo(t),{hasBlockMovingClientId:w,getBlockIndex:C,getBlockRootClientId:I,getClientIdsOfDescendants:A,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,m.useSelect)(xr),{selectBlock:O,clearSelectedBlock:N,setBlockMovingClientId:M,moveBlockToPosition:R}=(0,m.useDispatch)(xr),F=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!p}),L=(0,_.__)("Drag");return(0,u.createElement)("div",{className:F},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:null==r?void 0:r.icon,showColors:!0})),(0,u.createElement)(g.FlexItem,null,"zoom-out"===y&&(0,u.createElement)(ky,{clientIds:[t],hideDragHandle:!0}),"navigation"===y&&(0,u.createElement)(py,{clientIds:[t]},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-selection-button_drag-handle","aria-hidden":"true",label:L,tabIndex:"-1"},e))))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{ref:b,onClick:"navigation"===y?()=>h(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===Xu.UP,o=n===Xu.DOWN,i=n===Xu.LEFT,l=n===Xu.RIGHT,a=n===Xu.TAB,s=n===Xu.ESCAPE,c=n===Xu.ENTER,u=n===Xu.SPACE,p=e.shiftKey;if(n===Xu.BACKSPACE||n===Xu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),m=P(f||d),y=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=m;else if(h)k=y;else if(b){var E;k=null!==(E=I(d))&&void 0!==E?E:d}else if(_){var F;k=null!==(F=A([d])[0])&&void 0!==F?F:d}const L=w();if(s&&L&&!e.defaultPrevented&&(M(null),e.preventDefault()),(c||u)&&L){const e=I(L),t=I(d),n=C(L);let r=C(d);n{!function(e){const[t]=Ml.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",a),(0,u.useEffect)((()=>{i&&a()}),[n,i,a]),(0,u.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Sy(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Sy(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Cy=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const l=(0,u.useRef)(),a=function(e){const[t,n]=(0,u.useState)(!0),r=(0,u.useCallback)((()=>{const t=!Ml.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(l);return wy(l,n,a,r,o),a?(0,u.createElement)(g.Toolbar,c({label:i["aria-label"],ref:l},i),t):(0,u.createElement)(g.NavigableMenu,c({orientation:"horizontal",role:"toolbar",ref:l},i),t)};const{clearTimeout:Iy,setTimeout:Ay}=window,xy=()=>{},By=200;function Py(e){let{ref:t,isFocused:n,debounceTimeout:r=By,onChange:o=xy}=e;const[i,l]=(0,u.useState)(!1),a=(0,u.useRef)(),s=e=>{null!=t&&t.current&&l(e),o(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=a.current;e&&Iy&&Iy(e)};return(0,u.useEffect)((()=>()=>{s(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),a.current=Ay((()=>{c()&&s(!1)}),r)}}}function Ty(e){let{ref:t,debounceTimeout:n=By,onChange:r=xy}=e;const[o,i]=(0,u.useState)(!1),{showMovers:l,debouncedShowMovers:a,debouncedHideMovers:s}=Py({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,u.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),a())},r=()=>{p()||(i(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,a,s]),{showMovers:l,gestures:{onMouseMove:a,onMouseLeave:s}}}function Oy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(xr),{firstParentClientId:n,shouldHide:r,isDistractionFree:o}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(xr),{hasBlockSupport:i}=e(a.store),l=n(r()),s=l[l.length-1],c=t(s),u=(0,a.getBlockType)(c),p=o();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),isDistractionFree:p.isDistractionFree}}),[]),i=sy(n),l=(0,u.useRef)(),{gestures:s}=Ty({ref:l,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,u.createElement)("div",c({className:"block-editor-block-parent-selector",key:n,ref:l},s),(0,u.createElement)(g.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,_.sprintf)((0,_.__)("Select %s"),null==i?void 0:i.title),showTooltip:!0,icon:(0,u.createElement)(hp,{icon:null==i?void 0:i.icon})}))}var Ny=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 My(e){let{blocks:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(tf,{viewportWidth:500,blocks:t})))))}function Ry(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,u.createElement)(Fy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function Fy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:o,icon:i,title:l,isDisabled:s}=t;return(0,u.createElement)(g.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),n(o)},disabled:s,onMouseLeave:()=>r(null),onMouseEnter:()=>r(o)},(0,u.createElement)(hp,{icon:i,showColors:!0}),l)}var Ly=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,u.useState)(),{priorityTextTransformations:s,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,u.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r](0,u.createElement)(Fy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:l}))),!p&&d),!!p&&(0,u.createElement)(g.MenuGroup,{className:t},d))};var Dy=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Uy=window.wp.tokenList,jy=n.n(Uy);function zy(e,t,n){const r=new(jy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function Vy(e){return null==e?void 0:e.find((e=>e.isDefault))}function Gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:o,blockType:i,className:l}=(0,m.useSelect)((e=>{const{getBlock:n}=e(xr),r=n(t);if(!r)return{};const o=(0,a.getBlockType)(r.name),{getBlockStyles:i}=e(a.store);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:s}=(0,m.useDispatch)(xr),c=function(e){return e&&0!==e.length?Vy(e)?e:[{name:"default",label:(0,_._x)("Default","block style"),isDefault:!0},...e]:[]}(r),p=function(e,t){for(const n of new(jy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(r)return r}return Vy(e)}(c,l),d=function(e,t){return(0,u.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,a.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=zy(l,p,e);s(t,{className:r}),n()},stylesToRender:c,activeStyle:p,genericPreviewBlock:d,className:l}}const Hy=()=>{};function Wy(e){let{clientId:t,onSwitch:n=Hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=Gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,u.createElement)(u.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,u.createElement)(g.MenuItem,{key:e.name,icon:i.name===e.name?Dy:null,onClick:()=>r(e)},(0,u.createElement)(g.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function $y(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,u.createElement)(Wy,{clientId:r,onSwitch:n}))}const Ky=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=Ky(e,t,n);if(r)return r}}},qy=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Jy=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=Ky(o,t.name,r);if(n){e=!0,r.add(n.clientId),qy(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Yy(e){let{patterns:t,onSelect:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Qy,{patterns:t,onSelect:n})))))}function Qy(e){let{patterns:t,onSelect:n}=e;const r=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,_.__)("Patterns list")}),t.map((e=>(0,u.createElement)(Zy,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Zy(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,f.useInstanceId)(Zy,`${o}-list__item-description`);return(0,u.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,u.createElement)(tf,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,u.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,u.createElement)(g.VisuallyHidden,{id:i},t.description))}var Xy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,u.useState)(!1),l=Jy(n,t);return l.length?(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,u.createElement)(Yy,{patterns:l,onSelect:r}),(0,u.createElement)(g.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:mp},(0,_.__)("Patterns"))):null};const eg=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r,multiSelect:o}=(0,m.useDispatch)(xr),i=sy(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:d}=(0,m.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:o,__experimentalGetPatternTransformItems:l}=e(xr),{getBlockStyles:s,getBlockType:c}=e(a.store),{canRemoveBlocks:u}=e(xr),p=r(Array.isArray(t)?t[0]:t),[{name:d}]=n,f=1===n.length,m=f&&s(d);let y;if(f)y=null==i?void 0:i.icon;else{var g;y=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(g=c(d))||void 0===g?void 0:g.icon:Ny}return{possibleBlockTransformations:o(n,p),canRemove:u(t,p),hasBlockStyles:!(null==m||!m.length),icon:y,patterns:l(n,p)}}),[t,n,null==i?void 0:i.icon]),f=cy({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),y=1===n.length&&(0,a.isReusableBlock)(n[0]),h=1===n.length&&(0,a.isTemplatePart)(n[0]);function v(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const b=!!l.length&&s&&!h,k=!(null==d||!d.length)&&s;if(!c&&!b)return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f))}));const E=f,S=1===n.length?(0,_.sprintf)((0,_.__)("%s: Change block type or style"),f):(0,_.sprintf)((0,_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),w=c||b||k;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(g.DropdownMenu,{className:"block-editor-block-switcher",label:E,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return w&&(0,u.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,u.createElement)(Xy,{blocks:n,patterns:d,onSelect:e=>{!function(e){r(t,e),v(e)}(e),o()}}),b&&(0,u.createElement)(Ly,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{!function(e){const o=(0,a.switchToBlockType)(n,e);r(t,o),v(o)}(e),o()}}),c&&(0,u.createElement)($y,{hoveredBlock:n[0],onSwitch:o}))})))))};var tg=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(xr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,u.createElement)(eg,{clientIds:t,blocks:n})};const{Fill:ng,Slot:rg}=(0,g.createSlotFill)("__unstableBlockToolbarLastItem");ng.Slot=rg;var og=ng;function ig(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function lg(){const{getBlockName:e}=(0,m.useSelect)(xr),{getBlockType:t}=(0,m.useSelect)(a.store),{createSuccessNotice:n}=(0,m.useDispatch)(bf.store);return(0,u.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,_.sprintf)((0,_.__)('Copied "%s" to clipboard.'),a):(0,_.sprintf)((0,_.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,_.sprintf)((0,_._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,_.sprintf)((0,_._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function ag(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:o,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:c}=(0,m.useSelect)(xr),{flashBlock:u,removeBlocks:p,replaceBlocks:d,__unstableDeleteSelection:y,__unstableExpandSelection:g,insertBlocks:h}=(0,m.useDispatch)(xr),v=lg();return(0,f.useRefEffect)((f=>{function m(m){const b=t();if(0===b.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ml.documentHasUncollapsedSelection)(t):(0,Ml.documentHasSelection)(t))return}if(!f.contains(m.target.ownerDocument.activeElement))return;const _=m.defaultPrevented;m.preventDefault();const k=l(),E=i()||o(),S=!E&&!k;if("copy"===m.type||"cut"===m.type)if(1===b.length&&u(b[0]),S)g();else{let t;if(v(m.type,b),E)t=e(b);else{const[n,r]=s();t=[n,...e(b.slice(1,b.length-1)),r]}const n=m.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,a.createBlock)(n,JSON.parse(m.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,a.serialize)(t);m.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Ml.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),m.clipboardData.setData("text/html",r)}if("cut"===m.type)E&&!S?p(b):y();else if("paste"===m.type){if(_)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n,files:o}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Ml.getFilesFromDataTransfer)(t);return o.length&&!ig(o,r)?{files:o}:{html:r,plainText:n,files:[]}}(m);let i=[];if(o.length){const e=(0,a.getBlockTransforms)("from");i=o.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat()}else i=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===b.length){const[e]=b;if(i.every((t=>c(t.name,e))))return void h(i,void 0,e)}d(b,i,i.length-1,-1)}}return f.ownerDocument.addEventListener("copy",m),f.ownerDocument.addEventListener("cut",m),f.ownerDocument.addEventListener("paste",m),()=>{f.ownerDocument.removeEventListener("copy",m),f.ownerDocument.removeEventListener("cut",m),f.ownerDocument.removeEventListener("paste",m)}}),[])}var sg=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:ag()},t)};const cg="align",ug="__experimentalBorder",pg="color",dg="customClassName",fg="typography.__experimentalFontFamily",mg="typography.fontSize",yg="__experimentalLayout",gg=[...["typography.lineHeight",mg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",fg,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],ug,pg,"spacing"];const hg={align:e=>(0,a.hasBlockSupport)(e,cg),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,ug);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}(e,"color"),backgroundColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.background},textColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.text},gradient:e=>{const t=(0,a.getBlockSupport)(e,pg);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,a.hasBlockSupport)(e,dg,!0),fontFamily:e=>(0,a.hasBlockSupport)(e,fg),fontSize:e=>(0,a.hasBlockSupport)(e,mg),layout:e=>(0,a.hasBlockSupport)(e,yg),style:e=>gg.some((t=>(0,a.hasBlockSupport)(e,t)))};function vg(e,t){return Object.entries(hg).reduce(((n,r)=>{let[o,i]=r;return i(e.name)&&i(t.name)&&(n[o]=e.attributes[o]),n}),{})}function bg(e,t,n){for(let r=0;r{let l="";try{if(!window.navigator.clipboard)return void o((0,_.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});l=await window.navigator.clipboard.readText()}catch(e){return void o((0,_.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!l||!function(e){try{const t=(0,a.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(l))return void r((0,_.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,a.parse)(l);if(1===s.length?e.batch((()=>{bg(i,i.map((()=>s[0])),t)})):e.batch((()=>{bg(i,s,t)})),1===i.length){var c;const e=null===(c=(0,a.getBlockType)(i[0].name))||void 0===c?void 0:c.title;n((0,_.sprintf)((0,_.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,_.sprintf)((0,_.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,r,o])}function kg(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:s,canRemoveBlocks:c}=(0,m.useSelect)(xr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,m.useSelect)(a.store),d=l(t),f=i(t[0]),y=d.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,f))),g=o(u(),f),h=s(t,f),v=c(t,f),{removeBlocks:b,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:E,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:A}=(0,m.useDispatch)(xr),x=lg(),B=_g();return n({canDuplicate:y,canInsertDefaultBlock:g,canMove:h,canRemove:v,rootClientId:f,blocks:d,onDuplicate(){return k(t,r)},onRemove(){return b(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;S(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){I(!0),A(t[0]),C(t[0])},onGroup(){if(!d.length)return;const e=p(),n=(0,a.switchToBlockType)(d,e);n&&_(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&w(e[0]),x("copy",e)},async onPasteStyles(){await B(d)}})}const Eg=()=>{};var Sg=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(xr),l=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:l?(0,a.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=Eg,clientId:r}=t;return{onToggleMode(){e(xr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!(0,a.hasBlockSupport)(t,"html",!0)||!i)return null;const l="visual"===n?(0,_.__)("Edit as HTML"):(0,_.__)("Edit visually");return(0,u.createElement)(g.MenuItem,{onClick:r},!o&&l)}));var wg=(0,f.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(xr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(xr).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,_.__)("Convert to Blocks");return(0,u.createElement)(g.MenuItem,{onClick:n},!r&&o)}));const{Fill:Cg,Slot:Ig}=(0,g.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Cg.Slot=Ig;var Ag=Cg;function xg(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(xr),{getGroupingBlockName:l}=e(a.store),s=i(),c=l(),u=o(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}function Bg(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:s}=(0,m.useDispatch)(xr);return n||r?(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(o,i);e&&s(t,e)})(),l()}},(0,_._x)("Group","verb")),r&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&s(t,e)})(),l()}},(0,_._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Pg(e){return(0,m.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(xr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var Tg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Og=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));var Ng=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const Mg=["core/block","core/navigation"];function Rg(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Fg(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:s}=Pg(t),{allowsEditLocking:c,templateLock:p,hasTemplateLock:d}=(0,m.useSelect)((e=>{var n,r;const{getBlockName:o,getBlockAttributes:i}=e(xr),l=o(t),s=(0,a.getBlockType)(l);return{allowsEditLocking:Mg.includes(l),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[y,h]=(0,u.useState)(!!p),{updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=sy(t),k=(0,f.useInstanceId)(Fg,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!s,...c?{edit:!i}:{}})}),[i,l,s,c]);const E=Object.values(r).every(Boolean),S=Object.values(r).some(Boolean)&&!E;return(0,u.createElement)(g.Modal,{title:(0,_.sprintf)((0,_.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,u.createElement)("p",null,(0,_.__)("Choose specific attributes to restrict or lock all available options.")),(0,u.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:y?Rg(r):void 0}),n()}},(0,u.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,u.createElement)("span",{id:k},(0,_.__)("Lock all")),checked:E,indeterminate:S,onChange:e=>o({move:e,remove:e,...c?{edit:e}:{}})}),(0,u.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},c&&(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Restrict editing"),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.edit?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Disable movement"),checked:r.move,onChange:e=>o((t=>({...t,move:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.move?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Prevent removal"),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.remove?Ng:Tg}))),d&&(0,u.createElement)(g.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_.__)("Apply to all blocks inside"),checked:y,disabled:r.move&&!r.remove,onChange:()=>h(!y)})),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:n},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",type:"submit"},(0,_.__)("Apply"))))))}function Lg(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Pg(t),[o,i]=(0,u.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,_.__)("Unlock"):(0,_.__)("Lock");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{icon:r?Tg:Og,onClick:i},l),o&&(0,u.createElement)(Fg,{clientId:t,onClose:i}))}const{Fill:Dg,Slot:Ug}=(0,g.createSlotFill)("BlockSettingsMenuControls");function jg(e){let{...t}=e;return(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(Dg,t))}jg.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:l}=(0,m.useSelect)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(xr),i=null!==n?n:r();return{selectedBlocks:t(i),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:a}=Pg(i[0]),s=1===i.length&&a,p=xg(),{isGroupable:d,isUngroupable:f}=p,y=(d||f)&&l;return(0,u.createElement)(Ug,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!y&&!s?null:(0,u.createElement)(g.MenuGroup,null,s&&(0,u.createElement)(Lg,{clientId:i[0]}),e,y&&(0,u.createElement)(Bg,c({},p,{onClose:null==t?void 0:t.onClose})))))};var zg=jg;const Vg=()=>{},Gg={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function Hg(e){let{blocks:t,onCopy:n,label:r}=e;const o=(0,f.useCopyToClipboard)((()=>(0,a.serialize)(t)),n),i=t.length>1?(0,_.__)("Copy blocks"):(0,_.__)("Copy block"),l=r||i;return(0,u.createElement)(g.MenuItem,{ref:o},l)}var Wg=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:o,...i}=e;const l=Array.isArray(t)?t:[t],s=l.length,p=l[0],{firstParentClientId:d,isDistractionFree:y,onlyBlock:h,parentBlockType:v,previousBlockClientId:b,nextBlockClientId:k,selectedBlockClientIds:E}=(0,m.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:s,getBlockAttributes:c}=e(xr),{getActiveBlockVariation:u}=e(a.store),d=r(p),f=d&&n(d);return{firstParentClientId:d,isDistractionFree:s().isDistractionFree,onlyBlock:1===t(d),parentBlockType:d&&(u(f,c(d))||(0,a.getBlockType)(f)),previousBlockClientId:o(p),nextBlockClientId:i(p),selectedBlockClientIds:l()}}),[p]),S=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Pp.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:w,toggleBlockHighlight:C}=(0,m.useDispatch)(xr),I=(0,u.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Vg,[n]),A=cy({clientId:p,maximumLength:25}),x=(0,u.useCallback)(n?()=>{const e=b||k||d;e&&E.includes(p)&&!E.includes(e)&&n(e)}:Vg,[n,b,k,d,E]),B=(0,_.sprintf)((0,_.__)("Remove %s"),A),P=1===s?B:(0,_.__)("Remove blocks"),T=(0,u.useRef)(),{gestures:O}=Ty({ref:T,onChange(e){e&&y||C(d,e)}}),N=null==E?void 0:E.includes(d);return(0,u.createElement)(kg,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:l,canMove:a,canRemove:m,onDuplicate:y,onInsertAfter:b,onInsertBefore:k,onRemove:E,onCopy:C,onPasteStyles:A,onMoveTo:B,blocks:M}=e;return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Gg,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Ag.Slot,{fillProps:{onClose:i}}),!N&&!!d&&(0,u.createElement)(g.MenuItem,c({},O,{ref:T,icon:(0,u.createElement)(hp,{icon:v.icon}),onClick:()=>w(d)}),(0,_.sprintf)((0,_.__)("Select parent block (%s)"),v.title)),1===s&&(0,u.createElement)(wg,{clientId:p}),(0,u.createElement)(Hg,{blocks:M,onCopy:C}),n&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,y,I),shortcut:S.duplicate},(0,_.__)("Duplicate")),l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,k),shortcut:S.insertBefore},(0,_.__)("Insert before")),(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,b),shortcut:S.insertAfter},(0,_.__)("Insert after"))),a&&!h&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,B)},(0,_.__)("Move to")),1===s&&(0,u.createElement)(Sg,{clientId:p,onToggle:i})),(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Hg,{blocks:M,onCopy:C,label:(0,_.__)("Copy styles")}),(0,u.createElement)(g.MenuItem,{onClick:A},(0,_.__)("Paste styles"))),(0,u.createElement)(zg.Slot,{fillProps:{onClose:i},clientIds:t,__unstableDisplayLocation:o}),"function"==typeof r?r({onClose:i}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:i}))),m&&(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,E,x),shortcut:S.remove},P)))}))}))};var $g=function(e){let{clientIds:t,...n}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(Wg,c({clientIds:t,toggleProps:e},n)))))};function Kg(e){let{clientId:t}=e;const n=sy(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Pg(t),[a,s]=(0,u.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,u.createElement)(g.ToolbarButton,{icon:Ng,label:(0,_.sprintf)((0,_.__)("Unlock %s"),n.title),onClick:s})),a&&(0,u.createElement)(Fg,{clientId:t,onClose:s})):null}var qg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var Jg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var Yg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Qg={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Zg=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=xg(),{replaceBlocks:o}=(0,m.useDispatch)(xr),{canRemove:i,variations:l}=(0,m.useSelect)((e=>{const{canRemoveBlocks:r}=e(xr),{getBlockVariations:o}=e(a.store);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),s=r=>{const i=(0,a.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),i&&i.length>0&&(i[0].attributes.layout=Qg[r],o(t,i))};if(!r||!i)return null;const c=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{icon:qg,label:(0,_._x)("Group","verb"),onClick:s}),c&&(0,u.createElement)(g.ToolbarButton,{icon:Jg,label:(0,_._x)("Row","single horizontal line"),onClick:()=>s("row")}),p&&(0,u.createElement)(g.ToolbarButton,{icon:Yg,label:(0,_._x)("Stack","verb"),onClick:()=>s("stack")}))};function Xg(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,m.useSelect)((e=>!!n&&"html"===e(xr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,m.useDispatch)(xr);return r?(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{onClick:()=>{o(n)}},(0,_.__)("Edit visually"))):null}var eh=(0,u.createContext)("");var th=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,isDistractionFree:l,isValid:s,isVisual:p,isContentLocked:y}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l,__unstableGetContentLockingParent:s}=e(xr),c=r(),u=c[0],p=i(u),d=l();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,a.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,isDistractionFree:d.isDistractionFree,rootClientId:p,isValid:c.every((e=>o(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,m.useDispatch)(xr),v=(0,u.useRef)(),{showMovers:b,gestures:_}=Ty({ref:v,onChange(e){e&&l||h(r,e)}}),k=(0,f.useViewportMatch)("medium","<")||i;if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const E=k||b;if(0===n.length)return null;const S=s&&p,w=n.length>1,C=(0,a.isReusableBlock)(o)||(0,a.isTemplatePart)(o),I=d()("block-editor-block-toolbar",{"is-showing-movers":E,"is-synced":C});return(0,u.createElement)("div",{className:I},!w&&!k&&!y&&(0,u.createElement)(Oy,null),(0,u.createElement)("div",c({ref:v},_),(S||w)&&!y&&(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,u.createElement)(tg,{clientIds:n}),!w&&(0,u.createElement)(Kg,{clientId:n[0]}),(0,u.createElement)(ky,{clientIds:n,hideDragHandle:t}))),S&&w&&(0,u.createElement)(Zg,null),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(eh.Provider,{value:null==o?void 0:o.name},(0,u.createElement)(og.Slot,null))),(0,u.createElement)(Xg,{clientIds:n}),!y&&(0,u.createElement)($g,{clientIds:n}))};var nh=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:o}=e(xr),{getBlockType:i}=e(a.store),l=r(),s=l[0],c=n(s),u=i(t(c[c.length-1]));return{blockType:s&&i(t(s)),hasParents:c.length,showParentSelector:u&&(0,a.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&l.length<=1&&!o(s)}}),[]);if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const s=d()("block-editor-block-contextual-toolbar",{"has-parent":i&&l,"is-fixed":n});return(0,u.createElement)(Cy,c({focusOnMount:t,className:s,"aria-label":(0,_.__)("Block tools")},r),(0,u.createElement)(th,{hideDragHandle:n}))};const{CustomSelectControl:rh}=Ir(g.privateApis),oh="position",ih="block-editor-hooks__position-selection__select-control__option",lh={key:"default",value:"",name:(0,_.__)("Default"),className:ih},ah={key:"sticky",value:"sticky",name:(0,_._x)("Sticky","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will stick to the top of the window instead of scrolling.")},sh={key:"fixed",value:"fixed",name:(0,_._x)("Fixed","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will not move when the page is scrolled.")},ch=["top","right","bottom","left"],uh=["sticky","fixed"];function ph(e){return!!(0,a.getBlockSupport)(e,oh)}function dh(e){var t,n;const r=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===r||"fixed"===r}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("position.fixed"),n=yo("position.sticky"),r=!t&&!n;return!ph(e)||r}function mh(e){var t;const{attributes:{style:n={}},clientId:r,name:o,setAttributes:i}=e,l=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.fixed)}(o),s=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.sticky)}(o),c=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:p}=(0,m.useSelect)((e=>{const{getBlockParents:t}=e(xr);return{hasParents:t(r).length}}),[r]),d=(0,u.useMemo)((()=>{const e=[lh];return(s&&!p||c===ah.value)&&e.push(ah),(l||c===sh.value)&&e.push(sh),e}),[l,s,p,c]),f=c&&d.find((e=>e.value===c))||lh;return u.Platform.select({web:d.length>1?(0,u.createElement)(Wo,{group:"position"},(0,u.createElement)(g.BaseControl,{className:"block-editor-hooks__position-selection"},(0,u.createElement)(rh,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,_.__)("Position"),hideLabelFromVision:!0,describedBy:(0,_.sprintf)((0,_.__)("Currently selected position: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};i({style:Ro(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const yh=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,oh)&&!fh(t)&&(0,u.createElement)(mh,c({key:"position"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),gh=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i;const{name:l,attributes:s}=t,p=(0,a.hasBlockSupport)(l,oh)&&!fh(t),m=(0,f.useInstanceId)(e),y=(0,u.useContext)(Jh.__unstableElementContext);let g;p&&(g=function(e){let{selector:t,style:n}=e,r="";const{type:o}=(null==n?void 0:n.position)||{};return uh.includes(o)?(r+=`${t} {`,r+=`position: ${o};`,ch.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(r+=`${e}: ${n.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(r+="z-index: 10"),r+="}",r):r}({selector:`.wp-container-${m}.wp-container-${m}`,style:null==s?void 0:s.style})||"");const h=d()(null==t?void 0:t.className,{[`wp-container-${m}`]:p&&!!g,[`is-position-${null==s||null===(n=s.style)||void 0===n||null===(r=n.position)||void 0===r?void 0:r.type}`]:p&&!!g&&!(null==s||null===(o=s.style)||void 0===o||null===(i=o.position)||void 0===i||!i.type)});return(0,u.createElement)(u.Fragment,null,p&&y&&!!g&&(0,u.createPortal)((0,u.createElement)("style",null,g),y),(0,u.createElement)(e,c({},t,{className:h})))}));(0,s.addFilter)("editor.BlockListBlock","core/editor/position/with-position-styles",gh),(0,s.addFilter)("editor.BlockEdit","core/editor/position/with-inspector-controls",yh);const hh={placement:"top-start"},vh={...hh,flip:!1,shift:!0},bh={...hh,flip:!0,shift:!1};function _h(e,t,n,r,o){if(!e||!t)return vh;const i=(null==n?void 0:n.scrollTop)||0,l=t.getBoundingClientRect(),a=i+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+r,u=l.top>c,p=l.height>s-r;return o||!u&&!p?bh:vh}function kh(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isBlockInterfaceHidden:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=Ir(e(xr));return{editorMode:t(),hasMultiSelection:r(),isMultiSelecting:n(),isTyping:o(),isBlockInterfaceHidden:i(),hasFixedToolbar:l().hasFixedToolbar,isDistractionFree:l().isDistractionFree,lastClientId:r()?a():null}}function Eh(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,showContents:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:p,isMultiSelecting:y,isTyping:g,isBlockInterfaceHidden:h,hasFixedToolbar:v,isDistractionFree:b,lastClientId:_}=(0,m.useSelect)(kh,[]),k=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(xr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),E=(0,f.useViewportMatch)("medium"),S=(0,u.useRef)(!1),{stopTyping:w}=(0,m.useDispatch)(xr),C=!g&&"edit"===s&&r,I=!p&&("navigation"===s||"zoom-out"===s),A="edit"===s&&!v&&E&&!y&&!C&&!g&&!h,x=!("edit"!==s||A||v||b||r);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",(()=>{S.current=!0,w(!0)}),{isDisabled:!x}),(0,u.useEffect)((()=>{S.current=!1}));const B=(0,u.useRef)(),P=function(e){let{contentElement:t,clientId:n}=e;const r=eo(n),[o,i]=(0,u.useState)(0),{blockIndex:l,isSticky:a}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockAttributes:r}=e(xr);return{blockIndex:t(n),isSticky:dh(r(n))}}),[n]),s=(0,u.useMemo)((()=>{if(t)return(0,Ml.getScrollContainer)(t)}),[t]),[c,p]=(0,u.useState)((()=>_h(t,r,s,o,a))),d=(0,f.useRefEffect)((e=>{i(e.offsetHeight)}),[]),y=(0,u.useCallback)((()=>p(_h(t,r,s,o,a))),[t,r,s,o]);return(0,u.useLayoutEffect)(y,[l,y]),(0,u.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",y);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(y),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",y),l&&l.disconnect()}}),[y,t,r]),{...c,ref:d}}({contentElement:null==a?void 0:a.current,clientId:t});return C?(0,u.createElement)(Yo,c({clientId:i||t,__unstableCoverTarget:!0,bottomClientId:_,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1,shift:!1},P),(0,u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,u.createElement)(Wm,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):I||A?(0,u.createElement)(Yo,c({clientId:i||t,bottomClientId:_,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1},P),A&&o&&(0,u.createElement)(nh,{focusOnMount:S.current,__experimentalInitialIndex:B.current,__experimentalOnIndexChange:e=>{B.current=e},key:t}),I&&(0,u.createElement)(Ey,{clientId:t,rootClientId:n})):null}function Sh(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,getSettings:l,isNavigationMode:s,__experimentalGetBlockListSettingsForBlocks:c}=e(xr),u=t()||n();if(!u)return;const{name:p,attributes:d={}}=o(u)||{},f=i(u),m=c(f),y=f.find((e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),g=l();return{clientId:u,rootClientId:r(u),name:p,isDistractionFree:g.isDistractionFree,isNavigationMode:s(),isEmptyDefaultBlock:p&&(0,a.isUnmodifiedDefaultBlock)({name:p,attributes:d}),capturingClientId:y}}function wh(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,m.useSelect)(Sh,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:p}=r;return l?(0,u.createElement)(Eh,{clientId:o,rootClientId:i,isEmptyDefaultBlock:a,showContents:!c||p,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Ch(e){let{children:t}=e;const n=(0,u.useContext)(ny),r=(0,u.useContext)(g.Disabled.Context);return n||r?t:($()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,u.createElement)(oy,{__unstablePopoverSlot:"block-toolbar"},(0,u.createElement)(wh,{__unstablePopoverSlot:"block-toolbar"}),t))}var Ih=(0,f.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Nr();return(0,u.createElement)(e,c({},t,{clientId:n}))}),"withClientId");var Ah=Ih((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,u.createElement)(Jm,{className:d()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xh=(0,f.compose)([Ih,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(xr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,u.createElement)($m,{rootClientId:t})}));const Bh=new WeakMap;function Ph(e,t,n,r,o,i,l){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===p){l();const e=d.map((e=>(0,a.cloneBlock)(e)));i(e,!0,null)}if("block"===p){const i=n(u[0]);if(c===e&&i===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;o(u,c,l&&i{if(!n)return;const l=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(n=>"files"===n.type&&o(n.blockName,e)&&n.isMatch(t)));if(l){const e=l.transform(t,r);i(e)}}}function Oh(e,t,n){return e=>{const t=(0,a.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function Nh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:r="insert"}=n,o=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),{canInsertBlockType:i,getBlockIndex:l,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,m.useSelect)(xr),{insertBlocks:p,moveBlocksToPosition:d,updateBlockAttributes:f,clearSelectedBlock:y,replaceBlocks:g,removeBlocks:h}=(0,m.useDispatch)(xr),v=(0,m.useRegistry)(),b=(0,u.useCallback)((function(n){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===r){const r=s(e)[t];g(r,n,void 0,i)}else p(n,t,e,o,i)}),[r,s,p,g,t,e]),_=(0,u.useCallback)(((n,o,i)=>{if("replace"===r){const r=c(n),o=s(e)[t];v.batch((()=>{h(n,!1),g(o,r,void 0,0)}))}else d(n,o,e,i)}),[r,s,c,p,d,h,t,e]),k=Ph(e,t,l,a,_,b,y),E=Th(e,0,o,f,i,b),S=Oh(0,0,b);return e=>{const t=(0,Ml.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?S(n):t.length?E(t):k(e)}}function Mh(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Mh(e,t,o);(void 0===n||i=e.x&&t.top<=e.y&&t.bottom>=e.y}function Lh(e,t){var n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i="horizontal"===o?["left","right"]:["top","bottom"],l=(0,_.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:r,blockIndex:o}=e;const u=r();let[p,d]=Rh(t,u,i);n&&Fh(t,u)&&(p=0),p0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,u.useState)({index:null,operation:"insert"}),r=(0,m.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(xr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o,getBlocks:i,getBlockIndex:l}=(0,m.useSelect)(xr),{showInsertionPoint:s,hideInsertionPoint:c}=(0,m.useDispatch)(xr),p=Nh(e,t.index,{operation:t.operation}),d=(0,f.useThrottle)((0,u.useCallback)(((t,r)=>{var c;const u=i(e);if(0===u.length)return void n({index:0,operation:"insert"});const p=u.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,a.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>r.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:l(t)}})),[d,f]=Lh(p,{x:t.clientX,y:t.clientY},null===(c=o(e))||void 0===c?void 0:c.orientation);n({index:d,operation:f}),s(e,d,{operation:f})}),[e]),200);return(0,f.__experimentalUseDropZone)({isDisabled:r,onDrop:p,onDragOver(e){d(e,e.currentTarget.ownerDocument)},onDragLeave(){d.cancel(),c()},onDragEnd(){d.cancel(),c()}})}const Uh={};function jh(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:s,templateInsertUpdatesSelection:c,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:d,renderAppender:f,orientation:y,placeholder:g,layout:h}=e;!function(e,t,n,r,o,i,l,a){const{updateBlockListSettings:s}=(0,m.useDispatch)(xr),c=(0,m.useRegistry)(),{blockListSettings:p,parentLock:d}=(0,m.useSelect)((t=>{const n=t(xr).getBlockRootClientId(e);return{blockListSettings:t(xr).getBlockListSettings(e),parentLock:t(xr).getTemplateLock(n)}}),[e]),f=(0,u.useMemo)((()=>t),t);(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,templateLock:void 0===o||"contentOnly"===d?d:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=il(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),Ko()(p,t)||(Bh.get(c)||Bh.set(c,[]),Bh.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bh.get(c))&&void 0!==e&&e.length&&c.batch((()=>{Bh.get(c).forEach((e=>{s(...e)})),Bh.set(c,[])}))})))}),[e,p,f,n,r,o,d,i,l,s,a,c])}(t,n,r,o,l,p,y,h),function(e,t,n,r){const{getBlocks:o,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,m.useSelect)(xr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,m.useDispatch)(xr),{innerBlocks:p}=(0,m.useSelect)((t=>({innerBlocks:t(xr).getBlocks(e)})),[e]),d=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const p=o(e),f=0===p.length||"all"===n||"contentOnly"===n,m=!b()(t,d.current);if(!f||!m)return;d.current=t;const y=(0,a.synchronizeBlocksWithTemplate)(p,t);b()(y,p)||(c(),s(e,y,0===p.length&&r&&0!==y.length&&l(e),i()))})),()=>{u=!0}}),[p,t,n,e])}(t,i,l,c);const v=function(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlock(e);if(!n)return;const r=t(a.store).getBlockType(n.name);return r&&0!==Object.keys(r.providesContext).length?Object.fromEntries(Object.entries(r.providesContext).map((e=>{let[t,r]=e;return[t,n.attributes[r]]}))):void 0}),[e])}(t),_=(0,m.useSelect)((e=>{var n;return null===(n=e(xr).getBlock(t))||void 0===n?void 0:n.name}),[t]),k=(0,a.getBlockSupport)(_,"__experimentalLayout")||Uh,{allowSizingOnChildren:E=!1}=k,S=yo("layout")||Uh,w=h||k,C=(0,u.useMemo)((()=>({...S,...w,...E&&{allowSizingOnChildren:!0}})),[S,w,E]);return(0,u.createElement)(Fl,{value:v},(0,u.createElement)(Qh,{rootClientId:t,renderAppender:f,__experimentalAppenderTagName:d,__experimentalLayout:C,wrapperRef:s,placeholder:g}))}function zh(e){return kp(e),(0,u.createElement)(jh,e)}const Vh=(0,u.forwardRef)(((e,t)=>{const n=Gh({ref:t},e);return(0,u.createElement)("div",{className:"block-editor-inner-blocks"},(0,u.createElement)("div",n))}));function Gh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:r}=t,{clientId:o,layout:i=null,__unstableLayoutClassNames:l=""}=Nr(),s=(0,f.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:p,hasOverlay:y}=(0,m.useSelect)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:r,__unstableGetEditorMode:i}=e(xr),l=t(o),c="navigation"===i()||s;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(l,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==l&&!n(o)&&!r(o,!0)&&c}}),[o,s]),g=Dh({rootClientId:o}),h=(0,f.useMergeRefs)([e.ref,r?null:g]),v={__experimentalCaptureToolbars:p,layout:i,...t},b=v.value&&v.onChange?zh:jh;return{...e,ref:h,className:d()(e.className,"block-editor-block-list__layout",n?"":l,{"has-overlay":y}),children:o?(0,u.createElement)(b,c({},v,{clientId:o})):(0,u.createElement)(Qh,t)}}Gh.save=a.__unstableGetInnerBlocksProps,Vh.DefaultBlockAppender=xh,Vh.ButtonBlockAppender=Ah,Vh.Content=()=>Gh.save().children;var Hh=Vh;const Wh=(0,u.createContext)(),$h=(0,u.createContext)(),Kh=new WeakMap;function qh(e){let{className:t,...n}=e;const[r,o]=(0,u.useState)(),i=(0,f.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:a,editorMode:s}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(xr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),c=(0,m.useRegistry)(),{setBlockVisibility:p}=(0,m.useDispatch)(xr),y=(0,f.useDebounce)((0,u.useCallback)((()=>{const e={};Kh.get(c).forEach((t=>{let[n,r]=t;e[n]=r})),p(e)}),[c]),300,{trailing:!0}),g=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Kh.get(c)||Kh.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");Kh.get(c).push([e,t.isIntersecting])}y()}))}),[]),h=Gh({ref:(0,f.useMergeRefs)([wp(),iy(),o]),className:d()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":a&&i,"is-navigate-mode":"navigation"===s})},n);return(0,u.createElement)(Wh.Provider,{value:r},(0,u.createElement)($h.Provider,{value:g},(0,u.createElement)("div",h)))}function Jh(e){return function(){const{patterns:e,isPreviewMode:t}=(0,m.useSelect)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(xr).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,u.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,r=-1;const o=()=>{r++,r>=e.length||((0,m.select)(xr).__experimentalGetParsedPattern(e[r].name),n=ly(o))};return n=ly(o),()=>ay(n)}),[e,t])}(),(0,u.createElement)(Ch,null,(0,u.createElement)(Or,{value:Pr},(0,u.createElement)(qh,e)))}function Yh(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=ll}=e;const{order:l,selectedBlocks:a,visibleBlocks:s}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(xr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,u.createElement)(sl,{value:i},l.map((e=>(0,u.createElement)(m.AsyncModeProvider,{key:e,value:!s.has(e)&&!a.includes(e)},(0,u.createElement)(cp,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,u.createElement)(Qm,{tagName:o,rootClientId:n,renderAppender:r}))}function Qh(e){return(0,u.createElement)(m.AsyncModeProvider,{value:!1},(0,u.createElement)(Yh,e))}function Zh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||Zh(Object.values(n).filter(Boolean))||"px"}function ev(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=Zh(r),l=0===o||o?`${o}${i}`:void 0;return l}function tv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ev(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function nv(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function rv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,l=ev(o);void 0===l&&(l=Xh(n));const a=nv(o)&&tv(o),s=a?(0,_.__)("Mixed"):null;return(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":(0,_.__)("Border radius"),disableUnits:a,isOnly:!0,value:l,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}Jh.__unstableElementContext=Wh;const ov={topLeft:(0,_.__)("Top left"),topRight:(0,_.__)("Top right"),bottomLeft:(0,_.__)("Bottom left"),bottomRight:(0,_.__)("Bottom right")};function iv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const l=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...a,[e]:r})},a="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,u.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(ov).map((e=>{let[t,o]=e;const[s,p]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(a[t]),d=a[t]?p:n[t]||n.flat;return(0,u.createElement)(g.Tooltip,{text:o,position:"top",key:t},(0,u.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":o,value:[s,d].join(""),onChange:l(t),onUnitChange:(f=t,e=>{const t={...n};t[f]=e,r(t)}),size:"__unstable-large"}))));var f})))}function lv(e){let{isLinked:t,...n}=e;const r=t?(0,_.__)("Unlink radii"):(0,_.__)("Link radii");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",null,(0,u.createElement)(g.Button,c({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r}))))}const av={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sv={px:100,em:20,rem:20};function cv(e){let{onChange:t,values:n}=e;const[r,o]=(0,u.useState)(!nv(n)||!tv(n)),[i,l]=(0,u.useState)({flat:"string"==typeof n?(0,g.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]}),s=Xh(i),c=a&&a.find((e=>e.value===s)),p=(null==c?void 0:c.step)||1,[d]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(ev(n));return(0,u.createElement)("fieldset",{className:"components-border-radius-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Radius")),(0,u.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(rv,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:a}),(0,u.createElement)(g.RangeControl,{label:(0,_.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:sv[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,u.createElement)(iv,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||av,units:a}),(0,u.createElement)(lv,{onClick:()=>o(!r),isLinked:r})))}function uv(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(cv,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=Ro({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}hd([vd,kd]);const pv=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},dv=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function fv(e,t){if(e&&t)return`has-${(0,y.kebabCase)(t)}-${e}`}function mv(){const e={disableCustomColors:!yo("color.custom"),disableCustomGradients:!yo("color.customGradient")},t=yo("color.palette.custom"),n=yo("color.palette.theme"),r=yo("color.palette.default"),o=yo("color.defaultPalette");e.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,_._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=yo("color.gradients.custom"),l=yo("color.gradients.theme"),a=yo("color.gradients.default"),s=yo("color.defaultGradients");return e.gradients=(0,u.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),s&&a&&a.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,_._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,a]),e}const yv="__experimentalBorder",gv=["top","right","bottom","left"],hv=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},vv=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},bv=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=vv(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=vv(t,"color",r);return o||{color:r}};function _v(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function kv(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:o}=t,{colors:i}=mv(),l=Ev(e.name),s=yo("border.color")&&Ev(e.name,"color"),c=yo("border.radius")&&Ev(e.name,"radius"),p=yo("border.style")&&Ev(e.name,"style"),d=yo("border.width")&&Ev(e.name,"width");if([!s,!c,!p,!d].every(Boolean)||!l)return null;const f=(0,a.getBlockSupport)(e.name,[yv,"__experimentalDefaultControls"]),m=(null==f?void 0:f.color)||(null==f?void 0:f.width),y=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=bv({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return gv.forEach((e=>{var n;const r=_v(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=bv({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,i);return(0,u.createElement)(Wo,{group:"border"},(d||s)&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,g.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,_.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:Ro({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:m,resetAllFilter:hv,panelId:n},(0,u.createElement)(g.__experimentalBorderBoxControl,{colors:i,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,l={...e};if((0,g.__experimentalHasSplitBorders)(e))l={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},gv.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=bv({colors:i,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(l[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=bv({colors:i,customColor:t});r.slug&&(n=r.slug,l.color=void 0)}const a=Ro({...o,border:{radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius,...l}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",size:"__unstable-large",value:y,__experimentalIsRenderedInSidebar:!0})),c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,_.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Sv(r,"radius")})}(e),isShownByDefault:null==f?void 0:f.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,u.createElement)(uv,e)))}function Ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,yv);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function Sv(e,t){return Ro({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function wv(e,t,n){if(!Ev(t,"color")||Uo(t,yv,"color"))return e;const r=Cv(n),o=d()(e.className,r);return e.className=o||void 0,e}function Cv(e){var t;const{borderColor:n,style:r}=e,o=fv("border-color",n);return d()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Iv=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i,l,a,s,p,d;const{name:f,attributes:m}=t,{borderColor:y,style:g}=m,{colors:h}=mv();if(!Ev(f,"color")||Uo(f,yv,"color"))return(0,u.createElement)(e,t);const{color:v}=bv({colors:h,namedColor:y}),{color:b}=bv({colors:h,namedColor:_v(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=bv({colors:h,namedColor:_v(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=bv({colors:h,namedColor:_v(null==g||null===(l=g.border)||void 0===l||null===(a=l.bottom)||void 0===a?void 0:a.color)}),{color:E}=bv({colors:h,namedColor:_v(null==g||null===(s=g.border)||void 0===s||null===(p=s.left)||void 0===p?void 0:p.color)}),S={borderTopColor:b||v,borderRightColor:_||v,borderBottomColor:k||v,borderLeftColor:E||v};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...S}},(0,u.createElement)(e,c({},t,{wrapperProps:w}))}));function Av(e){if(e)return`has-${e}-gradient-background`}function xv(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Bv(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}function Pv(e,t){const n=Bv(e,t);return n&&n.slug}function Tv(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Nr(),r=yo("color.gradients.custom"),o=yo("color.gradients.theme"),i=yo("color.gradients.default"),l=(0,u.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:a,customGradient:s}=(0,m.useSelect)((r=>{const{getBlockAttributes:o}=r(xr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,m.useDispatch)(xr),p=(0,u.useCallback)((r=>{const o=Pv(l,r);c(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,c]),d=Av(a);let f;return f=a?xv(l,a):s,{gradientClass:d,gradientValue:f,setGradient:p}}(0,s.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ev(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",wv),(0,s.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ev(e,"color")||Uo(e,yv,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),wv(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Iv);const Ov=["colors","disableCustomColors","gradients","disableCustomGradients"],Nv={name:"color",title:"Solid",value:"color"},Mv={name:"gradient",title:"Gradient",value:"gradient"},Rv=[Nv,Mv];function Fv(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,className:l,label:a,onColorChange:s,onGradientChange:c,colorValue:p,gradientValue:f,clearable:m,showTitle:h=!0,enableAlpha:v}=e;const b=s&&(!(0,y.isEmpty)(t)||!r),_=c&&(!(0,y.isEmpty)(n)||!o);if(!b&&!_)return null;const k={[Nv.value]:(0,u.createElement)(g.ColorPalette,{value:p,onChange:_?e=>{s(e),c()}:s,colors:t,disableCustomColors:r,__experimentalIsRenderedInSidebar:i,clearable:m,enableAlpha:v}),[Mv.value]:(0,u.createElement)(g.GradientPicker,{__nextHasNoMargin:!0,value:f,onChange:b?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,clearable:m})},E=e=>(0,u.createElement)("div",{className:"block-editor-color-gradient-control__panel"},k[e]);return(0,u.createElement)(g.BaseControl,{__nextHasNoMarginBottom:!0,className:d()("block-editor-color-gradient-control",l)},(0,u.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,u.createElement)(g.__experimentalVStack,{spacing:1},h&&(0,u.createElement)("legend",null,(0,u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,u.createElement)(g.BaseControl.VisualLabel,null,a))),b&&_&&(0,u.createElement)(g.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Rv,initialTabName:f?Mv.value:!!b&&Nv.value},(e=>E(e.value))),!_&&E(Nv.value),!b&&E(Mv.value))))}function Lv(e){const t={};return t.colors=yo("color.palette"),t.gradients=yo("color.gradients"),t.disableCustomColors=!yo("color.custom"),t.disableCustomGradients=!yo("color.customGradient"),(0,u.createElement)(Fv,c({},t,e))}var Dv=function(e){return Ov.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(Fv,e):(0,u.createElement)(Lv,e)};const Uv=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,u.createElement)(g.__experimentalToolsPanelItem,c({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},jv=e=>{let{colorValue:t,label:n}=e;return(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(g.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,u.createElement)(g.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},zv=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:d()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,u.createElement)(g.Button,l,(0,u.createElement)(jv,{colorValue:o,label:i}))};function Vv(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:l,settings:a,__experimentalIsRenderedInSidebar:s,...p}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,u.createElement)(u.Fragment,null,a.map(((e,a)=>{var d;const f={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:l,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},m={colorValue:null!==(d=e.gradientValue)&&void 0!==d?d:e.colorValue,label:e.label};return e&&(0,u.createElement)(Uv,c({key:a,setting:e},p),(0,u.createElement)(g.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:zv(m),renderContent:()=>(0,u.createElement)(g.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,u.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,u.createElement)(Dv,f)))}))})))}hd([vd,kd]);var Gv=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:a,linkColor:s,enableAlphaChecker:c=!1}=e;const p=t||n;if(!p)return null;const d=a||r,f=s||o;if(!d&&!f)return null;const m=[{color:d,description:(0,_.__)("text color")},{color:f,description:(0,_.__)("link color")}],y=yd(p),h=y.alpha()<1,v=y.brightness(),b={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",E="";for(const e of m){if(!e.color)continue;const t=yd(e.color),n=t.isReadable(y,b),r=t.alpha()<1;if(!n){if(h||r)continue;k=vnull==e?void 0:e.colorValue));(0,u.useEffect)((()=>{var e;if(!o)return;if(!m.length)return i&&l(),a&&s(),void(p&&s());if(!f.current)return;s(Hv(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(Hv(t).color);let n=f.current,r=Hv(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=Hv(n).backgroundColor;l(r)}));const y=mv();return(0,u.createElement)(Wo,{group:"color"},(0,u.createElement)(Vv,c({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalIsRenderedInSidebar:!0},y)),o&&(0,u.createElement)(Gv,{backgroundColor:i,textColor:a,enableAlphaChecker:t,linkColor:p}))}const $v="color",Kv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},qv=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.link},Jv=e=>{const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.gradients},Yv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.background},Qv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.text},Zv=(e,t)=>Ro(Lo(t,e,void 0)),Xv=e=>({textColor:void 0,style:Zv(["color","text"],e.style)}),eb=e=>({style:Zv(["elements","link","color","text"],e.style)}),tb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function nb(e,t,n){var r,o,i,l,a,s;if(!Kv(t)||Uo(t,$v))return e;const c=Jv(t),{backgroundColor:u,textColor:p,gradient:f,style:m}=n,y=e=>!Uo(t,$v,e),g=y("text")?fv("color",p):void 0,h=y("gradients")?Av(f):void 0,v=y("background")?fv("background-color",u):void 0,b=y("background")||y("gradients"),_=u||(null==m||null===(r=m.color)||void 0===r?void 0:r.background)||c&&(f||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient)),k=d()(e.className,g,h,{[v]:!(c&&null!=m&&null!==(i=m.color)&&void 0!==i&&i.gradient||!v),"has-text-color":y("text")&&(p||(null==m||null===(l=m.color)||void 0===l?void 0:l.text)),"has-background":b&&_,"has-link-color":y("link")&&(null==m||null===(a=m.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const rb=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?pv(e,n[1]).color:t};function ob(e){var t,n,r,o,i,l;const{name:s,attributes:c}=e,p=yo("color.palette.custom"),d=yo("color.palette.theme"),f=yo("color.palette.default"),m=(0,u.useMemo)((()=>[...p||[],...d||[],...f||[]]),[p,d,f]),y=yo("color.gradients.custom"),g=yo("color.gradients.theme"),h=yo("color.gradients.default"),v=(0,u.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),b=yo("color.custom"),k=yo("color.customGradient"),E=yo("color.background"),S=yo("color.link"),w=yo("color.text"),C=b||!d||(null==d?void 0:d.length)>0,I=k||!g||(null==g?void 0:g.length)>0,A=(0,u.useRef)(c);if((0,u.useEffect)((()=>{A.current=c}),[c]),!Kv(s))return null;const x=qv(s)&&S&&C,B=Qv(s)&&w&&C,P=Yv(s)&&E&&C,T=Jv(s)&&I;if(!(x||B||P||T))return null;const{style:O,textColor:N,backgroundColor:M,gradient:R}=c;let F;if(T&&R)F=xv(v,R);else if(T){var L;F=null==O||null===(L=O.color)||void 0===L?void 0:L.gradient}const D=t=>n=>{var r,o;const i=dv(m,n),l=t+"Color",a={...A.current.style,color:{...null===(r=A.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:Ro(a),[l]:s};e.setAttributes(c),A.current={...A.current,...c}},U=(0,a.getBlockSupport)(e.name,[$v,"__experimentalDefaultControls"]),j="web"===u.Platform.OS&&!R&&!(null!=O&&null!==(t=O.color)&&void 0!==t&&t.gradient)&&P&&(x||B)&&!1!==(0,a.getBlockSupport)(e.name,[$v,"enableContrastChecker"]);return(0,u.createElement)(Wv,{enableContrastChecking:j,clientId:e.clientId,enableAlpha:!0,settings:[...B?[{label:(0,_.__)("Text"),onColorChange:D("text"),colorValue:pv(m,N,null==O||null===(n=O.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==U?void 0:U.text,resetAllFilter:Xv}]:[],...P||T?[{label:(0,_.__)("Background"),onColorChange:P?D("background"):void 0,colorValue:pv(m,M,null==O||null===(r=O.color)||void 0===r?void 0:r.background).color,gradientValue:F,onGradientChange:T?t=>{const n=Pv(v,t);let r;if(n){var o,i,l;const e={...null===(o=A.current)||void 0===o?void 0:o.style,color:{...null===(i=A.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:Ro(e),gradient:n}}else{var a,s,c;const e={...null===(a=A.current)||void 0===a?void 0:a.style,color:{...null===(s=A.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Ro(e),gradient:void 0}}e.setAttributes(r),A.current={...A.current,...r}}:void 0,isShownByDefault:null==U?void 0:U.background,resetAllFilter:tb}]:[],...x?[{label:(0,_.__)("Link"),onColorChange:t=>{var n;const r=dv(m,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=Ro(Lo(null===(n=A.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),A.current={...A.current,style:i}},colorValue:rb(m,null==O||null===(o=O.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.text),isShownByDefault:null==U?void 0:U.link,resetAllFilter:eb}]:[]]})}const ib=(0,f.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:l}=o,a=yo("color.palette.custom"),s=yo("color.palette.theme"),p=yo("color.palette.default"),d=(0,u.useMemo)((()=>[...a||[],...s||[],...p||[]]),[a,s,p]);if(!Kv(r)||Uo(r,$v))return(0,u.createElement)(e,t);const f={};var m,y;l&&!Uo(r,$v,"text")&&(f.color=null===(m=pv(d,l))||void 0===m?void 0:m.color);i&&!Uo(r,$v,"background")&&(f.backgroundColor=null===(y=pv(d,i))||void 0===y?void 0:y.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,u.createElement)(e,c({},t,{wrapperProps:g}))})),lb={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,s.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Kv(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Jv(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",nb),(0,s.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Kv(e)||Uo(e,$v))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),nb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ib),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return Do({linkColor:qv(o),textColor:Qv(o),backgroundColor:Yv(o),gradient:Jv(o)},lb,e,t,n,r)}));const ab=[{name:(0,_._x)("Regular","font style"),value:"normal"},{name:(0,_._x)("Italic","font style"),value:"italic"}],sb=[{name:(0,_._x)("Thin","font weight"),value:"100"},{name:(0,_._x)("Extra Light","font weight"),value:"200"},{name:(0,_._x)("Light","font weight"),value:"300"},{name:(0,_._x)("Regular","font weight"),value:"400"},{name:(0,_._x)("Medium","font weight"),value:"500"},{name:(0,_._x)("Semi Bold","font weight"),value:"600"},{name:(0,_._x)("Bold","font weight"),value:"700"},{name:(0,_._x)("Extra Bold","font weight"),value:"800"},{name:(0,_._x)("Black","font weight"),value:"900"}],cb=(e,t)=>e?t?(0,_.__)("Appearance"):(0,_.__)("Font style"):(0,_.__)("Font weight");function ub(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...l}=e,a=n||r,s=cb(n,r),p={key:"default",name:(0,_.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,u.useMemo)((()=>n&&r?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;sb.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,_.sprintf)((0,_.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return sb.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),f=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return a&&(0,u.createElement)(g.CustomSelectControl,c({},l,{className:"components-font-appearance-control",label:s,describedBy:f?n?r?(0,_.sprintf)((0,_.__)("Currently selected font appearance: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font style: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font weight: %s"),f.name):(0,_.__)("No selected font appearance"),options:d,value:f,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const pb=1.5,db=.1;var fb=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const l=function(e){return void 0!==e&&""!==e}(t),a=l?t:"";r||$()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",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 s=r?void 0:{marginBottom:24};return(0,u.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,u.createElement)(g.__experimentalNumberControl,c({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return pb;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,_.__)("Line height"),placeholder:pb,step:db,value:a,min:0,spinControls:"custom"})))};const mb="typography.lineHeight";function yb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(fb,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Ro(t)})},size:"__unstable-large"})}function gb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("typography.lineHeight");return!(0,a.hasBlockSupport)(e,mb)||t}const hb="typography.__experimentalFontStyle",vb="typography.__experimentalFontWeight";function bb(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!_b(e),l=!kb(e),a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,u.createElement)(ub,{onChange:e=>{o({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:a,fontWeight:s},size:"__unstable-large"})}function _b(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,hb),n=yo("typography.fontStyle");return!t||!n}function kb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,vb),n=yo("typography.fontWeight");return!t||!n}function Eb(e){const t=_b(e),n=kb(e);return t&&n}function Sb(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=yo("typography.fontFamilies");if(r||(r=i),!r||0===r.length)return null;const l=[{value:"",label:(0,_.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,u.createElement)(g.SelectControl,c({label:(0,_.__)("Font"),options:l,value:t,onChange:n,labelPosition:"top"},o))}const wb="typography.__experimentalFontFamily";function Cb(e,t,n){if(!(0,a.hasBlockSupport)(t,wb))return e;if(Uo(t,p_,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(jy())(e.className);r.add(`has-${(0,y.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function Ib(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=yo("typography.fontFamilies"),i=null==o||null===(t=o.find((e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,u.createElement)(Sb,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=null==o?void 0:o.find((t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Ab(e){let{name:t}=e;const n=yo("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,wb)}(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,wb)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Cb),(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,wb))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Cb(r,e,n)},e}));const xb=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}};function Bb(e,t){const n=null==e?void 0:e.find((e=>{let{size:n}=e;return n===t}));return n||{size:t}}function Pb(e){if(e)return`has-${(0,y.kebabCase)(e)}-font-size`}var Tb=function(e){const t=yo("typography.fontSizes"),n=!yo("typography.customFontSize");return(0,u.createElement)(g.FontSizePicker,c({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Ob="1600px",Nb="768px",Mb=1,Rb=.75;function Fb(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Nb,maximumViewPortWidth:i=Ob,scaleFactor:l=Mb,minimumFontSizeFactor:a=Rb,minimumFontSizeLimit:s}=e;if(s=Lb(s)?s:"14px",r){const e=Lb(r);if(null==e||!e.unit)return null;const o=Lb(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Db(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Lb(t),u=(null==c?void 0:c.unit)||"rem",p=Lb(n,{coerceTo:u});if(!c||!p)return null;const d=Lb(t,{coerceTo:"rem"}),f=Lb(i,{coerceTo:u}),m=Lb(o,{coerceTo:u});if(!f||!m||!d)return null;const y=Db(m.value/100,3),g=Db(y,3)+u,h=Db(((p.value-c.value)/(f.value-m.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Lb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Db(u,3),unit:c}}function Db(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Ub="typography.fontSize";function jb(e,t,n){if(!(0,a.hasBlockSupport)(t,Ub))return e;if(Uo(t,p_,"fontSize"))return e;const r=new(jy())(e.className);r.add(Pb(n.fontSize));const o=r.value;return e.className=o||void 0,e}function zb(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=yo("typography.fontSizes"),a=xb(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),s=(null==a?void 0:a.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,u.createElement)(Tb,{onChange:e=>{const t=Bb(l,e).slug;i({style:Ro({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:s,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Vb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Ub)||!n}const Gb=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=yo("typography.fontSizes"),{name:i,attributes:{fontSize:l,style:s},wrapperProps:c}=t;if(!(0,a.hasBlockSupport)(i,Ub)||Uo(i,p_,"fontSize")||!l||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,u.createElement)(e,t);const p=xb(o,l,null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...c,style:{fontSize:p,...null==c?void 0:c.style}}};return(0,u.createElement)(e,d)}),"withFontSizeInlineStyles"),Hb={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,s.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Ub)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jb),(0,s.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Ub))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),jb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Gb),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const o=e.name;return Do({fontSize:(0,a.hasBlockSupport)(o,Ub)},Hb,e,t,n,r)})),(0,s.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,a.hasBlockSupport)(e,Ub)||Uo(e,p_,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=null===(r=(0,m.select)(xr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o?void 0:o.fluid,s="object"==typeof a?a:{},c=l&&a?Fb({fontSize:l,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?i:{...i,style:{...null==i?void 0:i.style,fontSize:c}}},e}),11);var Wb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 11.5h10V13H7z"}));var $b=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var Kb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const qb=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Underline"),value:"underline",icon:$b},{name:(0,_.__)("Strikethrough"),value:"line-through",icon:Kb}];function Jb(e){let{value:t,onChange:n,className:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-decoration-control",r)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Decoration")),(0,u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qb.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Yb="typography.__experimentalTextDecoration";function Qb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(Jb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Zb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Yb),n=yo("typography.textDecoration");return t||!n}var Xb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var e_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var t_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const n_=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Uppercase"),value:"uppercase",icon:Xb},{name:(0,_.__)("Lowercase"),value:"lowercase",icon:e_},{name:(0,_.__)("Capitalize"),value:"capitalize",icon:t_}];function r_(e){let{className:t,value:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-transform-control",t)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Letter case")),(0,u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n_.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const o_="typography.__experimentalTextTransform";function i_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(r_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function l_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,o_),n=yo("typography.textTransform");return t||!n}function a_(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,u.createElement)(g.__experimentalUnitControl,c({},o,{label:(0,_.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const s_="typography.__experimentalLetterSpacing";function c_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(a_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function u_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,s_),n=yo("typography.letterSpacing");return t||!n}const p_="typography",d_=[mb,Ub,hb,vb,wb,Yb,o_,s_];function f_(e){const{clientId:t}=e,n=Ab(e),r=Vb(e),o=Eb(e),i=gb(e),l=Zb(e),s=l_(e),c=u_(e),p=!_b(e),d=!kb(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Eb(e),Vb(e),gb(e),Ab(e),Zb(e),l_(e),u_(e)];return t.filter(Boolean).length===t.length}(e),m=m_(e.name);if(f||!m)return null;const y=(0,a.getBlockSupport)(e.name,[p_,"__experimentalDefaultControls"]),h=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,u.createElement)(Wo,{group:"typography"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,_.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==y?void 0:y.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,u.createElement)(Ib,e)),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,_.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Ro({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,u.createElement)(zb,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:cb(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,u.createElement)(bb,e)),!i&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,_.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.lineHeight,resetAllFilter:h("lineHeight"),panelId:t},(0,u.createElement)(yb,e)),!c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,_.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==y?void 0:y.letterSpacing,resetAllFilter:h("letterSpacing"),panelId:t},(0,u.createElement)(c_,e)),!l&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,_.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textDecoration,resetAllFilter:h("textDecoration"),panelId:t},(0,u.createElement)(Qb,e)),!s&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,_.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textTransform,resetAllFilter:h("textTransform"),panelId:t},(0,u.createElement)(i_,e)))}const m_=e=>d_.some((t=>(0,a.hasBlockSupport)(e,t)));const y_=[...d_,yv,$v,yi,gi],g_=e=>y_.some((t=>(0,a.hasBlockSupport)(e,t)));function h_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,nl.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const v_={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$v],[`${p_}.__experimentalSkipSerialization`]:[p_],[`${yi}.__experimentalSkipSerialization`]:[yi],[`${gi}.__experimentalSkipSerialization`]:[gi]},b_={...v_,[`${gi}`]:["spacing.blockGap"]},__={gradients:"gradient"};function k_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let r=e;return n||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;k_(r[t],[n],!0)}else 1===e.length&&delete r[e[0]]})),r}function E_(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b_;if(!g_(t))return e;let{style:o}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const i=(0,a.getBlockSupport)(t,n);!0===i&&(o=k_(o,r)),Array.isArray(i)&&i.forEach((e=>{const t=__[e]||e;o=k_(o,[[...r,t]])}))})),e.style={...h_(o),...e.style},e}const S_=(0,f.createHigherOrderComponent)((e=>t=>{const n=Mr();return(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ob,t),(0,u.createElement)(f_,t),(0,u.createElement)(kv,t),(0,u.createElement)(_i,t)),(0,u.createElement)(e,t))}),"withToolbarControls"),w_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=`wp-elements-${(0,f.useInstanceId)(e)}`,i=Uo(t.name,$v,"link"),l=(0,u.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:i||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,nl.compileCSS)(n,{selector:`.editor-styles-wrapper .${o} ${a.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),s=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,l&&s&&(0,u.createPortal)((0,u.createElement)("style",{dangerouslySetInnerHTML:{__html:l}}),s),(0,u.createElement)(e,c({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?d()(t.className,o):t.className})))}));(0,s.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return g_(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",E_),(0,s.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!g_(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),E_(r,e,n,v_)},e})),(0,s.addFilter)("editor.BlockEdit","core/style/with-block-controls",S_),(0,s.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",w_);(0,s.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var C_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var I_=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}=e;return t="unset"===l?(0,u.createElement)(g.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,u.createElement)(g.DuotoneSwatch,{values:l}):(0,u.createElement)(Xi,{icon:C_}),(0,u.createElement)(g.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_.__)("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,u.createElement)(g.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},label:(0,_.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Duotone")},(0,u.createElement)("div",{className:"block-editor-duotone-control__description"},(0,_.__)("Create a two-tone color effect without losing your original image.")),(0,u.createElement)(g.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}))})};const A_=[];function x_(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,u.createElement)(qd,{selector:t}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jd,{id:n,colors:r}),(0,u.createElement)(Kd,{id:n,selector:t}))}function B_(e){let{presetSetting:t,defaultSetting:n}=e;const r=!yo(n),o=yo(`${t}.custom`)||A_,i=yo(`${t}.theme`)||A_,l=yo(`${t}.default`)||A_;return(0,u.useMemo)((()=>[...o,...i,...r?A_:l]),[r,o,i,l])}function P_(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=B_({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=B_({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!yo("color.custom"),c=!yo("color.customDuotone")||0===(null==a?void 0:a.length)&&s;return 0===(null==l?void 0:l.length)&&c?null:(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(I_,{duotonePalette:l,colorPalette:a,disableCustomDuotone:c,disableCustomColors:s,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}hd([vd]);const T_=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&!r&&(0,u.createElement)(P_,t))}),"withDuotoneControls");const O_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o;const i=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),l=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!l)return(0,u.createElement)(e,t);const s=`wp-duotone-${(0,f.useInstanceId)(e)}`,p=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${s}`,i),m=d()(null==t?void 0:t.className,s),y=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,y&&(0,u.createPortal)((0,u.createElement)(x_,{selector:p,id:s,colors:l}),y),(0,u.createElement)(e,c({},t,{className:m})))}),"withDuotoneStyles");(0,s.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",T_),(0,s.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",O_);const N_="__experimentalLayout";function M_(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,m.useSelect)((e=>{var t;const{getSettings:n}=e(xr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),o=yo("layout")||{},{attributes:i={},name:l}=n,{layout:s}=i,{default:c}=(0,a.getBlockSupport)(l,N_)||{},u=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},p=[];var d,f;null!=o&&null!==(e=o.definitions)&&void 0!==e&&null!==(t=e[(null==u?void 0:u.type)||"default"])&&void 0!==t&&t.className&&p.push(null==o||null===(d=o.definitions)||void 0===d||null===(f=d[(null==u?void 0:u.type)||"default"])||void 0===f?void 0:f.className);return(null!=u&&u.inherit||null!=u&&u.contentSize||"constrained"===(null==u?void 0:u.type))&&r&&p.push("has-global-padding"),null!=u&&u.orientation&&p.push(`is-${(0,y.kebabCase)(u.orientation)}`),null!=u&&u.justifyContent&&p.push(`is-content-justification-${(0,y.kebabCase)(u.justifyContent)}`),null!=u&&u.flexWrap&&"nowrap"===u.flexWrap&&p.push("is-nowrap"),p}function R_(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=il((null==a?void 0:a.type)||"default"),c=yo("layout")||{},u=yo("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function F_(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=yo("layout"),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().supportsLayout}),[]),s=(0,a.getBlockSupport)(r,N_,{}),{allowSwitching:c,allowEditing:p=!0,allowInheriting:d=!0,default:f}=s;if(!p)return null;const y=!(!d||!i||null!=o&&o.type&&"default"!==(null==o?void 0:o.type)&&"constrained"!==(null==o?void 0:o.type)&&(null==o||!o.inherit)),h=o||f||{},{inherit:v=!1,type:b="default",contentSize:k=null}=h;if(("default"===b||"constrained"===b)&&!l)return null;const E=il(b),S=il("constrained"),w=!h.type&&(k||v),C=!!v||!!k,I=e=>t({layout:e});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Layout")},y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,_.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||C,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||C?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||C?(0,_.__)("Nested blocks use content width with options for full and wide widths."):(0,_.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&c&&(0,u.createElement)(L_,{type:b,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,u.createElement)(E.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}),S&&w&&(0,u.createElement)(S.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}))),!v&&E&&(0,u.createElement)(E.toolBarControls,{layout:h,onChange:I,layoutBlockSupport:s}))}function L_(e){let{type:t,onChange:n}=e;return(0,u.createElement)(g.ButtonGroup,null,ol.map((e=>{let{name:r,label:o}=e;return(0,u.createElement)(g.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const D_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,N_)&&(0,u.createElement)(F_,c({key:"layout"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),U_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:o}=t,i=(0,a.hasBlockSupport)(n,N_),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=i&&!l,p=(0,f.useInstanceId)(e),y=yo("layout")||{},g=(0,u.useContext)(Jh.__unstableElementContext),{layout:h}=r,{default:v}=(0,a.getBlockSupport)(n,N_)||{},b=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||v||{},_=i?M_(o):null,k=`.wp-container-${p}.wp-container-${p}`,E=null!==yo("spacing.blockGap");let S;if(s){var w;const e=il((null==b?void 0:b.type)||"default");S=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:b,layoutDefinitions:null==y?void 0:y.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:E})}const C=d()({[`wp-container-${p}`]:s&&!!S},_);return(0,u.createElement)(u.Fragment,null,s&&g&&!!S&&(0,u.createPortal)((0,u.createElement)(ul,{blockName:n,selector:k,css:S,layout:b,style:null==r?void 0:r.style}),g),(0,u.createElement)(e,c({},t,{__unstableLayoutClassNames:C})))})),j_=(0,f.createHigherOrderComponent)((e=>t=>{const{attributes:n}=t,{style:{layout:r={}}={}}=n,{selfStretch:o,flexSize:i}=r,l=o||i,a=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=l&&!a,p=(0,u.useContext)(Jh.__unstableElementContext),y=(0,f.useInstanceId)(e),g=`.wp-container-content-${y}`;let h="";"fixed"===o&&i?h+=`${g} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o&&(h+=`${g} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const v=d()(null==t?void 0:t.className,{[`wp-container-content-${y}`]:s&&!!h});return(0,u.createElement)(u.Fragment,null,s&&p&&!!h&&(0,u.createPortal)((0,u.createElement)("style",null,h),p),(0,u.createElement)(e,c({},t,{className:v})))}));function z_(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(xr);return n(t)||r(t,!0)}),[t]);return(0,u.useEffect)((()=>{r||n()}),[r]),null}(0,s.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,N_)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",U_),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",j_),(0,s.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",D_);const V_=(0,f.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,m.useSelect)(xr),o=(0,u.useRef)(),{templateLock:i,isLockedByParent:l,isEditingAsBlocks:a}=(0,m.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:p,__unstableSetTemporarilyEditingAsBlocks:f}=(0,m.useDispatch)(xr),y=!l&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:h,updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=(0,u.useCallback)((()=>{h(),v(t.clientId,{templateLock:"contentOnly"}),p(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:o.current}),f()}),[t.clientId,o,s,p,n,h,v,f]);return y||a?(0,u.createElement)(u.Fragment,null,a&&!y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(z_,{clientId:t.clientId,stopEditingAsBlock:b}),(0,u.createElement)(Ur,{group:"other"},(0,u.createElement)(g.ToolbarButton,{onClick:()=>{b()}},(0,_.__)("Done")))),!a&&y&&t.isSelected&&(0,u.createElement)(zg,null,(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuItem,{onClick:()=>{h(),v(t.clientId,{templateLock:void 0}),p(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,s({focusMode:!0}),f(t.clientId),i()}},(0,_.__)("Modify"))})),(0,u.createElement)(e,c({},t,{className:d()(t.className,a&&"is-content-locked-editing-as-blocks")}))):(0,u.createElement)(e,t)}),"withToolbarControls");(0,s.addFilter)("editor.BlockEdit","core/content-lock-ui/with-block-controls",V_);const G_="metadata";function H_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=(0,a.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function W_(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Cv(e)||void 0,style:h_({border:n})}}function $_(e){const{colors:t}=mv(),n=W_(e),{borderColor:r}=e;if(r){const e=bv({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function K_(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:c,style:u}=e,p=fv("background-color",a),f=fv("color",s),m=Av(c),y=m||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:d()(f,m,{[p]:!y&&!!p,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":a||(null==u||null===(r=u.color)||void 0===r?void 0:r.background)||c||(null==u||null===(o=u.color)||void 0===o?void 0:o.gradient),"has-link-color":null==u||null===(i=u.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:h_({color:(null==u?void 0:u.color)||{}})}}(0,s.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||H_(e,"name")&&(e.attributes={...e.attributes,[G_]:{type:"object"}}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return H_(t)&&(e.metadata=n.metadata),e})),(0,s.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||H_(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const q_={};function J_(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=yo("color.palette.custom"),i=yo("color.palette.theme"),l=yo("color.palette.default"),a=yo("color.gradients")||q_,s=(0,u.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),c=(0,u.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),p=K_(e);if(t){const e=pv(s,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=xv(c,r)),n){const e=pv(s,n);p.style.color=e.color}return p}function Y_(e){const{style:t}=e;return{style:h_({spacing:(null==t?void 0:t.spacing)||{}})}}function Q_(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};if(t&&(!0===t||0!==Object.keys(t).length)){var o,i,l,a;const n=Fb({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize,minimumFontSizeLimit:null==t?void 0:t.minFontSize})||(null==e||null===(l=e.style)||void 0===l||null===(a=l.typography)||void 0===a?void 0:a.fontSize);r={...r,fontSize:n}}const s=h_({typography:r}),c=null!=e&&e.fontFamily?`has-${(0,y.kebabCase)(e.fontFamily)}-font-family`:"";return{className:d()(c,Pb(null==e?void 0:e.fontSize)),style:s}}function Z_(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}const X_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},ek=e=>(0,f.createHigherOrderComponent)((t=>n=>(0,u.createElement)(t,c({},n,{colors:e}))),"withCustomColorPalette"),tk=()=>(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette.custom"),r=yo("color.palette.theme"),o=yo("color.palette.default"),i=(0,u.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,u.createElement)(e,c({},t,{colors:i}))}),"withEditorColorPalette");function nk(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,y.kebabCase)(t)}:t})),{});return(0,f.compose)([t,e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=yd(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=X_(t),r=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,r),e}),{})}createSetColor(e,t){return n=>{const r=dv(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return Object.entries(n).reduce(((e,n)=>{let[i,l]=n;const a=pv(o,r[i],r[`custom${X_(i)}`]),s=t[i];return(null==s?void 0:s.color)===a.color&&s?e[i]=s:e[i]={...a,class:fv(l,a.slug)},e}),{})}render(){return(0,u.createElement)(e,c({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function rk(e){return function(){const t=ek(e);for(var n=arguments.length,r=new Array(n),o=0;o{let[t,...n]=e;return t.toUpperCase()+n.join("")};var ak=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${lk(t)}`,e)),{});return(0,f.createHigherOrderComponent)((0,f.compose)([(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("typography.fontSizes")||ik;return(0,u.createElement)(e,c({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(r).reduce(((e,t)=>{let[n,r]=t;return e[`set${lk(n)}`]=this.createSetFontSize(n,r),e}),{})}createSetFontSize(e,t){return n=>{var r;const o=null===(r=this.props.fontSizes)||void 0===r?void 0:r.find((e=>{let{size:t}=e;return t===Number(n)}));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!Object.values(r).some(i))return null;const l=Object.entries(r).filter((e=>{let[t,n]=e;return i(n,t)})).reduce(((e,t)=>{let[r,i]=t;const l=n[r],a=xb(o,l,n[i]);return e[r]={...a,class:Pb(l)},e}),{});return{...t,...l}}render(){return(0,u.createElement)(e,c({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var sk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var ck=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var uk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const pk=[{icon:sk,title:(0,_.__)("Align text left"),align:"left"},{icon:ck,title:(0,_.__)("Align text center"),align:"center"},{icon:uk,title:(0,_.__)("Align text right"),align:"right"}],dk={position:"bottom right",variant:"toolbar"};var fk=function(e){let{value:t,onChange:n,alignmentControls:r=pk,label:o=(0,_.__)("Align text"),describedBy:i=(0,_.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:a}=e;function s(e){return()=>n(t===e?void 0:e)}const p=r.find((e=>e.align===t)),d=a?g.ToolbarGroup:g.ToolbarDropdownMenu,f=a?{isCollapsed:l}:{toggleProps:{describedBy:i},popoverProps:dk};return(0,u.createElement)(d,c({icon:p?p.icon:(0,_.isRTL)()?uk:sk,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:l?"menuitemradio":void 0,onClick:s(n)}}))},f))};const mk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!1})),yk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!0})),gk=()=>{};var hk={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(xr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=yf(t,gk),l=(0,u.useMemo)((()=>(e.trim()?Kf(r,o,i,e):J(r,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),a=(0,u.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[a]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(r))}}},vk=window.wp.apiFetch,bk=n.n(vk);var _k=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var kk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var Ek={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await bk()({path:(0,sm.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{key:"icon",icon:"page"===e.subtype?_k:kk}),e.title)},getOptionCompletion(e){return(0,u.createElement)("a",{href:e.url},e.title)}};const Sk=[];function wk(e){let{completers:t=Sk}=e;const{name:n}=Nr();return(0,u.useMemo)((()=>{let e=[...t,Ek];return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,hk]),(0,s.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=(0,s.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Ck=function(e){return(0,u.createElement)(g.Autocomplete,c({},e,{completers:wk(e)}))};var Ik=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Ak=function(e){let{isActive:t,label:n=(0,_.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,u.createElement)(g.ToolbarButton,{isActive:t,icon:Ik,label:n,onClick:()=>r(!t),disabled:o})};const xk=()=>{};var Bk=function(e){const{label:t=(0,_.__)("Change matrix alignment"),onChange:n=xk,value:r="center",isDisabled:o}=e,i=(0,u.createElement)(g.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,u.createElement)(g.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==Xu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,u.createElement)(g.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Pk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Tk=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clientId:o,parents:i,hasSelection:l}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(xr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),a=t||(0,_.__)("Document");return(0,u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,_.__)("Block breadcrumb")},(0,u.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},a),!l&&a,!!o&&(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,u.createElement)("li",{key:e},(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,u.createElement)(uy,{clientId:e,maximumLength:35})),(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,u.createElement)(uy,{clientId:o,maximumLength:35})))};const Ok=()=>(0,u.createElement)(g.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,u.createElement)(g.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Nk=e=>{let{style:t,className:n}=e;return(0,u.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,u.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,u.createElement)(Ok,null)))},Mk=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,_.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},icon:(0,u.createElement)(n,null,(0,u.createElement)(t,null,(0,u.createElement)(Nk,null)))}))}};var Rk=e=>{let{children:t,...n}=e;return $()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,u.createElement)(g.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Mk(n),renderContent:()=>t})};var Fk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Lk=Fu(g.__experimentalTreeGridRow);var Dk=(0,u.forwardRef)(((e,t)=>{let{isSelected:n,position:r,level:o,rowCount:i,children:l,className:a,path:s,...p}=e;const m=Uu({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s}),y=(0,f.useMergeRefs)([t,m]);return(0,u.createElement)(Lk,c({ref:y,className:d()("block-editor-list-view-leaf",a),level:o,positionInSet:r,setSize:i},p),l)}));var Uk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"}));var jk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function zk(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)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var Vk=(0,u.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const f=sy(r),m=cy({clientId:r,context:"list-view"}),{isLocked:y}=Pg(r);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${r}`,"aria-hidden":!0},(0,u.createElement)(zk,{onClick:i}),(0,u.createElement)(hp,{icon:null==f?void 0:f.icon,showColors:!0}),(0,u.createElement)(g.__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)(g.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==f?void 0:f.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},f.anchor)),y&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))}));const Gk=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:v}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(xr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),b=h&&v===g,_=d()("block-editor-list-view-block-contents",{"is-dropping-before":b}),k=f.includes(g)?f:[g];return(0,u.createElement)(py,{clientIds:k},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(Vk,c({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))}))}));var Hk=Gk;const Wk=(0,u.createContext)({}),$k=()=>(0,u.useContext)(Wk);var Kk=(0,u.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E,isSyncedBranch:S}=t;const w=(0,u.useRef)(null),C=(0,u.useRef)(null),[I,A]=(0,u.useState)(!1),{clientId:x}=n,{isLocked:B,isContentLocked:P,canEdit:T}=Pg(x),O=(0,m.useSelect)((e=>!o&&(!!P&&e(xr).hasSelectedInnerBlock(x,!0))),[P,x,o]),N=!P&&T,M=O||o&&k[0]===x,R=O||o&&k[k.length-1]===x,{toggleBlockHighlight:F}=(0,m.useDispatch)(xr),L=sy(x),D=(0,m.useSelect)((e=>e(xr).getBlockName(x)),[x]),U=(0,a.hasBlockSupport)(D,"__experimentalToolbar",!0),j=`list-view-block-select-button__${(0,f.useInstanceId)(e)}`,z=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let V=(0,_.__)("Link");L&&(V=B?(0,_.sprintf)((0,_.__)("%s link (locked)"),L.title):(0,_.sprintf)((0,_.__)("%s link"),L.title));const G=L?(0,_.sprintf)((0,_.__)("Options for %s block"),L.title):(0,_.__)("Options"),{isTreeGridMounted:H,expand:W,collapse:$}=$k(),K=h&&y>0,q=d()("block-editor-list-view-block__mover-cell",{"is-visible":I||o}),J=d()("block-editor-list-view-block__menu-cell",{"is-visible":I||M});(0,u.useEffect)((()=>{!H&&o&&w.current.focus()}),[]);const Y=(0,u.useCallback)((()=>{A(!0),F(x,!0)}),[x,A,F]),Q=(0,u.useCallback)((()=>{A(!1),F(x,!1)}),[x,A,F]),Z=(0,u.useCallback)((e=>{l(e,x),e.preventDefault()}),[x,l]),X=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),ee=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?$(x):!1===b&&W(x)}),[x,W,$,b]);let te;K?te=2:U||(te=3);const ne=d()({"is-selected":o||O,"is-first-selected":M,"is-last-selected":R,"is-branch-selected":i,"is-synced-branch":S,"is-dragging":r,"has-single-cell":!U,"is-synced":null==L?void 0:L.isSynced}),re=k.includes(x)?k:[x];return function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:r}=e;const o=1===n.length;(0,u.useLayoutEffect)((()=>{if(!t||!o||!r.current)return;const e=(0,Ml.getScrollContainer)(r.current),{ownerDocument:n}=r.current;if(e===n.body||e===n.documentElement||!e)return;const i=r.current.getBoundingClientRect(),l=e.getBoundingClientRect();(i.topl.bottom)&&r.current.scrollIntoView()}),[t,o,r])}({isSelected:o,rowItemRef:C,selectedClientIds:k}),(0,u.createElement)(Dk,{className:ne,onMouseEnter:Y,onMouseLeave:Q,onFocus:Y,onBlur:Q,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${x}`,"data-block":x,isExpanded:N?b:void 0,"aria-selected":!!o||O,ref:C},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:te,ref:w,"aria-label":V,"aria-selected":!!o||O,"aria-expanded":N?b:void 0,"aria-describedby":j},(e=>{let{ref:t,tabIndex:r,onFocus:i}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(Hk,{block:n,onClick:Z,onToggleExpanded:ee,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:r,onFocus:i,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},z))})),K&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:q,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})))),U&&(0,u.createElement)(g.__experimentalTreeGridCell,{className:J,"aria-selected":!!o||O},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(Wg,{clientIds:re,icon:dm,label:G,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:X})})))}));function qk(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Jk(t,n,r),0):1}const Jk=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+qk(o,e,t,n):r+1},Yk=()=>{};var Qk=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=Yk,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:p,isExpanded:d,parentId:f,shouldShowInnerBlocks:y=!0,isSyncedBranch:g=!1}=t,h=sy(f),v=g||!(null==h||!h.isSynced),b=(0,m.useSelect)((e=>{if(!f)return!0;const t="contentOnly"===e(xr).getTemplateLock(f),n=e(xr).canEditBlock(f);return!t&&n}),[f]),{expandedState:_,draggedClientIds:k}=$k();if(!b)return null;const E=n.filter(Boolean),S=E.length;let w=c;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:f,innerBlocks:g}=t;n>0&&(w+=qk(E[n-1],_,k,d));const{itemInView:h}=p,b=h(w),C=n+1,I=a.length>0?`${a}_${C}`:`${C}`,A=!(null==g||!g.length),x=A&&y?null!==(c=_[f])&&void 0!==c?c:d:void 0,B=!(null==k||!k.includes(f)),P=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,i),T=s||P&&A,O=B||b||P;return(0,u.createElement)(m.AsyncModeProvider,{key:f,value:!P},O&&(0,u.createElement)(Kk,{block:t,selectBlock:r,isSelected:P,isBranchSelected:T,isDragged:B,level:l,position:C,rowCount:S,siblingBlockCount:S,showBlockMovers:o,path:I,isExpanded:x,listPosition:w,selectedClientIds:i,isSyncedBranch:v}),!O&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&x&&!B&&(0,u.createElement)(e,{parentId:f,blocks:g,selectBlock:r,showBlockMovers:o,level:l+1,path:I,listPosition:w+1,fixedListWindow:p,isBranchSelected:T,selectedClientIds:i,isExpanded:d,isSyncedBranch:v}))})))}));function Zk(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function Xk(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const eE=["top","bottom"];function tE(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,eE),u=Fh(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const nE=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var rE=(0,u.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:a,selectedClientIds:s}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:c,shouldShowInnerBlocks:p}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==a?void 0:a.length)>0?n(a).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[a]),{updateBlockSelection:d}=Xk(),[y,h]=(0,u.useReducer)(nE,{}),{ref:v,target:b}=tE(),k=(0,u.useRef)(),E=(0,f.useMergeRefs)([k,v,t]),S=(0,u.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:s[0],setExpandedState:h}),C=(0,u.useCallback)(((e,t)=>{d(e,t),w(t)}),[w,d]);(0,u.useEffect)((()=>{S.current=!0}),[]);const[I]=(0,f.__experimentalUseFixedWindowList)(k,36,c,{useWindowing:!0,windowOverscan:40}),A=(0,u.useCallback)((e=>{e&&h({type:"expand",clientIds:[e]})}),[h]),x=(0,u.useCallback)((e=>{e&&h({type:"collapse",clientIds:[e]})}),[h]),B=(0,u.useCallback)((e=>{var t;A(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[A]),P=(0,u.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&d(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[d]),O=(0,u.useMemo)((()=>({isTreeGridMounted:S.current,draggedClientIds:a,expandedState:y,expand:A,collapse:x})),[S.current,a,y,A,x]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(Zk,{listViewRef:k,blockDropTarget:b}),(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:E,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,_.__)("Block navigation structure")},(0,u.createElement)(Wk.Provider,{value:O},(0,u.createElement)(Qk,{blocks:l,selectBlock:C,showBlockMovers:o,fixedListWindow:I,selectedClientIds:s,isExpanded:i,shouldShowInnerBlocks:p}))))}));function oE(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,u.createElement)(g.Button,c({},i,{ref:o,icon:Fk,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,_.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var iE=(0,u.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;$()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,m.useSelect)((e=>!!e(xr).getBlockCount()),[])&&!n;return(0,u.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,u.createElement)(oE,c({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,u.createElement)("div",{className:"block-editor-block-navigation__container"},(0,u.createElement)("p",{className:"block-editor-block-navigation__label"},(0,_.__)("List view")),(0,u.createElement)(rE,null))})}));function lE(e){var t;let{genericPreviewBlock:n,style:r,className:o,activeStyle:i}=e;const l=null===(t=(0,a.getBlockType)(n.name))||void 0===t?void 0:t.example,s=zy(o,i,r),c=(0,u.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:s+" block-editor-block-styles__block-preview-container"},example:l})),[n,s]);return(0,u.createElement)(rf,{item:c,isStylePreview:!0})}const aE=()=>{};function sE(e){let{clientId:t,onSwitch:n=aE,onHoverClassName:r=aE}=e;const{onSelect:o,stylesToRender:i,activeStyle:l,genericPreviewBlock:a,className:s}=Gy({clientId:t,onSwitch:n}),[c,p]=(0,u.useState)(null),m=(0,f.useViewportMatch)("medium","<");if(!i||0===i.length)return null;const y=(0,f.debounce)(p,250),h=e=>{var t;c!==e?(y(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):y.cancel()};return(0,u.createElement)("div",{className:"block-editor-block-styles"},(0,u.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.isDefault?(0,_.__)("Default"):e.label||e.name;return(0,u.createElement)(g.Button,{className:d()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>h(e),onFocus:()=>h(e),onMouseLeave:()=>h(null),onBlur:()=>h(null),onClick:()=>(e=>{o(e),r(null),p(null),y.cancel()})(e),"aria-current":l.name===e.name},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,u.createElement)(g.Popover,{placement:"left-start",offset:20},(0,u.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>h(null)},(0,u.createElement)(lE,{activeStyle:l,className:s,genericPreviewBlock:a,style:c}))))}var cE=sE;sE.Slot=()=>($()("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);var uE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var pE=function(e){let{icon:t=uE,label:n=(0,_.__)("Choose variation"),instructions:r=(0,_.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const a=d()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,u.createElement)(g.Placeholder,{icon:t,label:n,instructions:r,className:a},(0,u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_.__)("Block variations")},o.map((e=>(0,u.createElement)("li",{key:e.name},(0,u.createElement)(g.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,u.createElement)(g.Button,{variant:"link",onClick:()=>i()},(0,_.__)("Skip"))))};var dE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const fE={carousel:"carousel",grid:"grid"},mE=e=>{let{onBlockPatternSelect:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,u.createElement)(g.Button,{variant:"primary",onClick:t},(0,_.__)("Choose")))},yE=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,u.createElement)(g.Button,{icon:yp,label:(0,_.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,u.createElement)(g.Button,{icon:mp,label:(0,_.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var gE=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:a}=e;const s=t===fE.carousel,c=(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,u.createElement)(g.Button,{icon:vl,label:(0,_.__)("Carousel view"),onClick:()=>n(fE.carousel),isPressed:s}),(0,u.createElement)(g.Button,{icon:dE,label:(0,_.__)("Grid view"),onClick:()=>n(fE.grid),isPressed:t===fE.grid}));return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&(0,u.createElement)(yE,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),c,s&&(0,u.createElement)(mE,{onBlockPatternSelect:a}))};var hE=function(e,t,n){return(0,m.useSelect)((r=>{const{getBlockRootClientId:o,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(xr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const vE=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,showTitles:i}=e;const l=(0,g.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===fE.carousel){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,u.createElement)("div",{className:a},(0,u.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,u.createElement)(_E,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,u.createElement)(g.__unstableComposite,c({},l,{role:"listbox",className:a,"aria-label":(0,_.__)("Patterns list")}),r.map((e=>(0,u.createElement)(bE,{key:e.name,pattern:e,onSelect:o,composite:l,showTitles:i})))))};function bE(e){let{pattern:t,onSelect:n,composite:r,showTitles:o}=e;const i="block-editor-block-pattern-setup-list",{blocks:l,description:a,viewportWidth:s=700}=t,p=(0,f.useInstanceId)(bE,`${i}__item-description`);return(0,u.createElement)("div",{className:`${i}__list-item`,"aria-label":t.title,"aria-describedby":t.description?p:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${i}__item`,onClick:()=>n(l)}),(0,u.createElement)(tf,{blocks:l,viewportWidth:s}),o&&(0,u.createElement)("div",{className:`${i}__item-title`},t.title),!!a&&(0,u.createElement)(g.VisuallyHidden,{id:p},a)))}function _E(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,a=(0,f.useInstanceId)(_E,"block-editor-block-pattern-setup-list__item-description");return(0,u.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?a:void 0},(0,u.createElement)(tf,{blocks:o,minHeight:r}),!!l&&(0,u.createElement)(g.VisuallyHidden,{id:a},l))}var kE=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:o,initialViewMode:i=fE.carousel,showTitles:l=!1}=e;const[s,c]=(0,u.useState)(i),[p,d]=(0,u.useState)(0),{replaceBlock:f}=(0,m.useDispatch)(xr),y=hE(t,n,r);if(null==y||!y.length)return null;const g=o||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));f(t,n)});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,u.createElement)(vE,{viewMode:s,activeSlide:p,patterns:y,onBlockPatternSelect:g,showTitles:l}),(0,u.createElement)(gE,{viewMode:s,setViewMode:c,activeSlide:p,totalSlides:y.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{g(y[p].blocks)}})))};function EE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,u.createElement)("fieldset",{className:t},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Transform to variation")),o.map((e=>(0,u.createElement)(g.Button,{key:e.name,icon:(0,u.createElement)(hp,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,_.sprintf)((0,_.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function SE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,u.createElement)(g.DropdownMenu,{className:t,label:(0,_.__)("Transform to variation"),text:(0,_.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:fy,toggleProps:{iconPosition:"right"}},(()=>(0,u.createElement)("div",{className:`${t}__container`},(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var wE=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,m.useDispatch)(xr),{activeBlockVariation:r,variations:o}=(0,m.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(a.store),{getBlockName:o,getBlockAttributes:i}=e(xr),l=t&&o(t);return{activeBlockVariation:n(l,i(t)),variations:l&&r(l,"transform")}}),[t]),i=null==r?void 0:r.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===o.length)}),[o]);if(null==o||!o.length)return null;const s=l?EE:SE;return(0,u.createElement)(s,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...o.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:o})},CE=(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette"),r=!yo("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,l=!(0,y.isEmpty)(o)||!i;return(0,u.createElement)(e,c({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:l}))}),"withColorContext"),IE=CE(g.ColorPalette);function AE(e){let{onChange:t,value:n,...r}=e;return(0,u.createElement)(Dv,c({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var xE=window.wp.date;const BE=new Date(2022,0,25);function PE(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Date format")),(0,u.createElement)(g.ToggleControl,{label:(0,u.createElement)(u.Fragment,null,(0,_.__)("Default format"),(0,u.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,xE.dateI18n)(n,BE))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,u.createElement)(TE,{format:t,onChange:r}))}function TE(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,_._x)("n/j/Y","short date format"),(0,_._x)("n/j/Y g:i A","short date format with time"),(0,_._x)("M j, Y","medium date format"),(0,_._x)("M j, Y g:i A","medium date format with time"),(0,_._x)("F j, Y","long date format"),(0,_._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,xE.dateI18n)(e,BE),format:e}))),l={key:"custom",name:(0,_.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,_.__)("Enter your own date format")},[a,s]=(0,u.useState)((()=>!!n&&!o.includes(n)));return(0,u.createElement)(g.__experimentalVStack,null,(0,u.createElement)(g.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,_.__)("Choose a format"),options:[...i,l],value:a?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?s(!0):(s(!1),r(t.format))}}),a&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,_.__)("Enter a date or time format string."),{Link:(0,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const OE=["colors","disableCustomColors","gradients","disableCustomGradients"],NE=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:a,title:s,showTitle:c=!0,__experimentalIsRenderedInSidebar:p,enableAlpha:h}=e;const v=(0,f.useInstanceId)(NE),{batch:b}=(0,m.useRegistry)();return(0,y.isEmpty)(n)&&(0,y.isEmpty)(r)&&o&&i&&null!=a&&a.every((e=>(0,y.isEmpty)(e.colors)&&(0,y.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,u.createElement)(g.__experimentalToolsPanel,{className:d()("block-editor-panel-color-gradient-settings",t),label:c?s:void 0,resetAll:()=>{b((()=>{a.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,u.createElement)(Vv,{settings:a,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalIsRenderedInSidebar:p,enableAlpha:h}),!!l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalSpacer,{marginY:4})," ",l))},ME=e=>{const t=mv();return(0,u.createElement)(NE,c({},t,e))};var RE=e=>OE.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(NE,e):(0,u.createElement)(ME,e);const FE=(0,u.createContext)({}),LE=()=>(0,u.useContext)(FE);function DE(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,onFinishEditing:i,onSaveImage:l,children:a}=e;const c=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,i]=(0,u.useState)(),[l,a]=(0,u.useState)(),[c,p]=(0,u.useState)({x:0,y:0}),[d,f]=(0,u.useState)(100),[m,y]=(0,u.useState)(0),g=n/r,[h,v]=(0,u.useState)(g),b=(0,u.useCallback)((()=>{const e=(m+90)%360;let n=g;if(m%180==90&&(n=1/g),0===e)return i(),y(e),v(g),void p({x:-c.y*n,y:c.x*n});const r=new window.Image;r.src=t,r.onload=function(t){const r=document.createElement("canvas");let o=0,l=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(o=r.width),270!==e&&180!==e||(l=r.height);const a=r.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((t=>{i(URL.createObjectURL(t)),y(e),v(r.width/r.height),p({x:-c.y*n,y:c.x*n})}))};const o=(0,s.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof o&&(r.crossOrigin=o)}),[m,g]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:i,crop:l,setCrop:a,position:c,setPosition:p,zoom:d,setZoom:f,rotation:m,setRotation:y,rotateClockwise:b,aspect:h,setAspect:v,defaultAspect:g})),[o,l,c,d,m,b,h,g])}({url:n,naturalWidth:r,naturalHeight:o}),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:a,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:p}=(0,m.useDispatch)(bf.store),[d,f]=(0,u.useState)(!1),y=(0,u.useCallback)((()=>{f(!1),c()}),[f,c]),g=(0,u.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,bk()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,_.sprintf)((0,_.__)("Could not edit image. %s"),(0,Ml.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),c()}))}),[f,t,n,r,o,i,l,s,p,f,c]);return(0,u.useMemo)((()=>({isInProgress:d,apply:g,cancel:y})),[d,g,y])}({id:t,url:n,onSaveImage:l,onFinishEditing:i,...c}),d=(0,u.useMemo)((()=>({...c,...p})),[c,p]);return(0,u.createElement)(FE.Provider,{value:d},a)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -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 DE=function(e,t){return DE=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])},DE(e,t)};var zE=function(){return zE=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 GE(e,t,n,o,r){void 0===r&&(r=0);var l=XE(t.width,t.height,r),i=l.width,a=l.height;return{x:UE(e.x,i,n.width,o),y:UE(e.y,a,n.height,o)}}function UE(e,t,n,o){var r=t*o/2-n/2;return JE(e,-r,r)}function $E(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 WE(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var a=i?KE:qE,s=XE(t.width,t.height,l),c=XE(t.naturalWidth,t.naturalHeight,l),u={x:a(100,((s.width-n.width/r)/2-e.x/r)/s.width*100),y:a(100,((s.height-n.height/r)/2-e.y/r)/s.height*100),width:a(100,n.width/s.width*100/r),height:a(100,n.height/s.height*100/r)},d=Math.round(a(c.width,u.width*c.width/100)),p=Math.round(a(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:zE(zE({},m),{x:Math.round(a(c.width-m.width,u.x*c.width/100)),y:Math.round(a(c.height-m.height,u.y*c.height/100))})}}function KE(e,t){return Math.min(e,Math.max(0,t))}function qE(e,t){return t}function YE(e,t,n,o,r,l){var i=XE(t.width,t.height,n),a=JE(o.width/i.width*(100/e.width),r,l);return{crop:{x:a*i.width/2-o.width/2-i.width*a*(e.x/100),y:a*i.height/2-o.height/2-i.height*a*(e.y/100)},zoom:a}}function ZE(e,t,n,o,r,l){void 0===n&&(n=0);var i=XE(t.naturalWidth,t.naturalHeight,n),a=JE(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),s=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*s,y:((i.height-e.height)/2-e.y)*s},zoom:a}}function QE(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function XE(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 JE(e,t,n){return Math.min(Math.max(e,t),n)}function eC(){for(var e=[],t=0;t0})).join(" ").trim()}var tC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=ka().createRef(),n.videoRef=ka().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=YE(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=ZE(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(a.offsetWidthd?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=zE(zE({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:HE(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=zE({},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?GE(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=VE()(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=JE(e,n.props.minZoom,n.props.maxZoom);if(l){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*i-a.x,y:s.y*i-a.y},u=n.props.restrictPosition?GE(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?WE(n.props.restrictPosition?GE(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?GE(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}DE(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=$E(n,o),this.lastPinchRotation=jE(n,o),this.onDragStart(QE(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=QE(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=$E(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=jE(o,r),a=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,a=i.x,s=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,g=m.containerStyle,f=m.cropAreaStyle,h=m.mediaStyle,v=t.classes,b=v.containerClassName,k=v.cropAreaClassName,_=v.mediaClassName,y=t.objectFit;return ka().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:eC("reactEasyCrop_Container",b)},n?ka().createElement("img",zE({alt:"",className:eC("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"),_)},r,{src:n,ref:this.imageRef,style:zE(zE({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&ka().createElement("video",zE({autoPlay:!0,loop:!0,muted:!0,className:eC("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"),_)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:zE(zE({},h),{transform:l||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return ka().createElement("source",zE({key:e.src},e))}))),this.state.cropSize&&ka().createElement("div",{style:zE(zE({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:eC("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",k)}))},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}(ka().Component);const nC={placement:"bottom-start",variant:"toolbar"};function oC(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,borderProps:a}=e;const{isInProgress:s,editedUrl:c,position:d,zoom:m,aspect:g,setPosition:f,setCrop:v,setZoom:b,rotation:k}=AE();let _=o||r*l/i;return k%180==90&&(_=r*i/l),(0,u.createElement)("div",{className:p()("wp-block-image__crop-area",null==a?void 0:a.className,{"is-applying":s}),style:{...null==a?void 0:a.style,width:n||r,height:_}},(0,u.createElement)(tC,{image:c||t,disabled:s,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:g,onCropChange:e=>{f(e)},onCropComplete:e=>{v(e)},onZoomChange:e=>{b(100*e)}}),s&&(0,u.createElement)(h.Spinner,null))}var rC=(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 lC(){const{isInProgress:e,zoom:t,setZoom:n}=AE();return(0,u.createElement)(h.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:nC,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,u.createElement)(h.ToolbarButton,{icon:rC,label:(0,_.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,u.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var iC=(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 aC(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?Of:void 0},t)})))}function sC(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=AE();return(0,u.createElement)(h.DropdownMenu,{icon:iC,label:(0,_.__)("Aspect Ratio"),popoverProps:nC,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(aC,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,_.__)("Original"),aspect:l},{title:(0,_.__)("Square"),aspect:1}]}),(0,u.createElement)(aC,{label:(0,_.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,_.__)("16:10"),aspect:1.6},{title:(0,_.__)("16:9"),aspect:16/9},{title:(0,_.__)("4:3"),aspect:4/3},{title:(0,_.__)("3:2"),aspect:1.5}]}),(0,u.createElement)(aC,{label:(0,_.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,_.__)("10:16"),aspect:.625},{title:(0,_.__)("9:16"),aspect:9/16},{title:(0,_.__)("3:4"),aspect:3/4},{title:(0,_.__)("2:3"),aspect:2/3}]}))}))}var cC=(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 uC(){const{isInProgress:e,rotateClockwise:t}=AE();return(0,u.createElement)(h.ToolbarButton,{icon:cC,label:(0,_.__)("Rotate"),onClick:t,disabled:e})}function dC(){const{isInProgress:e,apply:t,cancel:n}=AE();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.ToolbarButton,{onClick:t,disabled:e},(0,_.__)("Apply")),(0,u.createElement)(h.ToolbarButton,{onClick:n},(0,_.__)("Cancel")))}function pC(e){let{id:t,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:a,onSaveImage:s,onFinishEditing:c,borderProps:d}=e;return(0,u.createElement)(OE,{id:t,url:n,naturalWidth:a,naturalHeight:i,onSaveImage:s,onFinishEditing:c},(0,u.createElement)(oC,{borderProps:d,url:n,width:o,height:r,clientWidth:l,naturalHeight:i,naturalWidth:a}),(0,u.createElement)(Vo,null,(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(lC,null),(0,u.createElement)(h.ToolbarItem,null,(e=>(0,u.createElement)(sC,{toggleProps:e}))),(0,u.createElement)(uC,null)),(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(dC,null))))}const mC=[25,50,75,100],gC=()=>{};function fC(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:o,imageSizeOptions:r=[],isResizable:l=!0,slug:i,width:a,height:s,onChange:c,onChangeImage:d=gC}=e;const{currentHeight:p,currentWidth:m,updateDimension:g,updateDimensions:f}=function(e,t,n,o,r){var l,i;const[a,s]=(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&&s(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&d(e)}),[t,e]),{currentHeight:c,currentWidth:a,updateDimension:(e,t)=>{"width"===e?s(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),s(null!=t?t:o),r({height:e,width:t})}}}(s,a,o,n,c);return(0,u.createElement)(u.Fragment,null,r&&r.length>0&&(0,u.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("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,_.__)("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,_.__)("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,_.__)("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,_.__)("Image size presets")},mC.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,_.__)("Reset")))))}var hC=(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"}));const vC=()=>{};var bC=e=>{let{value:t,onChange:n=vC,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,_.__)("Currently selected link settings")),l)},kC=n(5425),_C=n.n(kC);function yC(e){return"function"==typeof e}class EC 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,_C()(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,lg.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 a=n(t,{isInitialSuggestions:r});a.then((e=>{this.suggestionsRequest===a&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,_.sprintf)((0,_._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,_.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===a&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=a}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 Qu.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Qu.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Qu.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Qu.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Qu.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Qu.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,_.__)("Link selected.")));break;case Qu.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,a=i;const s=n&&n.length;return l||s||(a=!1),!0===r&&(a=!1),{showSuggestions:a,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,_.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:a=""}=this.props,{loading:s,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})},k={id:v,value:a,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,_.__)("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,k,s):(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",k),s&&(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:a,loading:s}=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:`${a}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l});return yC(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:d,buildSuggestionItemProps:m,isLoading:s,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 CC=(0,m.compose)(m.withSafeTimeout,h.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(yC(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(To);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(EC);var SC=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,_.sprintf)((0,_.__)("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:cd}),(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 wC=(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 BC=(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 IC=(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 xC=(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 TC=(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 MC={post:wC,page:by,post_tag:BC,category:IC,attachment:xC};function NC(e){let{isURL:t,suggestion:n}=e,o=null;return t?o=TC:n.type in MC&&(o=MC[n.type]),o?(0,u.createElement)(Jl,{className:"block-editor-link-control__search-item-icon",icon:o}):null}var PC=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:i="",shouldShowType:a=!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)(NC,{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,lg.filterURLForDisplay)((0,lg.safeDecodeURI)(n.url))||""),l&&(0,_.__)("Press ENTER to add this link"))),a&&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 LC="__CREATE__",RC="mailto",AC="internal",OC=["URL",RC,"tel",AC],DC=[{id:"opensInNewTab",title:(0,_.__)("Open in new tab")}];function zC(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:i,suggestions:a,selectedSuggestion:s,isLoading:d,isInitialSuggestions:m,createSuggestionButtonText:g,suggestionsQuery:f}=e;const v=p()("block-editor-link-control__search-results",{"is-loading":d}),b=1===a.length&&OC.includes(a[0].type),k=n&&!b&&!m,y=!(null!=f&&f.type),E=`block-editor-link-control-search-results-label-${t}`,C=m?(0,_.__)("Recently updated"):(0,_.sprintf)((0,_.__)('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}),a.map(((e,t)=>k&&LC===e.type?(0,u.createElement)(SC,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:i(e,t),isSelected:t===s}):LC===e.type?null:(0,u.createElement)(PC,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===s,isURL:OC.includes(e.type),searchTerm:o,shouldShowType:y,isFrontPage:null==e?void 0:e.isFrontPage})))))}function FC(e){const t=null==e?void 0:e.startsWith("#");return(0,lg.isURL)(e)||e&&e.includes("www.")||t}const VC=()=>Promise.resolve([]),HC=e=>{let t="URL";const n=(0,lg.getProtocol)(e)||"";return n.includes("mailto")&&(t=RC),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=AC),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,lg.prependHTTP)(e):e,type:t}])};function GC(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?HC:VC;return(0,u.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return FC(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l,i)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&l&&!a?c[0].concat(c[1]):c[0],a||FC(e)||!r?c:c.concat({title:e,url:e,type:LC})})(t,{...e,isInitialSuggestions:s},r,i,n,o,l)}),[i,r,n])}const UC=()=>Promise.resolve([]),$C=()=>{},jC=(0,u.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:a=!1,onCreateSuggestion:s=$C,onChange:c=$C,onSelect:d=$C,showSuggestions:g=!0,renderSuggestions:f=(e=>(0,u.createElement)(zC,e)),fetchSuggestions:h=null,allowDirectEntry:v=!0,showInitialSuggestions:b=!1,suggestionsQuery:k={},withURLSuggestion:y=!0,createSuggestionButtonText:E,useLabel:C=!1}=e;const S=GC(k,v,a,y),w=g?h||S:UC,B=(0,m.useInstanceId)(jC),[I,x]=(0,u.useState)(),T=async e=>{let t=e;if(LC!==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 s(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)(CC,{__nextHasNoMarginBottom:!0,label:C?"URL":void 0,className:M,value:n,onChange:(e,t)=>{c(e),x(t)},placeholder:null!=i?i:(0,_.__)("Search or type url"),__experimentalRenderSuggestions:g?e=>f({...e,instanceId:B,withCreateSuggestion:a,createSuggestionButtonText:E,suggestionsQuery:k,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 WC=jC;var KC=(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 qC=(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:YC,Fill:ZC}=(0,h.createSlotFill)("BlockEditorLinkControlViewer");function QC(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var XC=function(e){const[t,n]=(0,u.useReducer)(QC,{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 JC(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:l=!1,onRemove:i}=e;const a=r?null==n?void 0:n.url:null,{richData:s,isFetching:c}=XC(a),d=s&&Object.keys(s).length,m=n&&(0,lg.filterURLForDisplay)((0,lg.safeDecodeURI)(n.url),16)||"",g=(null==s?void 0:s.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!=s&&s.icon?(0,u.createElement)("img",{src:null==s?void 0:s.icon,alt:""}):f?(0,u.createElement)(Jl,{icon:KC,size:32}):(0,u.createElement)(Jl,{icon:TC}),(0,u.createElement)("div",{"aria-label":(0,_.__)("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==s?void 0:s.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,_.__)("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:qC,label:(0,_.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),l&&(0,u.createElement)(h.Button,{icon:Cr,label:(0,_.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,u.createElement)(YC,{fillProps:n})),!!(d&&(null!=s&&s.image||null!=s&&s.description)||c)&&(0,u.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==s?void 0:s.image)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.image),className:p()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=s&&s.image)})},(null==s?void 0:s.image)&&(0,u.createElement)("img",{src:null==s?void 0:s.image,alt:""})),((null==s?void 0:s.description)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.description),className:p()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=s&&s.description)})},(null==s?void 0:s.description)&&(0,u.createElement)(h.__experimentalText,{truncate:!0,numberOfLines:"2"},s.description))))}const eS=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 tS(e){const[t,n]=(0,u.useState)(e||"");return(0,u.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const nS=()=>{};function oS(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=DC,onChange:a=nS,onRemove:s,noDirectEntry:c=!1,showSuggestions:d=!0,showInitialSuggestions:m,forceIsEditingLink:g,createSuggestion:f,withCreateSuggestion:v,inputValue:b="",suggestionsQuery:k={},noURLSuggestion:y=!1,createSuggestionButtonText:E,hasRichPreviews:C=!1,hasTextControl:S=!1,renderControlBottom:w=null}=e;void 0===v&&f&&(v=!0);const B=(0,u.useRef)(!0),I=(0,u.useRef)(),x=(0,u.useRef)(),T=(0,u.useRef)(!1),[M,N]=tS((null==l?void 0:l.url)||""),[P,L]=tS((null==l?void 0:l.title)||""),[R,A]=(0,u.useState)(void 0!==g?g:!l||!l.url),{createPage:O,isCreatingPage:D,errorMessage:z}=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=eS(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,_.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(f);(0,u.useEffect)((()=>{void 0!==g&&g!==R&&A(g)}),[g]),(0,u.useEffect)((()=>{if(B.current)return void(B.current=!1);const e=null!=x&&x.current?1:0;(Ri.focus.focusable.find(I.current)[e]||I.current).focus(),T.current=!1}),[R,D]);const F=()=>{var e;T.current=!(null===(e=I.current)||void 0===e||!e.contains(I.current.ownerDocument.activeElement)),A(!1)},V=()=>{H===(null==l?void 0:l.url)&&P===(null==l?void 0:l.title)||a({...l,url:H,title:P}),F()},H=b||M,G=!(null!=H&&null!==(t=H.trim())&&void 0!==t&&t.length),U=s&&l&&!R&&!D,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&S;return(0,u.createElement)("div",{tabIndex:-1,ref:I,className:"block-editor-link-control"},D&&(0,u.createElement)("div",{className:"block-editor-link-control__loading"},(0,u.createElement)(h.Spinner,null)," ",(0,_.__)("Creating"),"…"),(R||!l)&&!D&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:p()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:P,onChange:L,onKeyDown:e=>{const{keyCode:t}=e;t!==Qu.ENTER||G||(e.preventDefault(),V())}}),(0,u.createElement)(WC,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:H,withCreateSuggestion:v,onCreateSuggestion:O,onChange:N,onSelect:e=>{a({...e,title:P||(null==e?void 0:e.title)}),F()},showInitialSuggestions:m,allowDirectEntry:!c,showSuggestions:d,suggestionsQuery:k,withURLSuggestion:!y,createSuggestionButtonText:E,useLabel:j},(0,u.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,u.createElement)(h.Button,{onClick:V,label:(0,_.__)("Submit"),icon:hC,className:"block-editor-link-control__search-submit",disabled:G})))),z&&(0,u.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},z)),l&&!R&&!D&&(0,u.createElement)(JC,{key:null==l?void 0:l.url,value:l,onEditClick:()=>A(!0),hasRichPreviews:C,hasUnlinkControl:U,onRemove:s}),$&&(0,u.createElement)("div",{className:"block-editor-link-control__tools"},(0,u.createElement)(bC,{value:l,settings:i,onChange:a})),w&&w())}oS.ViewerFill=ZC;var rS=oS;var lS=(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 iS=(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 aS=(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 sS=()=>{};let cS=0;var uS=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(hm.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:a,onSelectURL:s,onToggleFeaturedImage:c,useFeaturedImage:d,onFilesUpload:p=sS,name:m=(0,_.__)("Replace"),createNotice:f,removeNotice:v,children:b,multiple:k=!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/"+ ++cS,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(),a(e),(0,pn.speak)((0,_.__)("The media file has been replaced")),v(w)},x=e=>{e.keyCode===Qu.DOWN&&(e.preventDefault(),e.target.click())},T=k&&!(!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)(Sg,{gallery:T,addToGallery:y,multiple:k,value:k?o:n,onSelect:e=>I(e,i),allowedTypes:r,render:e=>{let{open:t}=e;return(0,u.createElement)(h.MenuItem,{icon:lS,onClick:t},(0,_.__)("Open Media Library"))}}),(0,u.createElement)(Cg,null,(0,u.createElement)(h.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),a(n);p(n),C({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:B})})(e,i)},accept:l,multiple:k,render:e=>{let{openFileDialog:t}=e;return(0,u.createElement)(h.MenuItem,{icon:iS,onClick:()=>{t()}},(0,_.__)("Upload"))}}))),c&&(0,u.createElement)(h.MenuItem,{icon:aS,onClick:c,isPressed:d},(0,_.__)("Use featured image")),b),s&&(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,_.__)("Current media URL:")),(0,u.createElement)(h.Tooltip,{text:t,position:"bottom"},(0,u.createElement)("div",null,(0,u.createElement)(rS,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;s(t),S.current.focus()}})))))}})}));function dS(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,lg.filterURLForDisplay)((0,lg.safeDecodeURI)(t))):(0,u.createElement)("span",{className:r})}const{__experimentalPopoverLegacyPositionToPlacement:pS}=Io(h.privateApis);function mS(e){let t,{additionalControls:n,children:o,renderSettings:r,placement:l,focusOnMount:i="firstElement",position:a,...s}=e;void 0!==a&&W()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==l?t=l:void 0!==a&&(t=pS(a)),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},s),(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:df,label:(0,_.__)("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))}mS.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)(CC,{__nextHasNoMarginBottom:!0,value:r,onChange:o,autocompleteRef:t}),(0,u.createElement)(h.Button,{icon:hC,label:(0,_.__)("Apply"),type:"submit"}))},mS.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)(dS,{url:r,urlLabel:l,className:n}),o&&(0,u.createElement)(h.Button,{icon:qC,label:(0,_.__)("Edit"),onClick:o}))};var gS=mS;const fS=()=>{},hS=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,u.createElement)(gS,{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,_.__)("URL"),placeholder:(0,_.__)("Paste or type URL"),onChange:n,value:t}),(0,u.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:hC,label:(0,_.__)("Apply"),type:"submit"})))};var vS=(0,h.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:a,isAppender:s,accept:c,addToGallery:d,multiple:m=!1,handleUpload:f=!0,disableDropZone:v,disableMediaButtons:b,onError:k,onSelect:y,onCancel:E,onSelectURL:C,onToggleFeaturedImage:S,onDoubleClick:w,onFilesPreUpload:B=fS,onHTMLDrop:I=fS,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:k})},G=e=>{H(e.target.files)},U=null!=M?M:e=>{let{instructions:t,title:c}=l;if(P||C||(t=(0,_.__)("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,a=r&&"video"===o;void 0===t&&P&&(t=(0,_.__)("Upload a media file or pick one from your media library."),l?t=(0,_.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,_.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,_.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=(0,_.__)("Media"),l?c=(0,_.__)("Audio"):i?c=(0,_.__)("Image"):a&&(c=(0,_.__)("Video")))}const d=p()("block-editor-media-placeholder",o,{"is-appender":s});return(0,u.createElement)(h.Placeholder,{icon:r,label:c,instructions:t,className:d,notices:a,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,_.__)("Cancel"),variant:"link",onClick:E},(0,_.__)("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,_.__)("Insert from URL")),A&&(0,u.createElement)(hS,{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,_.__)("Use featured image")));return b?(0,u.createElement)(Cg,null,$()):(0,u.createElement)(Cg,{fallback:U(W())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,u.createElement)(h.Button,{variant:"tertiary",onClick:()=>{t()}},(0,_.__)("Media Library"))},o=(0,u.createElement)(Sg,{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&&s)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,_.__)("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,_.__)("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)(LE,c({settings:o,gradients:[],disableCustomGradients:!0},n))};const kS={position:"bottom right",variant:"toolbar"};var _S=()=>(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:df,label:(0,_.__)("More"),toggleProps:{...n,className:p()(n.className,{"is-pressed":t}),describedBy:(0,_.__)("Displays more block tools")},controls:Y(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:kS})))})));function yS(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]),a=(0,$.useAnchor)({editableContentElement:n,value:t,settings:i});return(0,u.createElement)(ES,{popoverAnchor:a})}function ES(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)(Cf,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,_.__)("Format tools")},(0,u.createElement)(h.ToolbarGroup,null,(0,u.createElement)(_S,null))))}var CS=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)(ES,{popoverAnchor:n});if(r){const e=(0,$.getActiveFormats)(o);return(0,$.isCollapsed)(o)&&!e.length?null:(0,u.createElement)(yS,{editableContentElement:n,value:o,activeFormats:e})}return(0,u.createElement)(Vo,{group:"inline"},(0,u.createElement)(_S,null))};function SS(){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!==Qu.DELETE&&o!==Qu.BACKSPACE&&o!==Qu.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}var wS=window.wp.shortcode;function BS(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function IS(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function xS(e){let{allowedFormats:t,disableFormats:n}=e;return n?xS.EMPTY_ARRAY:t}xS.EMPTY_ARRAY=[];function TS(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},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 MS(e,t){return t?(0,$.replace)(e,/\n+/g,$.__UNSTABLE_LINE_SEPARATOR):(0,$.replace)(e,new RegExp($.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function NS(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:s,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 k=i.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:v})),e}),l);if(k!==l)return void r(k);const _=[...(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=MS(t,!!m),BS(t,l.activeFormats),void r((0,$.insert)(l,t))}if(f)return void r((0,$.insert)(l,(0,$.create)({text:v})));if(null!=_&&_.length&&window.console.log("Received items:\n\n",_),null!=_&&_.length&&!oh(_,b)){const e=(0,a.getBlockTransforms)("from"),t=_.reduce(((t,n)=>{const o=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,$.isEmpty)(l)?c(t):TS({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,wS.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,$.isEmpty)(l)&&(0,lg.isURL)(v.trim())&&(y="BLOCKS");const C=(0,a.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:s,preserveWhiteSpace:g});if("string"==typeof C){let e=(0,$.create)({html:C});e=MS(e,!!m),BS(e,l.activeFormats),r((0,$.insert)(l,e))}else C.length>0&&(c&&(0,$.isEmpty)(l)?c(C,C.length-1,-1):TS({value:l,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const PS=["`",'"',"'","“”","‘’"];function LS(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:a,onChange:c}=o.current;if("insertText"!==l)return;if((0,$.isCollapsed)(a))return;const u=(0,s.applyFilters)("blockEditor.wrapSelectionSettings",PS).find((e=>{let[t,n]=e;return t===i||n===i}));if(!u)return;const[d,p=d]=u,m=a.start,g=a.end+d.length;let f=(0,$.insert)(a,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,k=new b.InputEvent("input",h);window.queueMicrotask((()=>{r.target.dispatchEvent(k)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function RS(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=RS(e[t].innerBlocks);if(o)return o}}function AS(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{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const l=e(),{start:i,text:s}=l;if(" "!==s.slice(i-1,i))return;const c=s.slice(0,i).trim(),u=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),d=(0,a.findTransform)(u,(e=>{let{prefix:t}=e;return c===t}));if(!d)return;const p=(0,$.toHTMLString)({value:(0,$.insert)(l,mn,0,i)}),m=d.transform(p);r(RS([m])),t([m]),n()}function l(e){const{inputType:l,type:i}=e,{getValue:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;c&&r&&r();const d=a(),p=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 OS(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!==Qu.ENTER)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:s,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,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,a.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)?TS({value:m,onReplace:l,onSplit:i,onSplitMiddle:s,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&&TS({value:m,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function DS(e){return e($.store).getFormatTypes()}const zS=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function FS(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 VS(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 HS(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 GS(){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 US(){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 $S(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 a=(0,$.getActiveFormat)(r,t);let s=void 0!==a;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||(s=!1)}return(0,u.createElement)(i,{key:t,isActive:s,activeAttributes:s&&a.attributes||{},isObjectActive:d,activeObjectAttributes:d&&c.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const jS=(0,u.createContext)(),WS=(0,u.createContext)();const KS=(0,u.forwardRef)((function e(t,n){let{children:o,tagName:r="div",value:l="",onChange:i,isSelected:s,multiline:d,inlineToolbar:f,wrapperClassName:v,autocompleters:b,onReplace:k,placeholder:_,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:a,disableEditingMenu:s,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===s?l=o.clientId===F&&r.clientId===F&&o.attributeKey===x:s&&(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=IS(d),Z=xS({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=a.children.toHTML(l),J=e=>i(a.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)(DS,[]),i=(0,u.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&zS.has(n))}))),[l,r,zS]),a=(0,g.useSelect)((e=>i.reduce(((o,r)=>{return r.__experimentalGetPropsForEditableTreePreparation?{...o,...(l=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),i=r.name,"object"!=typeof l?{[i]:l}:Object.fromEntries(Object.entries(l).map((e=>{let[t,n]=e;return[`${i}.${t}`,n]}))))}:o;var l,i}),{})),[i,t,n]),s=(0,g.useDispatch)(),c=[],d=[],p=[],m=[];for(const e in a)m.push(a[e]);return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=e.__experimentalCreatePrepareEditableTree(FS(a,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(o):c.push(o)}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:n,blockClientId:t}));const r=FS(a,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:ae,getValue:se,onChange:ce,ref:ue}=(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:_,__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)}}),de=function(e){return(0,h.__unstableUseAutocompleteProps)({...e,completers:Ey(e)})}({onReplace:k,completers:b,record:ae,onChange:ce});!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:ae});const pe=(0,u.useRef)(new Set),me=(0,u.useRef)(new Set);function ge(){var e;null===(e=z.current)||void 0===e||e.focus()}const fe=r;return(0,u.createElement)(u.Fragment,null,G&&(0,u.createElement)(jS.Provider,{value:pe},(0,u.createElement)(WS.Provider,{value:me},(0,u.createElement)(h.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:ae,onChange:ce,onFocus:ge}),(0,u.createElement)($S,{value:ae,onChange:ce,onFocus:ge,formatTypes:te,forwardedRef:z})))),G&&Q&&(0,u.createElement)(CS,{inline:f,editableContentElement:z.current,value:ae}),(0,u.createElement)(fe,c({role:"textbox","aria-multiline":!L,"aria-label":_},O,de,{ref:(0,m.useMergeRefs)([n,de.ref,O.ref,ue,LS({value:ae,onChange:ce}),AS({getValue:se,onChange:ce,__unstableAllowPrefixTransformations:A,formatTypes:te,onReplace:k,selectionChange:q}),GS(),(0,m.useRefEffect)((e=>{function t(e){(Qu.isKeyboardEvent.primary(e,"z")||Qu.isKeyboardEvent.primary(e,"y")||Qu.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),VS(pe),HS(me),SS(),NS({isSelected:G,disableFormats:P,onChange:ce,value:ae,formatTypes:te,tagName:r,onReplace:k,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:N,multilineTag:Y,preserveWhiteSpace:T,pastePlainText:M}),OS({removeEditorOnlyFormats:ie,value:ae,onReplace:k,onSplit:w,onSplitMiddle:I,multilineTag:Y,onChange:ce,disableLineBreaks:L,onSplitAtEnd:B}),US(),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===Qu.DELETE||t===Qu.BACKSPACE)){const{start:n,end:o,text:r}=ae,l=t===Qu.BACKSPACE,i=ae.activeFormats&&!!ae.activeFormats.length;if(!(0,$.isCollapsed)(ae)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&(0,$.isEmpty)(ae)&&l&&C(!l),e.preventDefault()}}})))}));KS.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=a.children.toHTML(t));const l=IS(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},KS.isEmpty=e=>!e||0===e.length;var qS=KS;const YS=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(qS,c({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));YS.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,u.createElement)(n,o,t)};var ZS=YS;var QS=(0,u.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,u.createElement)(ZS,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 XS(e){let{property:t,viewport:n,desc:o}=e;const r=(0,m.useInstanceId)(XS),l=o||(0,_.sprintf)((0,_._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 JS=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:s={id:"all",label:(0,_.__)("All")},viewports:c=[{id:"small",label:(0,_.__)("Small screens")},{id:"medium",label:(0,_.__)("Medium screens")},{id:"large",label:(0,_.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const d=o||(0,_.sprintf)((0,_.__)("Use the same %s on all screensizes."),n),m=(0,_.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,u.createElement)(XS,{property:n,viewport:s}),s);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:!a,onChange:r,help:m}),(0,u.createElement)("div",{className:p()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(c):c.map((e=>(0,u.createElement)(u.Fragment,{key:e.id},l((0,u.createElement)(XS,{property:n,viewport:e}),e))))))))};function ew(e){let{character:t,type:n,onUse:o}=e;const r=(0,u.useContext)(jS),l=(0,u.useRef)();return l.current=o,(0,u.useEffect)((()=>{function e(e){Qu.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function tw(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,i="RichText.ToolbarControls";return n&&(i+=`.${n}`),o&&r&&(t=Qu.displayShortcut[o](r)),(0,u.createElement)(h.Fill,{name:i},(0,u.createElement)(h.ToolbarButton,c({},l,{shortcut:t})))}function nw(e){let{inputType:t,onInput:n}=e;const o=(0,u.useContext)(WS),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 ow=(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 rw=(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?ow:qC,"aria-expanded":r,"aria-haspopup":"true",onClick:l,label:(0,_.__)("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(h.NavigableMenu,{role:"menu","aria-label":(0,_.__)("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:qC}),(0,_.__)("Edit"))},{value:"navigation",label:(0,u.createElement)(u.Fragment,null,ow,(0,_.__)("Select"))}]})),(0,u.createElement)("div",{className:"block-editor-tool-selector__help"},(0,_.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function lw(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 iw=(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 aw 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,_.__)("Edit link"):(0,_.__)("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:iw,label:(0,_.__)("Close"),onClick:this.toggle}),(0,u.createElement)(CC,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,u.createElement)(h.Button,{icon:hC,label:(0,_.__)("Submit"),type:"submit"}))))}}var sw=aw;var cw=(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 uw="none",dw="custom",pw="media",mw="attachment",gw=["noreferrer","noopener"],fw=(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"})),hw=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:a,linkClass:s,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),[k,y]=(0,u.useState)(null),E=(0,u.useRef)(null),C=(0,u.useCallback)((()=>{t!==pw&&t!==mw||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(k){var t;const e=(null===(t=T().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||dw;n({href:k,linkDestination:e})}S(),y(null),e.preventDefault()})),x=(0,u.useCallback)((()=>{n({linkDestination:uw,href:""})})),T=()=>{const e=[{linkDestination:pw,title:(0,_.__)("Media File"),url:"image"===r?l:void 0,icon:fw}];return"image"===r&&i&&e.push({linkDestination:mw,title:(0,_.__)("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,_.__)("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(" ");gw.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===gw.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,u.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link CSS Class"),value:s||"",onChange:e=>{n({linkClass:e})}})),N=null!==k?k: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,_.__)("Edit link"):(0,_.__)("Insert link"),"aria-expanded":d,onClick:f,ref:g}),d&&(0,u.createElement)(gS,{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:dw}).linkDestination:uw,n({linkDestination:o,href:e})})(e.url),S()}},e.title))))},(!o||v)&&(0,u.createElement)(gS.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)(gS.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:C,urlLabel:P}),(0,u.createElement)(h.Button,{icon:cw,label:(0,_.__)("Remove link"),onClick:x}))))};function vw(e){let{children:t,viewLabel:n,className:o,isEnabled:r=!0,deviceType:l,setDeviceType:i}=e;if((0,m.useViewportMatch)("small","<"))return null;const a={className:p()(o,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:n},c={"aria-label":(0,_.__)("View options")};return(0,u.createElement)(h.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,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&&Of},(0,_.__)("Desktop")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Tablet"),icon:"Tablet"===l&&Of},(0,_.__)("Tablet")),(0,u.createElement)(h.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Mobile"),icon:"Mobile"===l&&Of},(0,_.__)("Mobile"))),t)))}function bw(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 kw=(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,_.__)("Skip to the selected block")):null})),_w=window.wp.wordcount;var yw=(0,g.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(To);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,_w.count)((0,a.serialize)(t),"words");return(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,u.createElement)(fd,{icon:Nf,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,_.sprintf)((0,_._n)("%d block","%d blocks",t.length),t.length)),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,_.sprintf)((0,_._n)("%d word","%d words",n),n))))}));function Ew(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(a.store).getBlockStyles(t)}}),[t]),l=(0,u.useMemo)((()=>[{label:(0,_.__)("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=Vf(r))||void 0===e?void 0:e.name}),[r]),s=(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,_.__)("Default Style"),onChange:s})):null}var Cw=(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 Sw=(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 ww={name:"settings",title:"Settings",value:"settings",icon:Cw,className:"block-editor-block-inspector__tab-item"},Bw={name:"styles",title:"Styles",value:"styles",icon:Sw,className:"block-editor-block-inspector__tab-item"},Iw={name:"list",title:"List View",value:"list-view",icon:Ry,className:"block-editor-block-inspector__tab-item"};var xw=()=>{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,_.__)("Advanced"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"advanced"})):null};var Tw=()=>{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,_.__)("Position"),initialOpen:!1},(0,u.createElement)(jr.Slot,{group:"position"})):null},Mw=window.wp.preferences;const Nw="isInspectorControlsTabsHintVisible";function Pw(){const e=(0,g.useSelect)((e=>{var t;return null===(t=e(Mw.store).get("core",Nw))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,g.useDispatch)(Mw.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,_.__)("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:cw,iconSize:"16",label:(0,_.__)("Dismiss hint"),onClick:()=>{const e=Ri.focus.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",Nw,!1)},showTooltip:!1})):null}var Lw=e=>{let{showAdvancedControls:t=!1}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(Tw,null),t&&(0,u.createElement)("div",null,(0,u.createElement)(xw,null)),(0,u.createElement)(Pw,null))};var Rw=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,_.__)("Styles")},(0,u.createElement)(aE,{clientId:n}),(0,a.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,u.createElement)(Ew,{blockName:t}))),(0,u.createElement)(jr.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}))};const Aw=["core/navigation"];var Ow=e=>!Aw.includes(e);function Dw(e){let{blockName:t,clientId:n,hasBlockStyles:o,tabs:r}=e;const l=Ow(t)?void 0:Iw.name;return(0,u.createElement)(h.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:r,initialTabName:l,key:n},(e=>e.name===ww.name?(0,u.createElement)(Lw,{showAdvancedControls:!!t}):e.name===Bw.name?(0,u.createElement)(Rw,{blockName:t,clientId:n,hasBlockStyles:o}):e.name===Iw.name?(0,u.createElement)(jr.Slot,{group:"list"}):void 0))}const zw=[];function Fw(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:a,styles:s,typography:c}=Lr,u=Ow(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)(s.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)(a.Slot.__unstableName)||[],...p&&m>1?f:[]];p&&t.push(Iw),v.length&&t.push(ww),m&&t.push(Bw);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:zw}function Vw(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]),[n]);return(0,u.useMemo)((()=>Hw([t],o)),[t,o])}function Hw(e,t){const n=[];for(const o of e)t(o.name)&&n.push(o),n.push(...Hw(o.innerBlocks,t));return n}function Gw(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)(fd,{icon:l.icon}),(0,u.createElement)(h.FlexItem,null,l.title)))}function Uw(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:o,selectedBlock:r}=(0,g.useSelect)((e=>({blockTypes:e(a.store).getBlockTypes(),block:e(To).getBlock(t),selectedBlock:e(To).getSelectedBlock()})),[t]),l=lf(t),i=Vw(n,o);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(hd,c({},l,{className:l.isSynced&&"is-synced"})),(0,u.createElement)(EE,{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,_.__)("Content")),i.map((e=>(0,u.createElement)(Gw,{selectedBlock:r,key:e.clientId,block:e,blockTypes:n})))))}const $w=e=>{let{animate:t,wrapper:n,children:o}=e;return t?n(o):o},jw=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)},Ww=e=>{let{clientId:t,blockName:n}=e;const o=Fw(n),r=(null==o?void 0:o.length)>1,l=(0,g.useSelect)((e=>{const{getBlockStyles:t}=e(a.store),o=t(n);return o&&o.length>0}),[n]),i=lf(t);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(hd,c({},i,{className:i.isSynced&&"is-synced"})),(0,u.createElement)(EE,{blockClientId:t}),r&&(0,u.createElement)(Dw,{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,_.__)("Styles")},(0,u.createElement)(aE,{clientId:t}),(0,a.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,u.createElement)(Ew,{blockName:n}))),(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"}),(0,u.createElement)(Tw,null),(0,u.createElement)("div",null,(0,u.createElement)(xw,null))),(0,u.createElement)(kw,{key:"back"}))};var Kw=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(),s=i&&o(i),c=s&&(0,a.getBlockType)(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:c,topLevelLockedBlock:r(i)||("contentOnly"===l(i)?i:void 0)}}),[]),s=Fw(null==l?void 0:l.name),c=(null==s?void 0:s.length)>1,d=function(e,t){return(0,g.useSelect)((t=>{if(e){const n=t(To).getSettings().blockInspectorAnimation,o=null==n?void 0:n.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:l}=t(To);return l(r(),o,!0)[0]||e.name===o?null==n?void 0:n[e.name]:null}return null}),[t,e])}(l,r);if(n>1)return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(yw,null),c?(0,u.createElement)(Dw,{tabs:s}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(jr.Slot,null),(0,u.createElement)(jr.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(jr.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(jr.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(jr.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(jr.Slot,{group:"styles"})));const p=o===(0,a.getUnregisteredTypeHandlerName)();return l&&r&&!p?i?(0,u.createElement)(Uw,{topLevelLockedBlock:i}):(0,u.createElement)($w,{animate:d,wrapper:e=>(0,u.createElement)(jw,{blockInspectorAnimationSettings:d,selectedBlockClientId:r},e)},(0,u.createElement)(Ww,{clientId:r,blockName:l.name})):t?(0,u.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,_.__)("No block selected.")):null};var qw=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)(Zg,{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)(Gg,{position:"bottom center",clientId:r[n+1],__experimentalIsQuick:!0}))))):null};function Yw(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(To);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function Zw(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,m.useViewportMatch)("medium"),{hasFixedToolbar:l,isZoomOutMode:i,isTyping:a}=(0,g.useSelect)(Yw,[]),s=(0,xd.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:d,getBlockRootClientId:p}=(0,g.useSelect)(To),{duplicateBlocks:f,removeBlocks:v,insertAfterBlock:b,insertBeforeBlock:k,clearSelectedBlock:_,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(s("core/block-editor/move-up",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);y(t,n)}}else if(s("core/block-editor/move-down",e)){const t=d();if(t.length){e.preventDefault();const n=p(t[0]);E(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=d();t.length&&(e.preventDefault(),f(t))}else if(s("core/block-editor/remove",e)){const t=d();t.length&&(e.preventDefault(),v(t))}else if(s("core/block-editor/insert-after",e)){const t=d();t.length&&(e.preventDefault(),b(t[t.length-1]))}else if(s("core/block-editor/insert-before",e)){const t=d();t.length&&(e.preventDefault(),k(t[0]))}else if(s("core/block-editor/unselect",e)){d().length&&(e.preventDefault(),_(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,u.createElement)(Jg.Provider,{value:(0,u.useRef)(!1)},!a&&(0,u.createElement)(tf,{__unstableContentRef:n}),!i&&(l||!r)&&(0,u.createElement)(ev,{isFixed:!0}),(0,u.createElement)(Ev,{__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)(qw,{__unstableContentRef:n})))}const Qw=()=>{};var Xw=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:a,__experimentalFilterValue:s,onSelect:c=Qw,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)(Dg,{onSelect:c,rootClientId:p,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalInsertionIndex:a,__experimentalFilterValue:s,shouldFocusBlock:d,prioritizePatterns:m,ref:t})}));function Jw(){return null}Jw.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(xd.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,_.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,_.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,_.__)("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,_.__)("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,_.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,_.__)("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,_.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,_.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,_.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,_.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var eB=Jw;function tB(){return W()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const nB=new Set([Qu.UP,Qu.RIGHT,Qu.DOWN,Qu.LEFT,Qu.ENTER,Qu.BACKSPACE]);function oB(){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 rB(){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=oB(),l=(0,m.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,a=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!==Qu.ESCAPE&&t!==Qu.TAB||o()}function p(){a.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 s(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&&nB.has(t)}(e))&&n()}return r.addEventListener("keypress",s),r.addEventListener("keydown",s),()=>{r.removeEventListener("keypress",s),r.removeEventListener("keydown",s)}}),[e,t,n,o]);return(0,m.useMergeRefs)([r,l])}var lB=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:rB()},t)};const iB=-1!==window.navigator.userAgent.indexOf("Trident"),aB=new Set([Qu.UP,Qu.DOWN,Qu.LEFT,Qu.RIGHT]);function sB(){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 a(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function s(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(aB.has(r))return void(i=l);const a=l.top-i.top;if(0===a)return;const s=(0,Ri.getScrollContainer)(t);if(!s)return;const c=s===n.body||s===n.documentElement,u=c?o.scrollY:s.scrollTop,d=c?0:s.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:s.clientHeight;i.top+i.height>d+g||i.top{o.removeEventListener("scroll",a,!0),o.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var cB=iB?e=>e.children:function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:sB(),className:"block-editor__typewriter"},t)};const uB=(0,u.createContext)({});function dB(e){let{children:t,uniqueId:n,blockName:o=""}=e;const r=(0,u.useContext)(uB),{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)(uB.Provider,{value:i},t)}function pB(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,u.useContext)(uB),{name:r}=Ro();return n=n||r,Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e))}var mB=(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 gB(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,_.__)("Close"),icon:mB,onClick:r})),n&&(0,u.createElement)(h.__experimentalText,null,n))}var fB=(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)(gB,{title:(0,_.__)("Publish"),actions:[{label:(0,_.__)("Now"),onClick:()=>null==o?void 0:o(null)}],onClose:n}),(0,u.createElement)(h.DateTimePicker,c({startOfWeek:(0,BE.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:o},r)))}));const hB={button:"wp-element-button",caption:"wp-element-caption"},vB=e=>hB[e]?hB[e]:"";function bB(e,t){return Object.entries(t).every((t=>{let[n,o]=t;return"object"==typeof o&&"object"==typeof e[n]?bB(e[n],o):e[n]===o}))}const kB=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&bB(e,n)}));return 1===n.length?n[0]:void 0};function _B(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 yB(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>_B(BB(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 EB(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=yB(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return _B(e)}function CB(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 BB(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=_B(e);return n.unit||(n=EB(e)),CB(e)&&!n.unit?SB(e):wB(n,t)}const IB={};function xB(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 TB=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+xB(t);return IB[n]||(IB[n]=BB(e,t)),IB[n]};function MB(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=Rk({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 NB="body",PB=[{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 MB(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:[]}],LB={"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 RB(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 a of l){const l=i[a];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return RB(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function AB(e,t,n,o){if(!o)return o;const r=LB[n],l=PB.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:a}=l,s=RB(e,t,a,i,o);return s?`var:preset|${r}|${s.slug}`:o}function OB(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:",a="var(--wp--";let s;if(n.startsWith(i))s=n.slice(i.length).split("|");else{if(!n.startsWith(a)||!n.endsWith(")"))return n;s=n.slice(a.length,-")".length).split("--")}const[c,...u]=s;return"preset"===c?function(e,t,n,o){let[r,l]=o;const i=PB.find((e=>e.cssVarInfix===r));if(!i)return n;const a=RB(e.settings,t,i.path,"slug",l);if(a){const{valueKey:n}=i;return OB(e,t,a[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?OB(e,t,l):n}(e,t,n,u):n}const DB=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zB={settings:{},styles:{}},FB=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(DB);return[!!e&&!k()(e,zB),(0,u.useCallback)((()=>t((()=>zB))),[t])]};function VB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:a}=(0,u.useContext)(DB),s=t?`settings.blocks.${t}.${e}`:`settings.${e}`,c=e=>{a((t=>{const n=JSON.parse(JSON.stringify(t));return(0,f.set)(n,s,e),n}))},d=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`;let a;switch(o){case"all":a=(0,f.get)(r,n);break;case"user":a=(0,f.get)(i,n);break;case"base":a=(0,f.get)(l,n);break;default:throw"Unsupported source"}return a},p=null!==(n=d(t))&&void 0!==n?n:d();return[p,c]}function HB(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:i,setUserConfig:a}=(0,u.useContext)(DB),s=t?`styles.blocks.${t}.${e}`:`styles.${e}`,c=n=>{a((o=>{const l=JSON.parse(JSON.stringify(o));return(0,f.set)(l,s,AB(r.settings,t,e,n)),l}))};let d;switch(o){case"all":d=OB(r,t,"styles.css"===s?(0,f.get)(i,s):null!==(n=(0,f.get)(i,s))&&void 0!==n?n:(0,f.get)(l,s));break;case"user":d=OB(r,t,(0,f.get)(i,s));break;case"base":d=OB(l,t,(0,f.get)(l,s));break;default:throw"Unsupported source"}return[d,c]}const GB={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function UB(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 $B(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return PB.reduce(((n,o)=>{let{path:r,cssVarInfix:l,classes:i}=o;if(!i)return n;const a=(0,f.get)(t,r,[]);return["default","theme","custom"].forEach((t=>{a[t]&&a[t].forEach((t=>{let{slug:o}=t;i.forEach((t=>{let{classSuffix:r,propertyName:i}=t;const a=`.has-${(0,f.kebabCase)(o)}-${r}`,s=e.split(",").map((e=>`${e}${a}`)).join(","),c=`var(--wp--preset--${l}--${(0,f.kebabCase)(o)})`;n+=`${s}{${i}: ${c} !important;}`}))}))})),n}),"")}function jB(){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,...jB(i,e,n)]}else o.push(`${l}: ${i}`)})),o}function WB(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}function KB(){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=NB===t,l=Object.entries(a.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,o)=>{let[l,{value:i,properties:a,useEngine:s,rootOnly:c}]=o;if(c&&!r)return t;const u=i;if("elements"===u[0]||s)return t;const d=(0,f.get)(e,u);if("--wp--style--root--padding"===l&&("string"==typeof d||!n))return t;if(a&&"string"!=typeof d)Object.entries(a).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}: ${UB((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}: ${UB((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 a=e.value;if("string"!=typeof a&&null!==(t=a)&&void 0!==t&&t.ref){var s;const e=a.ref.split(".");if(a=(0,f.get)(o,e),!a||null!==(s=a)&&void 0!==s&&s.ref)return}var c;"font-size"===i&&(a=MB({size:a},null==o||null===(c=o.settings)||void 0===c?void 0:c.typography));l.push(`${i}: ${a}`)})),l}function qB(e){var t,n,o,r,l;let{tree:i,style:a,selector:s,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:d}=e,p="",m=c?Bl(null==a||null===(t=a.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(s===NB?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?s===NB?`${s} .${t}${(null==e?void 0:e.selector)||""}`:`${s}.${t}${(null==e?void 0:e.selector)||""}`:s===NB?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${s}.${t}${(null==e?void 0:e.selector)||""})`,p+=`${o} { ${n.join("; ")}; }`}}))})),s===NB&&c&&(p+=`${s} { --wp--style--block-gap: ${m}; }`)),s===NB&&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+=`${s} .${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=`${s} .${n}${(null==e?void 0:e.selector)||""}`;p+=`${o} { ${t.join("; ")}; }`}}))}))}return p}const YB=(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:NB}),Object.entries(a.__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,s]=e;const c=l(s);if(null!=s&&s.variations){const e={};Object.keys(s.variations).forEach((t=>{e[t]=l(s.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==s?void 0:s.elements)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;o&&null!=t&&t[i]&&null!==a.__EXPERIMENTAL_ELEMENTS&&void 0!==a.__EXPERIMENTAL_ELEMENTS&&a.__EXPERIMENTAL_ELEMENTS[n]&&r.push({styles:o,selector:t[i].selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),r},ZB=(e,t)=>{var n,o,r;const l=[];if(null==e||!e.settings)return l;const i=e=>{const t={};return PB.forEach((n=>{let{path:o}=n;const r=(0,f.get)(e,o,!1);!1!==r&&(0,f.set)(t,o,r)})),t},a=i(e.settings),s=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,f.isEmpty)(a)&&!s||l.push({presets:a,custom:s,selector:NB}),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),a=o.custom;(0,f.isEmpty)(r)&&!a||l.push({presets:r,custom:a,selector:t[n].selector})})),l},QB=(e,t)=>{const n=ZB(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 PB.reduce(((n,o)=>{let{path:r,valueKey:l,valueFunc:i,cssVarInfix:a}=o;const s=(0,f.get)(e,r,[]);return["default","theme","custom"].forEach((e=>{s[e]&&s[e].forEach((e=>{l&&!i?n.push(`--wp--preset--${a}--${(0,f.kebabCase)(e.slug)}: ${e[l]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${a}--${(0,f.kebabCase)(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),a=jB(r,"--wp--custom--","--");a.length>0&&i.push(...a),i.length>0&&(o+=`${l}{${i.join(";")};}`)})),o};function XB(e,t){return ZB(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return PB.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)(qp,{preset:e,key:e.slug})))))}))}(t)}))}const JB=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function eI(){let{merged:e}=(0,u.useContext)(DB);const[t]=VB("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(a.store).getBlockStyles),[]);return(0,u.useMemo)((()=>{var t,i,s,c,u,d,p,m,g,h,v,b;if(null===(t=e)||void 0===t||!t.styles||null===(i=e)||void 0===i||!i.settings)return[];e=!(null===(u=(c=e).styles)||void 0===u?void 0:u.blocks["core/separator"])||!(null===(d=c.styles)||void 0===d||null===(p=d.blocks["core/separator"].color)||void 0===p?void 0:p.background)||null!==(m=c.styles)&&void 0!==m&&null!==(g=m.blocks["core/separator"].color)&&void 0!==g&&g.text||null!==(h=c.styles)&&void 0!==h&&null!==(v=h.blocks["core/separator"].border)&&void 0!==v&&v.color?c:{...c,styles:{...c.styles,blocks:{...c.styles.blocks,"core/separator":{...c.styles.blocks["core/separator"],color:{...c.styles.blocks["core/separator"].color,text:null===(b=c.styles)||void 0===b?void 0:b.blocks["core/separator"].color.background}}}}};const k=((e,t)=>{const n={};return e.forEach((e=>{var o,r,l,i,a,s,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===(a=i.color)||void 0===a?void 0:a.__experimentalDuotone)&&void 0!==l?l:null,f=!(null==e||null===(s=e.supports)||void 0===s||!s.__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 k={};Object.entries(GB).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&&(k[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(k).length?k:void 0,hasLayoutSupport:f,name:p,selector:m,styleVariationSelectors:Object.keys(b).length?b:void 0}})),n})((0,a.getBlockTypes)(),l),_=QB(e,k),y=function(e,t,n,o){var r,l;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=YB(e,t),s=ZB(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+="}",a.forEach((t=>{let{selector:r,duotoneSelector:l,styles:a,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m}=t;d&&Object.entries(d).forEach((e=>{let[t,n]=e;if(null!=a&&a[t]){const e=KB({[t]:a[t]});delete a[t],e.length&&(p+=`${n}{${e.join(";")} }`)}})),m&&Object.entries(m).forEach((t=>{var n;let[o,r]=t;if(null!=a&&null!==(n=a.variations)&&void 0!==n&&n[o]){var l;d&&Object.entries(d).forEach((e=>{var t,n;let[l,i]=e;if(null!=a&&null!==(t=a.variations)&&void 0!==t&&null!==(n=t[o])&&void 0!==n&&n[l]){const e=KB({[l]:a.variations[o][l]});delete a.variations[o][l],e.length&&(p+=`${WB(i,r)}{${e.join(";")} }`)}}));const t=KB(null==a||null===(l=a.variations)||void 0===l?void 0:l[o],r,c,e);t.length&&(p+=`${r}{${t.join(";")}}`)}}));const g={};if(null!=a&&a.filter&&(g.filter=a.filter,delete a.filter),l){const e=KB(g);e.length>0&&(p+=`${l}{${e.join(";")};}`)}i||NB!==r&&!u||(p+=qB({tree:e,style:a,selector:r,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:s}));const f=KB(a,r,c,e);null!=f&&f.length&&(p+=`${r}{${f.join(";")};}`);const h=Object.entries(a).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=h&&h.length&&h.forEach((e=>{let[t,n]=e;const o=KB(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 s.forEach((e=>{let{selector:t,presets:n}=e;NB===t&&(t="");const o=$B(t,n);(0,f.isEmpty)(o)||(p+=o)})),p}(e,k,n,o,r),E=XB(e,k),C=[{css:_,isGlobalStyles:!0},{css:y,isGlobalStyles:!0},{css:null!==(s=e.styles.css)&&void 0!==s?s:"",isGlobalStyles:!0}];return(0,a.getBlockTypes)().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var o;const n=k[t.name].selector;C.push({css:JB(null===(o=e.styles.blocks[t.name])||void 0===o?void 0:o.css,n),isGlobalStyles:!0})}})),[C,e.settings,E]}),[n,o,e,r])}const tI=["core/navigation-link/page","core/navigation-link"],nI=(0,u.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:o,...r}=e;const[l,i]=(0,u.useState)(null),a=(0,m.useInstanceId)(nI),{hideInserter:s,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=af({clientId:d,context:"list-view"}),f=af({clientId:null==l?void 0:l.clientId,context:"list-view"});(0,u.useEffect)((()=>{null!=f&&f.length&&(0,pn.speak)((0,_.sprintf)((0,_.__)("%s block inserted"),f),"assertive")}),[f]);const h=(0,u.useCallback)((e=>(e.sort(((e,t)=>{let{id:n}=e,{id:o}=t,r=tI.indexOf(n),l=tI.indexOf(o);return r<0&&(r=tI.length),l<0&&(l=tI.length),r-l})),e)),[]);if(s)return null;const{PrivateInserter:v}=Io(NI),b=`off-canvas-editor-appender__${a}`,k=(0,_.sprintf)((0,_.__)("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)(v,c({ref:t,rootClientId:d,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},r,{toggleProps:{"aria-describedby":b},onSelectOrClose:e=>{null!=e&&e.clientId&&i(e)},orderInitialBlockItems:h})),(0,u.createElement)("div",{className:"offcanvas-editor-appender__description",id:b},k))})),oI=Ru(h.__experimentalTreeGridRow);function rI(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:i,path:a,...s}=e;const d=Du({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:a});return(0,u.createElement)(oI,c({ref:d,className:p()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r},s),l)}function lI(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,_.isRTL)()?zy:xy}))}var iI=(0,u.forwardRef)((function(e,t){let{className:n,block:o,onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:a,onDragStart:s,onDragEnd:c,draggable:d}=e;const{clientId:m}=o,g=lf(m),f=af({clientId:m,context:"list-view"}),{isLocked:v}=xh(m),b=g?(0,_.sprintf)((0,_.__)("Edit %s block"),g.title):(0,_.__)("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!==Qu.ENTER&&e.keyCode!==Qu.SPACE||r(e)},ref:t,tabIndex:i,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:d,href:`#block-${m}`,"aria-hidden":!0,title:b},(0,u.createElement)(lI,{onClick:l}),(0,u.createElement)(fd,{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:Dy})))))})),aI=window.wp.escapeHtml;function sI(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 cI(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,_.__)("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,a.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,u.createElement)(fd,{icon:e.icon}),e.title))))):null}function uI(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)(rS,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:i,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:sI(r,l),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:n?null:()=>(0,u.createElement)(cI,{clientId:e.clientId})}))}const dI=["core/navigation-link","core/navigation-submenu"],pI=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:i,siblingBlockCount:a,level:s,isExpanded:d,selectedClientIds:m,...f}=e;const{clientId:h}=r,[v,b]=(0,u.useState)(),{blockMovingClientId:k,selectedBlockInBlockEditor:_,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.url;(0,u.useEffect)((()=>{h===y&&null!=dI&&dI.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)(uI,{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:a="",opensInNewTab:s,id:c,kind:u=r,type:d=l}=e,p=i.replace(/http(s?):\/\//gi,""),m=a.replace(/http(s?):\/\//gi,""),g=i&&i!==o&&p!==m?(0,aI.escapeHTML)(i):o||(0,aI.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({...a&&{url:encodeURI((0,lg.safeDecodeURI)(a))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...v&&{kind:v},...f&&"URL"!==f&&{type:f}})}(e,S,E),b(!1)}}),(0,u.createElement)(cf,{clientIds:x},(e=>{let{draggable:p,onDragStart:m,onDragEnd:g}=e;return(0,u.createElement)(iI,c({ref:t,className:I,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:i,siblingBlockCount:a,level:s,draggable:p,onDragStart:m,onDragEnd:g,isExpanded:d},f))})))}));var mI=pI;const gI=(0,u.createContext)({}),fI=()=>(0,u.useContext)(gI);var hI=(0,u.memo)((function e(t){let{block:{clientId:n},isDragged:o,isSelected:r,isBranchSelected:l,selectBlock:i,position:s,level:c,rowCount:d,siblingBlockCount:f,showBlockMovers:v,path:b,isExpanded:k,selectedClientIds:y,preventAnnouncement:E}=t;const C=(0,u.useRef)(null),[S,w]=(0,u.useState)(!1),{isLocked:B,isContentLocked:I}=xh(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=lf(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}=fI(),G=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===k?V(n):!1===k&&F(n)}),[n,F,V,k]),U=(0,m.useInstanceId)(e);if(!L)return null;const $=!!L&&(0,a.hasBlockSupport)(L.name,"__experimentalToolbar",!0),j=`list-view-block-select-button__${U}`,W=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,f,c);let K=(0,_.__)("Link");P&&(K=B?(0,_.sprintf)((0,_.__)("%s link (locked)"),P.title):(0,_.sprintf)((0,_.__)("%s link"),P.title));const q=P?(0,_.sprintf)((0,_.__)("Options for %s block"),P.title):(0,_.__)("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||Uh;return(0,u.createElement)(rI,{className:J,onMouseEnter:R,onMouseLeave:A,onFocus:R,onBlur:A,level:c,position:s,rowCount:d,path:b,id:`list-view-block-${n}`,"data-block":n,isExpanded:I?void 0:k,"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:k,"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)(mI,{block:L,onClick:O,onToggleExpanded:G,isSelected:r,position:s,siblingBlockCount:f,level:c,ref:t,tabIndex:n,onFocus:o,isExpanded:k,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)(vf,{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:cg,label:q,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:o,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:D}))}))))}));function vI(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+vI(r,e,t,n):o+1},kI=()=>{};var _I=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=kI,showBlockMovers:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:s=!1,listPosition:d=0,fixedListWindow:p,isExpanded:m,parentId:f,shouldShowInnerBlocks:v=!0,showAppender:b=!0}=t,k=(0,g.useSelect)((e=>!(!f||"contentOnly"!==e(To).getTemplateLock(f))),[f]),{expandedState:_,draggedClientIds:y}=fI();if(k)return null;const E=b&&1===i,C=n.filter(Boolean),S=C.length,w=E?S+1:S;let B=d;return(0,u.createElement)(u.Fragment,null,C.map(((t,n)=>{var c;const{clientId:d,innerBlocks:f}=t;n>0&&(B+=vI(C[n-1],_,y,m));const{itemInView:h}=p,k=h(B),E=n+1,I=a.length>0?`${a}_${E}`:`${E}`,x=!(null==f||!f.length),T=x&&v?null!==(c=_[d])&&void 0!==c?c:m:void 0,M=!(null==y||!y.includes(d)),N=M||k,P=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(d,l),L=s||P&&x;return(0,u.createElement)(g.AsyncModeProvider,{key:d,value:!P},N&&(0,u.createElement)(hI,{block:t,selectBlock:o,isSelected:P,isBranchSelected:L,isDragged:M,level:i,position:E,rowCount:w,siblingBlockCount:S,showBlockMovers:r,path:I,isExpanded:T,listPosition:B,selectedClientIds:l}),!N&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),x&&T&&!M&&(0,u.createElement)(e,{parentId:d,blocks:f,selectBlock:o,showBlockMovers:r,level:i+1,path:I,listPosition:B+1,fixedListWindow:p,isBranchSelected:L,selectedClientIds:l,isExpanded:m,showAppender:b}))})),E&&(0,u.createElement)(h.__experimentalTreeGridRow,{level:i,setSize:w,positionInSet:w,isExpanded:!0},(0,u.createElement)(h.__experimentalTreeGridCell,null,(e=>(0,u.createElement)(nI,c({nestingLevel:i,blockCount:S},e))))))}));function yI(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(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]),s=a||i,c=(0,u.useCallback)((()=>{if(!i)return 0;const e=s.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,s]),d=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),p=(0,u.useMemo)((()=>{if(s&&("top"===l||"bottom"===l||"inside"===l))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.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 a=o-n,u=i-r;return new window.DOMRect(n,r,a,u)}}}),[s,l,c]);return s?(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 EI(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(To),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getBlockSelectionEnd:i,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:d}=(0,g.useSelect)(To),{getBlockType:p}=(0,g.useSelect)(a.store);return{updateBlockSelection:(0,u.useCallback)((async(i,a,u)=>{if(null==i||!i.shiftKey)return void n(a);i.preventDefault();const m="keydown"===i.type&&(i.keyCode===Qu.UP||i.keyCode===Qu.DOWN||i.keyCode===Qu.HOME||i.keyCode===Qu.END);if(!m&&!d()&&!c())return void n(a,null);const g=s(),f=[...r(a),a];m&&!g.some((e=>f.includes(e)))&&await e();let h=l(),v=a;m&&(d()||c()||(h=a),u&&(v=u));const b=r(h),k=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,k);await t(y,E,null);const C=s();if((i.keyCode===Qu.HOME||i.keyCode===Qu.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,_.sprintf)((0,_.__)("%s deselected."),e))}else S.length>1&&(w=(0,_.sprintf)((0,_.__)("%s blocks deselected."),S.length));w&&(0,pn.speak)(w)}),[e,o,p,r,l,i,s,c,d,t,n])}}const CI=["top","bottom"];function SI(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,g.useSelect)(To),[l,i]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=l||{},c=Nv(a,s),d=o(),p=(0,m.useThrottle)((0,u.useCallback)(((o,l)=>{const a={x:o.clientX,y:o.clientY},s=!(null==d||!d.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const a=i.element.getBoundingClientRect(),[s,c]=Lv(t,a,CI),u=Rv(t,a);if(void 0===r||s0||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 a=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+a,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:!!s&&d.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!s||r(d,i),canInsertDraggedBlocksAsChild:!s||r(d,l)}})),a);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 wI=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var BI=(0,u.forwardRef)((function(e,t){let{id:n,parentClientId:o,blocks:r,showBlockMovers:l=!1,isExpanded:i=!1,showAppender:a=!0,LeafMoreMenu:s,description:c=(0,_.__)("Block navigation structure"),onSelect:d}=e;const{getBlock:p}=(0,g.useSelect)(To),{clientIdsTree:f,draggedClientIds:v,selectedClientIds:b}=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])}(r),{visibleBlockCount:k,shouldShowInnerBlocks:y}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(To),r=(null==v?void 0:v.length)>0?n(v).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[v]),{updateBlockSelection:E}=EI(),[C,S]=(0,u.useReducer)(wI,{}),{ref:w,target:B}=SI(),I=(0,u.useRef)(),x=(0,m.useMergeRefs)([I,w,t]),T=(0,u.useRef)(!1),{setSelectedTreeId:M}=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:b[0],setExpandedState:S}),N=(0,u.useCallback)(((e,t)=>{E(e,t),M(t),d&&d(p(t))}),[M,E,d,p]);(0,u.useEffect)((()=>{T.current=!0}),[]);const[P]=(0,m.__experimentalUseFixedWindowList)(I,36,k,{useWindowing:!0,windowOverscan:40}),L=(0,u.useCallback)((e=>{e&&S({type:"expand",clientIds:[e]})}),[S]),R=(0,u.useCallback)((e=>{e&&S({type:"collapse",clientIds:[e]})}),[S]),A=(0,u.useCallback)((e=>{var t;L(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[L]),O=(0,u.useCallback)((e=>{var t;R(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[R]),D=(0,u.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&E(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)}),[E]),z=(0,u.useMemo)((()=>({isTreeGridMounted:T.current,draggedClientIds:v,expandedState:C,expand:L,collapse:R,LeafMoreMenu:s})),[T.current,v,C,L,R,s]);return(0,u.createElement)(g.AsyncModeProvider,{value:!0},(0,u.createElement)(yI,{listViewRef:I,blockDropTarget:B}),(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,_.__)("Block navigation structure"),ref:x,onCollapseRow:O,onExpandRow:A,onFocusRow:D,"aria-description":c},(0,u.createElement)(gI.Provider,{value:z},(0,u.createElement)(_I,{parentId:o,blocks:f,selectBlock:N,showBlockMovers:l,fixedListWindow:P,selectedClientIds:b,isExpanded:i,shouldShowInnerBlocks:y,showAppender:a}),(0,u.createElement)(h.__experimentalTreeGridRow,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!f.length&&(0,u.createElement)(h.__experimentalTreeGridCell,{withoutGridItem:!0},(0,u.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},(0,_.__)("Your menu is currently empty. Add your first menu item to get started."))))))))}));var II=(0,u.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(G.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"}));const xI={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"},TI=["core/navigation-link","core/navigation-submenu"];function MI(e){let{block:t,onClose:n}=e;const{expandedState:o,expand:r}=fI(),{insertBlock:l,replaceBlock:i,replaceInnerBlocks:s}=(0,g.useDispatch)(To),c=t.clientId,d=!TI.includes(t.name);return(0,u.createElement)(h.MenuItem,{icon:II,disabled:d,onClick:()=>{const e=(0,a.createBlock)("core/navigation-link");if("core/navigation-submenu"===t.name)l(e,t.innerBlocks.length,c,false);else{const n=(0,a.createBlock)("core/navigation-submenu",t.attributes,t.innerBlocks);i(c,n),s(n.clientId,[e],false)}o[t.clientId]||r(t.clientId),n()}},(0,_.__)("Add submenu link"))}const NI={};Bo(NI,{...i,ExperimentalBlockEditorProvider:_d,LeafMoreMenu:function(e){const{clientId:t,block:n}=e,{removeBlocks:o}=(0,g.useDispatch)(To),r=(0,_.sprintf)((0,_.__)("Remove %s"),sf({clientId:t,maximumLength:25}));return(0,u.createElement)(h.DropdownMenu,c({icon:cg,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:xI,noIcons:!0},e),(e=>{let{onClose:l}=e;return(0,u.createElement)(h.MenuGroup,null,(0,u.createElement)(MI,{block:n,onClose:l}),(0,u.createElement)(h.MenuItem,{onClick:()=>{o([t],!1),l()}},r))}))},OffCanvasEditor:BI,PrivateInserter:Hg})}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file +var UE=function(e,t){return UE=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])},UE(e,t)};var jE=function(){return jE=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu*o?{width:u*o,height:u}:{width:c,height:c/o}}function HE(e,t,n,r,o){void 0===o&&(o=0);var i=eS(t.width,t.height,o),l=i.width,a=i.height;return{x:WE(e.x,l,n.width,r),y:WE(e.y,a,n.height,r)}}function WE(e,t,n,r){var o=t*r/2-n/2;return tS(e,-o,o)}function $E(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function KE(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function qE(e,t,n,r,o,i,l){void 0===i&&(i=0),void 0===l&&(l=!0);var a=l?JE:YE,s=eS(t.width,t.height,i),c=eS(t.naturalWidth,t.naturalHeight,i),u={x:a(100,((s.width-n.width/o)/2-e.x/o)/s.width*100),y:a(100,((s.height-n.height/o)/2-e.y/o)/s.height*100),width:a(100,n.width/s.width*100/o),height:a(100,n.height/s.height*100/o)},p=Math.round(a(c.width,u.width*c.width/100)),d=Math.round(a(c.height,u.height*c.height/100)),f=c.width>=c.height*r?{width:Math.round(d*r),height:d}:{width:p,height:Math.round(p/r)};return{croppedAreaPercentages:u,croppedAreaPixels:jE(jE({},f),{x:Math.round(a(c.width-f.width,u.x*c.width/100)),y:Math.round(a(c.height-f.height,u.y*c.height/100))})}}function JE(e,t){return Math.min(e,Math.max(0,t))}function YE(e,t){return t}function QE(e,t,n,r,o,i){var l=eS(t.width,t.height,n),a=tS(r.width/l.width*(100/e.width),o,i);return{crop:{x:a*l.width/2-r.width/2-l.width*a*(e.x/100),y:a*l.height/2-r.height/2-l.height*a*(e.y/100)},zoom:a}}function ZE(e,t,n,r,o,i){void 0===n&&(n=0);var l=eS(t.naturalWidth,t.naturalHeight,n),a=tS(function(e,t,n){var r=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*r):n.width/(e.width*r)}(e,t,r),o,i),s=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((l.width-e.width)/2-e.x)*s,y:((l.height-e.height)/2-e.y)*s},zoom:a}}function XE(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function eS(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function tS(e,t,n){return Math.min(Math.max(e,t),n)}function nS(){for(var e=[],t=0;t0})).join(" ").trim()}var rS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=ta().createRef(),n.videoRef=ta().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=QE(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=ZE(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,l,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,p=c/u,d=void 0;if(a.offsetWidthp?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":d={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":d={width:n.containerRect.height*p,height:n.containerRect.height};break;case"auto-cover":d=c>u?{width:n.containerRect.width,height:n.containerRect.width/p}:{width:n.containerRect.height*p,height:n.containerRect.height}}else d={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=jE(jE({},d),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:GE(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===f.height&&(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},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 r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=jE({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=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!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},l=n.props.restrictPosition?HE(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(l)}})))},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 r=t.getMousePoint(e),o=VE()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{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,r=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-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,l=o.zoom;return{x:(t+i.x)/l,y:(r+i.y)/l}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var l=tS(e,n.props.minZoom,n.props.maxZoom);if(i){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*l-a.x,y:s.y*l-a.y},u=n.props.restrictPosition?HE(c,n.mediaSize,n.state.cropSize,l,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(l)}},n.getCropData=function(){return n.state.cropSize?qE(n.props.restrictPosition?HE(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,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?HE(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}UE(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,r,o,i,l,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(l=this.props.crop)||void 0===l?void 0:l.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=$E(n,r),this.lastPinchRotation=KE(n,r),this.onDragStart(XE(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=XE(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=$E(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var l=KE(r,o),a=n.props.rotation+(l-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=l}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,l=t.crop,a=l.x,s=l.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,f=t.style,m=f.containerStyle,y=f.cropAreaStyle,g=f.mediaStyle,h=t.classes,v=h.containerClassName,b=h.cropAreaClassName,_=h.mediaClassName,k=t.objectFit;return ta().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:nS("reactEasyCrop_Container",v)},n?ta().createElement("img",jE({alt:"",className:nS("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{src:n,ref:this.imageRef,style:jE(jE({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):r&&ta().createElement("video",jE({autoPlay:!0,loop:!0,muted:!0,className:nS("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:jE(jE({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return ta().createElement("source",jE({key:e.src},e))}))),this.state.cropSize&&ta().createElement("div",{style:jE(jE({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:nS("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},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}(ta().Component);const oS={placement:"bottom-start",variant:"toolbar"};function iS(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:a}=e;const{isInProgress:s,editedUrl:c,position:p,zoom:f,aspect:m,setPosition:y,setCrop:h,setZoom:v,rotation:b}=LE();let _=r||o*i/l;return b%180==90&&(_=o*l/i),(0,u.createElement)("div",{className:d()("wp-block-image__crop-area",null==a?void 0:a.className,{"is-applying":s}),style:{...null==a?void 0:a.style,width:n||o,height:_}},(0,u.createElement)(rS,{image:c||t,disabled:s,minZoom:1,maxZoom:3,crop:p,zoom:f/100,aspect:m,onCropChange:e=>{y(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{v(100*e)}}),s&&(0,u.createElement)(g.Spinner,null))}var lS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 aS(){const{isInProgress:e,zoom:t,setZoom:n}=LE();return(0,u.createElement)(g.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:oS,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,u.createElement)(g.ToolbarButton,{icon:lS,label:(0,_.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,u.createElement)(g.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var sS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 cS(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,u.createElement)(g.MenuGroup,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,u.createElement)(g.MenuItem,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?Dy:void 0},t)})))}function uS(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=LE();return(0,u.createElement)(g.DropdownMenu,{icon:sS,label:(0,_.__)("Aspect Ratio"),popoverProps:oS,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cS,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("Original"),aspect:i},{title:(0,_.__)("Square"),aspect:1}]}),(0,u.createElement)(cS,{label:(0,_.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("16:10"),aspect:1.6},{title:(0,_.__)("16:9"),aspect:16/9},{title:(0,_.__)("4:3"),aspect:4/3},{title:(0,_.__)("3:2"),aspect:1.5}]}),(0,u.createElement)(cS,{label:(0,_.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("10:16"),aspect:.625},{title:(0,_.__)("9:16"),aspect:9/16},{title:(0,_.__)("3:4"),aspect:3/4},{title:(0,_.__)("2:3"),aspect:2/3}]}))}))}var pS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 dS(){const{isInProgress:e,rotateClockwise:t}=LE();return(0,u.createElement)(g.ToolbarButton,{icon:pS,label:(0,_.__)("Rotate"),onClick:t,disabled:e})}function fS(){const{isInProgress:e,apply:t,cancel:n}=LE();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarButton,{onClick:t,disabled:e},(0,_.__)("Apply")),(0,u.createElement)(g.ToolbarButton,{onClick:n},(0,_.__)("Cancel")))}function mS(e){let{id:t,url:n,width:r,height:o,clientWidth:i,naturalHeight:l,naturalWidth:a,onSaveImage:s,onFinishEditing:c,borderProps:p}=e;return(0,u.createElement)(DE,{id:t,url:n,naturalWidth:a,naturalHeight:l,onSaveImage:s,onFinishEditing:c},(0,u.createElement)(iS,{borderProps:p,url:n,width:r,height:o,clientWidth:i,naturalHeight:l,naturalWidth:a}),(0,u.createElement)(Ur,null,(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(aS,null),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(uS,{toggleProps:e}))),(0,u.createElement)(dS,null)),(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(fS,null))))}const yS=[25,50,75,100],gS=()=>{};function hS(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:r,imageSizeOptions:o=[],isResizable:i=!0,slug:l,width:a,height:s,onChange:c,onChangeImage:p=gS}=e;const{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:y}=function(e,t,n,r,o){var i,l;const[a,s]=(0,u.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[c,p]=(0,u.useState)(null!==(l=null!=e?e:n)&&void 0!==l?l:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==r&&s(r),void 0===e&&void 0!==n&&p(n)}),[r,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&p(e)}),[t,e]),{currentHeight:c,currentWidth:a,updateDimension:(e,t)=>{"width"===e?s(t):p(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{p(null!=e?e:n),s(null!=t?t:r),o({height:e,width:t})}}}(s,a,r,n,c);return(0,u.createElement)(u.Fragment,null,o&&o.length>0&&(0,u.createElement)(g.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Image size"),value:l,options:o,onChange:p,help:t}),i&&(0,u.createElement)("div",{className:"block-editor-image-size-control"},(0,u.createElement)("p",{className:"block-editor-image-size-control__row"},(0,_.__)("Image dimensions")),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,_.__)("Width"),value:f,min:1,onChange:e=>m("width",e)}),(0,u.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,_.__)("Height"),value:d,min:1,onChange:e=>m("height",e)})),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(g.ButtonGroup,{"aria-label":(0,_.__)("Image size presets")},yS.map((e=>{const t=Math.round(n*(e/100)),o=Math.round(r*(e/100)),i=f===t&&d===o;return(0,u.createElement)(g.Button,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>y(o,t)},e,"%")}))),(0,u.createElement)(g.Button,{isSmall:!0,onClick:()=>y()},(0,_.__)("Reset")))))}var vS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,u.createElement)(V.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"}));const bS=()=>{};var _S=e=>{let{value:t,onChange:n=bS,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,u.createElement)(g.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,u.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Currently selected link settings")),i)},kS=n(5425),ES=n.n(kS);function SS(e){return"function"==typeof e}class wS 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,f.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:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ES()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.state.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&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:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);var i,l;if(t=t.trim(),!o&&(t.length<2||!r&&(0,sm.isURL)(t)))return null===(i=this.suggestionsRequest)||void 0===i||null===(l=i.cancel)||void 0===l||l.call(i),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:t,selectedSuggestion:null,loading:!1});this.setState({isUpdatingSuggestions:!0,selectedSuggestion:null,loading:!0});const a=n(t,{isInitialSuggestions:o});a.then((e=>{this.suggestionsRequest===a&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,_.sprintf)((0,_._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,_.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===a&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=a}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:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case Xu.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Xu.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Xu.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Xu.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case Xu.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Xu.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,_.__)("Link selected.")));break;case Xu.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:i=!1}=e,{showSuggestions:l}=t,a=l;const s=n&&n.length;return i||s||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,u.createElement)(u.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:r,instanceId:o,placeholder:i=(0,_.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:a=""}=this.props,{loading:s,showSuggestions:p,selectedSuggestion:f,suggestionsListboxId:m,suggestionOptionIdPrefix:y}=this.state,h=`url-input-control-${o}`,v={id:h,label:t,className:d()("block-editor-url-input",n,{"is-full-width":r})},b={id:h,value:a,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,_.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":null!==f?`${y}-${f}`:void 0,ref:this.inputRef};return l?l(v,b,s):(e||$()("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)(g.BaseControl,c({__nextHasNoMarginBottom:e},v),(0,u.createElement)("input",b),s&&(0,u.createElement)(g.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:r,suggestionsValue:o,selectedSuggestion:i,suggestionsListboxId:l,suggestionOptionIdPrefix:a,loading:s}=this.state;if(!n||0===r.length)return null;const p={id:l,ref:this.autocompleteRef,role:"listbox"},f=(e,t)=>({role:"option",tabIndex:"-1",id:`${a}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i});return SS(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:p,buildSuggestionItemProps:f,isLoading:s,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!(null!=o&&o.length),currentInputValue:o}):(0,u.createElement)(g.Popover,{placement:"bottom",focusOnMount:!1},(0,u.createElement)("div",c({},p,{className:d()("block-editor-url-input__suggestions",`${e}__suggestions`)}),r.map(((e,t)=>(0,u.createElement)(g.Button,c({},f(0,t),{key:e.id,className:d()("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)}),e.title)))))}}var CS=(0,f.compose)(f.withSafeTimeout,g.withSpokenMessages,f.withInstanceId,(0,m.withSelect)(((e,t)=>{if(SS(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(xr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wS);var IS=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:l}=e;return n?(t=l?"function"==typeof l?l(n):l:(0,u.createInterpolateElement)((0,_.sprintf)((0,_.__)("Create: %s"),n),{mark:(0,u.createElement)("mark",null)}),(0,u.createElement)(g.Button,c({},o,{className:d()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,u.createElement)(Xi,{className:"block-editor-link-control__search-item-icon",icon:pp}),(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 AS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.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 xS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 BS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.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 PS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.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 TS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 OS={post:AS,page:_k,post_tag:xS,category:BS,attachment:PS};function NS(e){let{isURL:t,suggestion:n}=e,r=null;return t?r=TS:n.type in OS&&(r=OS[n.type]),r?(0,u.createElement)(Xi,{className:"block-editor-link-control__search-item-icon",icon:r}):null}var MS=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:l="",shouldShowType:a=!1}=e;return(0,u.createElement)(g.Button,c({},t,{onClick:o,className:d()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),(0,u.createElement)(NS,{suggestion:n,isURL:i}),(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)(g.TextHighlight,{text:n.title,highlight:l})),(0,u.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(n.url))||""),i&&(0,_.__)("Press ENTER to add this link"))),a&&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 RS="__CREATE__",FS="mailto",LS="internal",DS=["URL",FS,"tel",LS],US=[{id:"opensInNewTab",title:(0,_.__)("Open in new tab")}];function jS(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:l,suggestions:a,selectedSuggestion:s,isLoading:p,isInitialSuggestions:f,createSuggestionButtonText:m,suggestionsQuery:y}=e;const h=d()("block-editor-link-control__search-results",{"is-loading":p}),v=1===a.length&&DS.includes(a[0].type),b=n&&!v&&!f,k=!(null!=y&&y.type),E=`block-editor-link-control-search-results-label-${t}`,S=f?(0,_.__)("Recently updated"):(0,_.sprintf)((0,_.__)('Search results for "%s"'),r),w=(0,u.createElement)(f?u.Fragment:g.VisuallyHidden,{},(0,u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},S));return(0,u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,u.createElement)("div",c({},i,{className:h,"aria-labelledby":E}),a.map(((e,t)=>b&&RS===e.type?(0,u.createElement)(IS,{searchTerm:r,buttonText:m,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===s}):RS===e.type?null:(0,u.createElement)(MS,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===s,isURL:DS.includes(e.type),searchTerm:r,shouldShowType:k,isFrontPage:null==e?void 0:e.isFrontPage})))))}function zS(e){const t=null==e?void 0:e.startsWith("#");return(0,sm.isURL)(e)||e&&e.includes("www.")||t}const VS=()=>Promise.resolve([]),GS=e=>{let t="URL";const n=(0,sm.getProtocol)(e)||"";return n.includes("mailto")&&(t=FS),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=LS),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,sm.prependHTTP)(e):e,type:t}])};function HS(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:i}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?GS:VS;return(0,u.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return zS(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i,l)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===l?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&i&&!a?c[0].concat(c[1]):c[0],a||zS(e)||!o?c:c.concat({title:e,url:e,type:RS})})(t,{...e,isInitialSuggestions:s},o,l,n,r,i)}),[l,o,n])}const WS=()=>Promise.resolve([]),$S=()=>{},KS=(0,u.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:l=null,withCreateSuggestion:a=!1,onCreateSuggestion:s=$S,onChange:c=$S,onSelect:p=$S,showSuggestions:m=!0,renderSuggestions:y=(e=>(0,u.createElement)(jS,e)),fetchSuggestions:g=null,allowDirectEntry:h=!0,showInitialSuggestions:v=!1,suggestionsQuery:b={},withURLSuggestion:k=!0,createSuggestionButtonText:E,useLabel:S=!1}=e;const w=HS(b,h,a,k),C=m?g||w:WS,I=(0,f.useInstanceId)(KS),[A,x]=(0,u.useState)(),B=async e=>{let t=e;if(RS!==e.type){if(h||t&&Object.keys(t).length>=1){const{id:e,url:n,...r}=null!=o?o:{};p({...r,...t},t)}}else try{var n;t=await s(e.title),null!==(n=t)&&void 0!==n&&n.url&&p(t)}catch(e){}},P=d()(i,{"has-no-label":!S});return(0,u.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,label:S?"URL":void 0,className:P,value:n,onChange:(e,t)=>{c(e),x(t)},placeholder:null!=l?l:(0,_.__)("Search or type url"),__experimentalRenderSuggestions:m?e=>y({...e,instanceId:I,withCreateSuggestion:a,createSuggestionButtonText:E,suggestionsQuery:b,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),B(t)}}):null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:(e,t)=>{var r;const o=e||A;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?B(o||{url:n}):t.preventDefault()},ref:t}),r)}));var qS=KS;var JS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 YS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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:QS,Fill:ZS}=(0,g.createSlotFill)("BlockEditorLinkControlViewer");function XS(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 ew=function(e){const[t,n]=(0,u.useReducer)(XS,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function tw(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:i=!1,onRemove:l}=e;const a=o?null==n?void 0:n.url:null,{richData:s,isFetching:c}=ew(a),p=s&&Object.keys(s).length,f=n&&(0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(n.url),16)||"",m=(null==s?void 0:s.title)||(null==n?void 0:n.title)||f,y=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let h;return h=null!=s&&s.icon?(0,u.createElement)("img",{src:null==s?void 0:s.icon,alt:""}):y?(0,u.createElement)(Xi,{icon:JS,size:32}):(0,u.createElement)(Xi,{icon:TS}),(0,u.createElement)("div",{"aria-label":(0,_.__)("Currently selected"),className:d()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":p,"is-fetching":!!c,"is-preview":!0,"is-error":y})},(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:d()("block-editor-link-control__search-item-icon",{"is-image":null==s?void 0:s.icon})},h),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-details"},y?(0,u.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,_.__)("Link is empty")):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Ml.__unstableStripHTML)(m)),(null==n?void 0:n.url)&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,u.createElement)(g.Button,{icon:YS,label:(0,_.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),i&&(0,u.createElement)(g.Button,{icon:So,label:(0,_.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,u.createElement)(QS,{fillProps:n})),!!(p&&(null!=s&&s.image||null!=s&&s.description)||c)&&(0,u.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==s?void 0:s.image)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.image),className:d()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=s&&s.image)})},(null==s?void 0:s.image)&&(0,u.createElement)("img",{src:null==s?void 0:s.image,alt:""})),((null==s?void 0:s.description)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.description),className:d()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=s&&s.description)})},(null==s?void 0:s.description)&&(0,u.createElement)(g.__experimentalText,{truncate:!0,numberOfLines:"2"},s.description))))}const nw=e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};function rw(e){const[t,n]=(0,u.useState)(e||"");return(0,u.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const ow=()=>{};function iw(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:l=US,onChange:a=ow,onRemove:s,noDirectEntry:c=!1,showSuggestions:p=!0,showInitialSuggestions:f,forceIsEditingLink:m,createSuggestion:y,withCreateSuggestion:h,inputValue:v="",suggestionsQuery:b={},noURLSuggestion:k=!1,createSuggestionButtonText:E,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:C=null}=e;void 0===h&&y&&(h=!0);const I=(0,u.useRef)(!0),A=(0,u.useRef)(),x=(0,u.useRef)(),B=(0,u.useRef)(!1),[P,T]=rw((null==i?void 0:i.url)||""),[O,N]=rw((null==i?void 0:i.title)||""),[M,R]=(0,u.useState)(void 0!==m?m:!i||!i.url),{createPage:F,isCreatingPage:L,errorMessage:D}=function(e){const t=(0,u.useRef)(),[n,r]=(0,u.useState)(!1),[o,i]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=nw(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,_.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(y);(0,u.useEffect)((()=>{void 0!==m&&m!==M&&R(m)}),[m]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=x&&x.current?1:0;(Ml.focus.focusable.find(A.current)[e]||A.current).focus(),B.current=!1}),[M,L]);const U=()=>{var e;B.current=!(null===(e=A.current)||void 0===e||!e.contains(A.current.ownerDocument.activeElement)),R(!1)},j=()=>{z===(null==i?void 0:i.url)&&O===(null==i?void 0:i.title)||a({...i,url:z,title:O}),U()},z=v||P,V=!(null!=z&&null!==(t=z.trim())&&void 0!==t&&t.length),G=s&&i&&!M&&!L,H=!(null==l||!l.length),W=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,u.createElement)("div",{tabIndex:-1,ref:A,className:"block-editor-link-control"},L&&(0,u.createElement)("div",{className:"block-editor-link-control__loading"},(0,u.createElement)(g.Spinner,null)," ",(0,_.__)("Creating"),"…"),(M||!i)&&!L&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:d()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":W})},W&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:O,onChange:N,onKeyDown:e=>{const{keyCode:t}=e;t!==Xu.ENTER||V||(e.preventDefault(),j())}}),(0,u.createElement)(qS,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:z,withCreateSuggestion:h,onCreateSuggestion:F,onChange:T,onSelect:e=>{a({...e,title:O||(null==e?void 0:e.title)}),U()},showInitialSuggestions:f,allowDirectEntry:!c,showSuggestions:p,suggestionsQuery:b,withURLSuggestion:!k,createSuggestionButtonText:E,useLabel:W},(0,u.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,u.createElement)(g.Button,{onClick:j,label:(0,_.__)("Submit"),icon:vS,className:"block-editor-link-control__search-submit",disabled:V})))),D&&(0,u.createElement)(g.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},D)),i&&!M&&!L&&(0,u.createElement)(tw,{key:null==i?void 0:i.url,value:i,onEditClick:()=>R(!0),hasRichPreviews:S,hasUnlinkControl:G,onRemove:s}),H&&(0,u.createElement)("div",{className:"block-editor-link-control__tools"},(0,u.createElement)(_S,{value:i,settings:l,onChange:a})),C&&C())}iw.ViewerFill=ZS;var lw=iw;var aw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 sw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 cw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 uw=()=>{};let pw=0;var dw=(0,f.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(bf.store);return{createNotice:t,removeNotice:n}})),(0,g.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:i,onError:l,onSelect:a,onSelectURL:s,onToggleFeaturedImage:c,useFeaturedImage:p,onFilesUpload:d=uw,name:f=(0,_.__)("Replace"),createNotice:y,removeNotice:h,children:v,multiple:b=!1,addToGallery:k,handleUpload:E=!0}=e;const S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useRef)(),C="block-editor/media-replace-flow/error-notice/"+ ++pw,I=e=>{const t=(0,Ml.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{y("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},A=(e,t)=>{p&&c&&c(),t(),a(e),(0,dn.speak)((0,_.__)("The media file has been replaced")),h(C)},x=e=>{e.keyCode===Xu.DOWN&&(e.preventDefault(),e.target.click())},B=b&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar"},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,u.createElement)(g.ToolbarButton,{ref:w,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},f)},renderContent:e=>{let{onClose:l}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Am,{gallery:B,addToGallery:k,multiple:b,value:b?r:n,onSelect:e=>A(e,l),allowedTypes:o,render:e=>{let{open:t}=e;return(0,u.createElement)(g.MenuItem,{icon:aw,onClick:t},(0,_.__)("Open Media Library"))}}),(0,u.createElement)(Im,null,(0,u.createElement)(g.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),a(n);d(n),S({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;A(n,t)},onError:I})})(e,l)},accept:i,multiple:b,render:e=>{let{openFileDialog:t}=e;return(0,u.createElement)(g.MenuItem,{icon:sw,onClick:()=>{t()}},(0,_.__)("Upload"))}}))),c&&(0,u.createElement)(g.MenuItem,{icon:cw,onClick:c,isPressed:p},(0,_.__)("Use featured image")),v),s&&(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,_.__)("Current media URL:")),(0,u.createElement)(g.Tooltip,{text:t,position:"bottom"},(0,u.createElement)("div",null,(0,u.createElement)(lw,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;s(t),w.current.focus()}})))))}})}));function fw(e){let{url:t,urlLabel:n,className:r}=e;const o=d()(r,"block-editor-url-popover__link-viewer-url");return t?(0,u.createElement)(g.ExternalLink,{className:o,href:t},n||(0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(t))):(0,u.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:mw}=Ir(g.privateApis);function yw(e){let t,{additionalControls:n,children:r,renderSettings:o,placement:i,focusOnMount:l="firstElement",position:a,...s}=e;void 0!==a&&$()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==i?t=i:void 0!==a&&(t=mw(a)),t=t||"bottom";const[p,d]=(0,u.useState)(!1),f=!!o&&p;return(0,u.createElement)(g.Popover,c({className:"block-editor-url-popover",focusOnMount:l,placement:t,shift:!0},s),(0,u.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,u.createElement)("div",{className:"block-editor-url-popover__row"},r,!!o&&(0,u.createElement)(g.Button,{className:"block-editor-url-popover__settings-toggle",icon:fy,label:(0,_.__)("Link settings"),onClick:()=>{d(!p)},"aria-expanded":p})),f&&(0,u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),n&&!f&&(0,u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},n))}yw.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,u.createElement)("form",c({className:d()("block-editor-url-popover__link-editor",n)},i),(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,value:o,onChange:r,autocompleteRef:t}),(0,u.createElement)(g.Button,{icon:vS,label:(0,_.__)("Apply"),type:"submit"}))},yw.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...l}=e;return(0,u.createElement)("div",c({className:d()("block-editor-url-popover__link-viewer",t)},l),(0,u.createElement)(fw,{url:o,urlLabel:i,className:n}),r&&(0,u.createElement)(g.Button,{icon:YS,label:(0,_.__)("Edit"),onClick:r}))};var gw=yw;const hw=()=>{},vw=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,u.createElement)(gw,{onClose:o},(0,u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,_.__)("URL"),placeholder:(0,_.__)("Paste or type URL"),onChange:n,value:t}),(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:vS,label:(0,_.__)("Apply"),type:"submit"})))};var bw=(0,g.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:l,notices:a,isAppender:s,accept:c,addToGallery:p,multiple:f=!1,handleUpload:y=!0,disableDropZone:h,disableMediaButtons:v,onError:b,onSelect:k,onCancel:E,onSelectURL:S,onToggleFeaturedImage:w,onDoubleClick:C,onFilesPreUpload:I=hw,onHTMLDrop:A=hw,children:x,mediaLibraryButton:B,placeholder:P,style:T}=e;const O=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().mediaUpload}),[]),[N,M]=(0,u.useState)(""),[R,F]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var e;M(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const L=e=>{M(e.target.value)},D=()=>{F(!0)},U=()=>{F(!1)},j=e=>{e.preventDefault(),N&&S&&(S(N),U())},z=e=>{if(!y)return k(e);let r;if(I(e),f)if(p){let e=[];r=n=>{const r=(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)}))));k(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=k;else r=e=>{let[t]=e;return k(t)};O({allowedTypes:n,filesList:e,onFileChange:r,onError:b})},V=e=>{z(e.target.files)},G=null!=P?P:e=>{let{instructions:t,title:c}=i;if(O||S||(t=(0,_.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,l=o&&"image"===r,a=o&&"video"===r;void 0===t&&O&&(t=(0,_.__)("Upload a media file or pick one from your media library."),i?t=(0,_.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?t=(0,_.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,_.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=(0,_.__)("Media"),i?c=(0,_.__)("Audio"):l?c=(0,_.__)("Image"):a&&(c=(0,_.__)("Video")))}const p=d()("block-editor-media-placeholder",r,{"is-appender":s});return(0,u.createElement)(g.Placeholder,{icon:o,label:c,instructions:t,className:p,notices:a,onDoubleClick:C,preview:l,style:T},e,x)},H=()=>h?null:(0,u.createElement)(g.DropZone,{onFilesDrop:z,onHTMLDrop:A}),W=()=>E&&(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,_.__)("Cancel"),variant:"link",onClick:E},(0,_.__)("Cancel")),$=()=>S&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:D,isPressed:R,variant:"tertiary"},(0,_.__)("Insert from URL")),R&&(0,u.createElement)(vw,{src:N,onChange:L,onSubmit:j,onClose:U})),K=()=>w&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,_.__)("Use featured image")));return v?(0,u.createElement)(Im,null,H()):(0,u.createElement)(Im,{fallback:G($())},(()=>{const e=null!=B?B:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{variant:"tertiary",onClick:()=>{t()}},(0,_.__)("Media Library"))},r=(0,u.createElement)(Am,{addToGallery:p,gallery:f&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:f,onSelect:k,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(O&&s)return(0,u.createElement)(u.Fragment,null,H(),(0,u.createElement)(g.FormFileUpload,{onChange:V,accept:c,multiple:f,render:e=>{let{openFileDialog:t}=e;const n=(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,_.__)("Upload")),r,$(),K(),W());return G(n)}}));if(O){const e=(0,u.createElement)(u.Fragment,null,H(),(0,u.createElement)(g.FormFileUpload,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:c,multiple:f},(0,_.__)("Upload")),r,$(),K(),W());return G(e)}return G(r)})())}));var _w=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,u.createElement)(RE,c({settings:r,gradients:[],disableCustomGradients:!0},n))};const kw={position:"bottom right",variant:"toolbar"};var Ew=()=>(0,u.createElement)(u.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,u.createElement)(g.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,u.createElement)(g.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)(g.ToolbarItem,null,(n=>(0,u.createElement)(g.DropdownMenu,{icon:fy,label:(0,_.__)("More"),toggleProps:{...n,className:d()(n.className,{"is-pressed":t}),describedBy:(0,_.__)("Displays more block tools")},controls:J(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:kw})))})));function Sw(e){let{value:t,editableContentElement:n,activeFormats:r}=e;const o=r[r.length-1],i=null==o?void 0:o.type,l=(0,m.useSelect)((e=>e(H.store).getFormatType(i)),[i]),a=(0,H.useAnchor)({editableContentElement:n,value:t,settings:l});return(0,u.createElement)(ww,{popoverAnchor:a})}function ww(e){let{popoverAnchor:t}=e;return(0,u.createElement)(g.Popover,{placement:"top",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,u.createElement)(Cy,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,_.__)("Format tools")},(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(Ew,null))))}var Cw=e=>{let{inline:t,editableContentElement:n,value:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings().hasInlineToolbar),[]);if(t)return(0,u.createElement)(ww,{popoverAnchor:n});if(o){const e=(0,H.getActiveFormats)(r);return(0,H.isCollapsed)(r)&&!e.length?null:(0,u.createElement)(Sw,{editableContentElement:n,value:r,activeFormats:e})}return(0,u.createElement)(Ur,{group:"inline"},(0,u.createElement)(Ew,null))};function Iw(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{function r(n){const{keyCode:r}=n;if(n.defaultPrevented)return;if(r!==Xu.DELETE&&r!==Xu.BACKSPACE&&r!==Xu.ESCAPE)return;const{__experimentalUndo:o}=t();o&&e()&&(n.preventDefault(),o())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}var Aw=window.wp.shortcode;function xw(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function Bw(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Pw(e){let{allowedFormats:t,disableFormats:n}=e;return n?Pw.EMPTY_ARRAY:t}Pw.EMPTY_ARRAY=[];function Tw(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:l}=e;if(!r||!o)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[p,d]=(0,H.split)(c),f=n.length>0;let m=-1;const y=(0,H.isEmpty)(p)&&!(0,H.isEmpty)(d);f&&(0,H.isEmpty)(p)||(u.push(o((0,H.toHTMLString)({value:p,multilineTag:l}),!y)),m+=1),f?(u.push(...n),m+=n.length):i&&u.push(i()),(f||i)&&(0,H.isEmpty)(d)||u.push(o((0,H.toHTMLString)({value:d,multilineTag:l}),y));r(u,f?m:1,f?-1:0)}function Ow(e,t){return t?(0,H.replace)(e,/\n+/g,H.__UNSTABLE_LINE_SEPARATOR):(0,H.replace)(e,new RegExp(H.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function Nw(e){const t=(0,u.useRef)(e);return t.current=e,(0,f.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:i,formatTypes:l,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:p,__unstableEmbedURLOnPaste:d,multilineTag:f,preserveWhiteSpace:m,pastePlainText:y}=t.current;if(!n)return;const{clipboardData:g}=e;let h="",v="";try{h=g.getData("text/plain"),v=g.getData("text/html")}catch(e){try{v=g.getData("Text")}catch(e){return}}if(v=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const r="\x3c!--EndFragment--\x3e",o=e.indexOf(r);o>-1&&(e=e.substring(0,o));return e}(v),v=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",h),r)return void o((0,H.insert)(i,h));const b=l.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:v,plainText:h})),e}),i);if(b!==i)return void o(b);const _=[...(0,Ml.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,H.create)({html:v,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:m});return t=Ow(t,!!f),xw(t,i.activeFormats),void o((0,H.insert)(i,t))}if(y)return void o((0,H.insert)(i,(0,H.create)({text:h})));if(null!=_&&_.length&&window.console.log("Received items:\n\n",_),null!=_&&_.length&&!ig(_,v)){const e=(0,a.getBlockTransforms)("from"),t=_.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,H.isEmpty)(i)?c(t):Tw({value:i,pastedBlocks:t,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}let k=c&&u?"AUTO":"INLINE";var E;"AUTO"===k&&(0,H.isEmpty)(i)&&(E=h,(0,Aw.regexp)(".*").test(E))&&(k="BLOCKS"),d&&(0,H.isEmpty)(i)&&(0,sm.isURL)(h.trim())&&(k="BLOCKS");const S=(0,a.pasteHandler)({HTML:v,plainText:h,mode:k,tagName:s,preserveWhiteSpace:m});if("string"==typeof S){let e=(0,H.create)({html:S});e=Ow(e,!!f),xw(e,i.activeFormats),o((0,H.insert)(i,e))}else S.length>0&&(c&&(0,H.isEmpty)(i)?c(S,S.length-1,-1):Tw({value:i,pastedBlocks:S,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const Mw=["`",'"',"'","“”","‘’"];function Rw(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(xr),r=(0,u.useRef)(e);return r.current=e,(0,f.useRefEffect)((e=>{function o(o){const{inputType:i,data:l}=o,{value:a,onChange:c}=r.current;if("insertText"!==i)return;if((0,H.isCollapsed)(a))return;const u=(0,s.applyFilters)("blockEditor.wrapSelectionSettings",Mw).find((e=>{let[t,n]=e;return t===l||n===l}));if(!u)return;const[p,d=p]=u,f=a.start,m=a.end+p.length;let y=(0,H.insert)(a,p,f,f);y=(0,H.insert)(y,d,m,m),t(),c(y),n();const g={};for(const e in o)g[e]=o[e];g.data=d;const{ownerDocument:h}=e,{defaultView:v}=h,b=new v.InputEvent("input",g);window.queueMicrotask((()=>{o.target.dispatchEvent(b)})),o.preventDefault()}return e.addEventListener("beforeinput",o),()=>{e.removeEventListener("beforeinput",o)}}),[])}function Fw(e){let t=e.length;for(;t--;){const n=mn(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(fn,""),e[t].clientId;const r=Fw(e[t].innerBlocks);if(r)return r}}function Lw(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(xr),r=(0,u.useRef)(e);return r.current=e,(0,f.useRefEffect)((e=>{function o(){const{getValue:e,onReplace:t,selectionChange:o}=r.current;if(!t)return;const i=e(),{start:l,text:s}=i;if(" "!==s.slice(l-1,l))return;const c=s.slice(0,l).trim(),u=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),p=(0,a.findTransform)(u,(e=>{let{prefix:t}=e;return c===t}));if(!p)return;const d=(0,H.toHTMLString)({value:(0,H.insert)(i,fn,0,l)}),f=p.transform(d);o(Fw([f])),t([f]),n()}function i(e){const{inputType:i,type:l}=e,{getValue:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==i&&"compositionend"!==l)return;c&&o&&o();const p=a(),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:r}=e;return n{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function Dw(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(xr),n=(0,u.useRef)(e);return n.current=e,(0,f.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Xu.ENTER)return;const{removeEditorOnlyFormats:r,value:o,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:p,onSplitAtEnd:d}=n.current;e.preventDefault();const f={...o};f.formats=r(o);const m=i&&l;if(i){const e=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,a.findTransform)(e,(e=>e.regExp.test(f.text)));n&&(i([n.transform({content:f.text})]),t())}if(c)e.shiftKey?p||u((0,H.insert)(f,"\n")):m&&(0,H.__unstableIsEmptyLine)(f)?Tw({value:f,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c}):u((0,H.__unstableInsertLineSeparator)(f));else{const{text:t,start:n,end:r}=f,o=d&&n===r&&r===t.length;e.shiftKey||!m&&!o?p||u((0,H.insert)(f,"\n")):!m&&o?d():m&&Tw({value:f,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Uw(e){return e(H.store).getFormatTypes()}const jw=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function zw(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;return[`${t}.${n}`,r]})))}function Vw(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,r)=>(n[r.slice(t.length+1)]=e[r],n)),{})}function Gw(e){return(0,f.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Hw(e){return(0,f.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function Ww(){const{__unstableMarkLastChangeAsPersistent:e}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function $w(){const{isMultiSelecting:e}=(0,m.useSelect)(xr);return(0,f.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 Kw(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:l}=e;if(!l)return null;const a=(0,H.getActiveFormat)(o,t);let s=void 0!==a;const c=(0,H.getActiveObject)(o),p=void 0!==c&&c.type===t;if("core/link"===t&&!(0,H.isCollapsed)(o)){var d,f;const e=o.formats,t=null===(d=e[o.start])||void 0===d?void 0:d.find((e=>{let{type:t}=e;return"core/link"===t})),n=null===(f=e[o.end-1])||void 0===f?void 0:f.find((e=>{let{type:t}=e;return"core/link"===t}));t&&n&&t===n||(s=!1)}return(0,u.createElement)(l,{key:t,isActive:s,activeAttributes:s&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&c.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const qw=(0,u.createContext)(),Jw=(0,u.createContext)();const Yw=(0,u.forwardRef)((function e(t,n){let{children:r,tagName:o="div",value:i="",onChange:l,isSelected:s,multiline:p,inlineToolbar:y,wrapperClassName:h,autocompleters:v,onReplace:b,placeholder:_,allowedFormats:k,withoutInteractiveFormatting:E,onRemove:S,onMerge:w,onSplit:C,__unstableOnSplitAtEnd:I,__unstableOnSplitMiddle:A,identifier:x,preserveWhiteSpace:B,__unstablePastePlainText:P,__unstableEmbedURLOnPaste:T,__unstableDisableFormats:O,disableLineBreaks:N,unstableOnFocus:M,__unstableAllowPrefixTransformations:R,...F}=t;p&&$()("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 L=(0,f.useInstanceId)(e);x=x||L,F=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:r,textAlign:o,selectionColor:i,tagsToEliminate:l,rootTagsToEliminate:a,disableEditingMenu:s,fontSize:c,fontFamily:u,fontWeight:p,fontStyle:d,minWidth:f,maxWidth:m,setRef:y,disableSuggestions:g,disableAutocorrection:h,...v}=e;return v}(F);const D=(0,u.useRef)(),{clientId:U}=Nr(),{selectionStart:j,selectionEnd:z,isSelected:V}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(xr),r=t(),o=n();let i;return void 0===s?i=r.clientId===U&&o.clientId===U&&r.attributeKey===x:s&&(i=r.clientId===U),{selectionStart:i?r.offset:void 0,selectionEnd:i?o.offset:void 0,isSelected:i}})),{getSelectionStart:G,getSelectionEnd:W,getBlockRootClientId:K}=(0,m.useSelect)(xr),{selectionChange:q}=(0,m.useDispatch)(xr),J=Bw(p),Y=Pw({allowedFormats:k,disableFormats:O}),Q=!Y||Y.length>0;let Z=i,X=l;Array.isArray(i)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Z=a.children.toHTML(i),X=e=>l(a.children.fromDOM((0,H.__unstableCreateElement)(document,e).childNodes)));const ee=(0,u.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;if("number"==typeof e||r){if(void 0===t&&K(U)!==K(W().clientId))return;n.start={clientId:U,attributeKey:x,offset:e}}if("number"==typeof t||r){if(void 0===e&&K(U)!==K(G().clientId))return;n.end={clientId:U,attributeKey:x,offset:t}}q(n)}),[U,x]),{formatTypes:te,prepareHandlers:ne,valueHandlers:re,changeHandlers:oe,dependencies:ie}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,m.useSelect)(Uw,[]),l=(0,u.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&jw.has(n))}))),[i,o,jw]),a=(0,m.useSelect)((e=>l.reduce(((r,o)=>o.__experimentalGetPropsForEditableTreePreparation?{...r,...zw(o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),o.name)}:r),{})),[l,t,n]),s=(0,m.useDispatch)(),c=[],p=[],d=[],f=[];for(const e in a)f.push(a[e]);return l.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=e.__experimentalCreatePrepareEditableTree(Vw(a,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?p.push(r):c.push(r)}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:n,blockClientId:t}));const o=Vw(a,e.name);d.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof o?o:{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:l,prepareHandlers:c,valueHandlers:p,changeHandlers:d,dependencies:f}}({clientId:U,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Y});function le(e){return te.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,H.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:ae,getValue:se,onChange:ce,ref:ue}=(0,H.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;X(e),Object.values(oe).forEach((e=>{e(n,r)}))},selectionStart:j,selectionEnd:z,onSelectionChange:ee,placeholder:_,__unstableIsSelected:V,__unstableMultilineTag:J,__unstableDisableFormats:O,preserveWhiteSpace:B,__unstableDependencies:[...ie,o],__unstableAfterParse:function(e){return re.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:le,__unstableAddInvisibleFormats:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)}}),pe=function(e){return(0,g.__unstableUseAutocompleteProps)({...e,completers:wk(e)})}({onReplace:b,completers:v,record:ae,onChange:ce});!function(e){let{html:t,value:n}=e;const r=(0,u.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,m.useDispatch)(xr);(0,u.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{i()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}i()}else r.current=n.text}),[t,o])}({html:Z,value:ae});const de=(0,u.useRef)(new Set),fe=(0,u.useRef)(new Set);function me(){var e;null===(e=D.current)||void 0===e||e.focus()}const ye=o;return(0,u.createElement)(u.Fragment,null,V&&(0,u.createElement)(qw.Provider,{value:de},(0,u.createElement)(Jw.Provider,{value:fe},(0,u.createElement)(g.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:ae,onChange:ce,onFocus:me}),(0,u.createElement)(Kw,{value:ae,onChange:ce,onFocus:me,formatTypes:te,forwardedRef:D})))),V&&Q&&(0,u.createElement)(Cw,{inline:y,editableContentElement:D.current,value:ae}),(0,u.createElement)(ye,c({role:"textbox","aria-multiline":!N,"aria-label":_},F,pe,{ref:(0,f.useMergeRefs)([n,pe.ref,F.ref,ue,Rw({value:ae,onChange:ce}),Lw({getValue:se,onChange:ce,__unstableAllowPrefixTransformations:R,formatTypes:te,onReplace:b,selectionChange:q}),Ww(),(0,f.useRefEffect)((e=>{function t(e){(Xu.isKeyboardEvent.primary(e,"z")||Xu.isKeyboardEvent.primary(e,"y")||Xu.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),Gw(de),Hw(fe),Iw(),Nw({isSelected:V,disableFormats:O,onChange:ce,value:ae,formatTypes:te,tagName:o,onReplace:b,onSplit:C,onSplitMiddle:A,__unstableEmbedURLOnPaste:T,multilineTag:J,preserveWhiteSpace:B,pastePlainText:P}),Dw({removeEditorOnlyFormats:le,value:ae,onReplace:b,onSplit:C,onSplitMiddle:A,multilineTag:J,onChange:ce,disableLineBreaks:N,onSplitAtEnd:I}),$w(),D]),contentEditable:!0,suppressContentEditableWarning:!0,className:d()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:M,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===Xu.DELETE||t===Xu.BACKSPACE)){const{start:n,end:r,text:o}=ae,i=t===Xu.BACKSPACE,l=ae.activeFormats&&!!ae.activeFormats.length;if(!(0,H.isCollapsed)(ae)||l||i&&0!==n||!i&&r!==o.length)return;w&&w(!i),S&&(0,H.isEmpty)(ae)&&i&&S(!i),e.preventDefault()}}})))}));Yw.Content=e=>{let{value:t,tagName:n,multiline:r,...o}=e;Array.isArray(t)&&($()("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=a.children.toHTML(t));const i=Bw(r);!t&&i&&(t=`<${i}>`);const l=(0,u.createElement)(u.RawHTML,null,t);if(n){const{format:e,...t}=o;return(0,u.createElement)(n,t,l)}return l},Yw.isEmpty=e=>!e||0===e.length;var Qw=Yw;const Zw=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Qw,c({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Zw.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,u.createElement)(n,r,t)};var Xw=Zw;var eC=(0,u.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,u.createElement)(Xw,c({ref:t},r));const{className:o,onChange:i,...l}=r;return(0,u.createElement)(Zl.Z,c({ref:t,className:d()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},l))}));function tC(e){let{property:t,viewport:n,desc:r}=e;const o=(0,f.useInstanceId)(tC),i=r||(0,_.sprintf)((0,_._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-${o}`},n.label),(0,u.createElement)(g.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},i))}var nC=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:i,renderResponsiveControls:l,isResponsive:a=!1,defaultLabel:s={id:"all",label:(0,_.__)("All")},viewports:c=[{id:"small",label:(0,_.__)("Small screens")},{id:"medium",label:(0,_.__)("Medium screens")},{id:"large",label:(0,_.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const p=r||(0,_.sprintf)((0,_.__)("Use the same %s on all screensizes."),n),f=(0,_.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),m=i((0,u.createElement)(tC,{property:n,viewport:s}),s);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)(g.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:o,help:f}),(0,u.createElement)("div",{className:d()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&m,a&&(l?l(c):c.map((e=>(0,u.createElement)(u.Fragment,{key:e.id},i((0,u.createElement)(tC,{property:n,viewport:e}),e))))))))};function rC(e){let{character:t,type:n,onUse:r}=e;const o=(0,u.useContext)(qw),i=(0,u.useRef)();return i.current=r,(0,u.useEffect)((()=>{function e(e){Xu.isKeyboardEvent[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function oC(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,l="RichText.ToolbarControls";return n&&(l+=`.${n}`),r&&o&&(t=Xu.displayShortcut[r](o)),(0,u.createElement)(g.Fill,{name:l},(0,u.createElement)(g.ToolbarButton,c({},i,{shortcut:t})))}function iC(e){let{inputType:t,onInput:n}=e;const r=(0,u.useContext)(Jw),o=(0,u.useRef)();return o.current=n,(0,u.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const lC=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,u.createElement)(g.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 aC=(0,u.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(xr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:r}=(0,m.useDispatch)(xr);return(0,u.createElement)(g.Dropdown,{renderToggle:r=>{let{isOpen:o,onToggle:i}=r;return(0,u.createElement)(g.Button,c({},e,{ref:t,icon:"navigation"===n?lC:YS,"aria-expanded":o,"aria-haspopup":"true",onClick:i,label:(0,_.__)("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.NavigableMenu,{role:"menu","aria-label":(0,_.__)("Tools")},(0,u.createElement)(g.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:r,choices:[{value:"edit",label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{icon:YS}),(0,_.__)("Edit"))},{value:"navigation",label:(0,u.createElement)(u.Fragment,null,lC,(0,_.__)("Select"))}]})),(0,u.createElement)("div",{className:"block-editor-tool-selector__help"},(0,_.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function sC(e){let{units:t,...n}=e;const r=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,u.createElement)(g.__experimentalUnitControl,c({units:r},n))}var cC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class uC 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,r=e?(0,_.__)("Edit link"):(0,_.__)("Insert link");return(0,u.createElement)("div",{className:"block-editor-url-input__button"},(0,u.createElement)(g.Button,{icon:Eo,label:r,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)(g.Button,{className:"block-editor-url-input__back",icon:cC,label:(0,_.__)("Close"),onClick:this.toggle}),(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,u.createElement)(g.Button,{icon:vS,label:(0,_.__)("Submit"),type:"submit"}))))}}var pC=uC;var dC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 fC="none",mC="custom",yC="media",gC="attachment",hC=["noreferrer","noopener"],vC=(0,u.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(g.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,u.createElement)(g.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)(g.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),bC=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:l,linkTarget:a,linkClass:s,rel:c}=e;const[p,d]=(0,u.useState)(!1),[f,m]=(0,u.useState)(null),y=(0,u.useCallback)((()=>{d(!0)})),[h,v]=(0,u.useState)(!1),[b,k]=(0,u.useState)(null),E=(0,u.useRef)(null),S=(0,u.useCallback)((()=>{t!==yC&&t!==gC||k(""),v(!0)})),w=(0,u.useCallback)((()=>{v(!1)})),C=(0,u.useCallback)((()=>{k(null),w(),d(!1)})),I=(0,u.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(d(!1),k(null),w())})),A=(0,u.useCallback)((()=>e=>{if(b){var t;const e=(null===(t=B().find((e=>e.url===b)))||void 0===t?void 0:t.linkDestination)||mC;n({href:b,linkDestination:e})}w(),k(null),e.preventDefault()})),x=(0,u.useCallback)((()=>{n({linkDestination:fC,href:""})})),B=()=>{const e=[{linkDestination:yC,title:(0,_.__)("Media File"),url:"image"===o?i:void 0,icon:vC}];return"image"===o&&l&&e.push({linkDestination:gC,title:(0,_.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,u.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(g.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,u.createElement)(g.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},P=(0,u.createElement)(g.__experimentalVStack,{spacing:"3"},(0,u.createElement)(g.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("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(" ");hC.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===hC.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link CSS Class"),value:s||"",onChange:e=>{n({linkClass:e})}})),T=null!==b?b:r,O=(B().find((e=>e.linkDestination===t))||{}).title;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarButton,{icon:Eo,className:"components-toolbar__control",label:r?(0,_.__)("Edit link"):(0,_.__)("Insert link"),"aria-expanded":p,onClick:y,ref:m}),p&&(0,u.createElement)(gw,{anchor:f,onFocusOutside:I(),onClose:C,renderSettings:()=>P,additionalControls:!T&&(0,u.createElement)(g.NavigableMenu,null,B().map((e=>(0,u.createElement)(g.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{k(null),(e=>{const t=B();let r;r=e?(t.find((t=>t.url===e))||{linkDestination:mC}).linkDestination:fC,n({linkDestination:r,href:e})})(e.url),w()}},e.title))))},(!r||h)&&(0,u.createElement)(gw.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:T,onChangeInputValue:k,onSubmit:A(),autocompleteRef:E}),r&&!h&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(gw.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:S,urlLabel:O}),(0,u.createElement)(g.Button,{icon:dC,label:(0,_.__)("Remove link"),onClick:x}))))};function _C(e){let{children:t,viewLabel:n,className:r,isEnabled:o=!0,deviceType:i,setDeviceType:l}=e;if((0,f.useViewportMatch)("small","<"))return null;const a={className:d()(r,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,children:n},c={"aria-label":(0,_.__)("View options")};return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,menuProps:c,icon:null},(()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===i&&Dy},(0,_.__)("Desktop")),(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===i&&Dy},(0,_.__)("Tablet")),(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===i&&Dy},(0,_.__)("Mobile"))),t)))}function kC(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 r=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:r(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 EC=(0,m.withSelect)((e=>({selectedBlockClientId:e(xr).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Xr(t);return t?(0,u.createElement)(g.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,_.__)("Skip to the selected block")):null})),SC=window.wp.wordcount;var wC=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(xr);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,SC.count)((0,a.serialize)(t),"words");return(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,u.createElement)(hp,{icon:Ny,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,_.sprintf)((0,_._n)("%d block","%d blocks",t.length),t.length)),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,_.sprintf)((0,_._n)("%d word","%d words",n),n))))}));function CC(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:o}=(0,m.useSelect)((e=>{var n,r;const o=e(xr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(a.store).getBlockStyles(t)}}),[t]),i=(0,u.useMemo)((()=>[{label:(0,_.__)("Not set"),value:""},...o.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[o]),l=(0,u.useMemo)((()=>{var e;return null===(e=Vy(o))||void 0===e?void 0:e.name}),[o]),s=(0,u.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==l?r&&(0,u.createElement)("div",{className:"default-style-picker__default-switcher"},(0,u.createElement)(g.SelectControl,{__nextHasNoMarginBottom:!0,options:i,value:n||"",label:(0,_.__)("Default Style"),onChange:s})):null}var IC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 AC=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.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 xC={name:"settings",title:"Settings",value:"settings",icon:IC,className:"block-editor-block-inspector__tab-item"},BC={name:"styles",title:"Styles",value:"styles",icon:AC,className:"block-editor-block-inspector__tab-item"},PC={name:"list",title:"List View",value:"list-view",icon:Fk,className:"block-editor-block-inspector__tab-item"};var TC=()=>{const e=(0,g.__experimentalUseSlotFills)(Ho.slotName);return Boolean(e&&e.length)?(0,u.createElement)(g.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,_.__)("Advanced"),initialOpen:!1},(0,u.createElement)(Wo.Slot,{group:"advanced"})):null};var OC=()=>{const e=(0,g.__experimentalUseSlotFills)(No.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,u.createElement)(g.PanelBody,{className:"block-editor-block-inspector__position",title:(0,_.__)("Position"),initialOpen:!1},(0,u.createElement)(Wo.Slot,{group:"position"})):null},NC=window.wp.preferences;const MC="isInspectorControlsTabsHintVisible";function RC(){const e=(0,m.useSelect)((e=>{var t;return null===(t=e(NC.store).get("core",MC))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,m.useDispatch)(NC.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,_.__)("Looking for other block settings? They've moved to the styles tab.")),(0,u.createElement)(g.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:dC,iconSize:"16",label:(0,_.__)("Dismiss hint"),onClick:()=>{const e=Ml.focus.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",MC,!1)},showTooltip:!1})):null}var FC=e=>{let{showAdvancedControls:t=!1}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(OC,null),t&&(0,u.createElement)("div",null,(0,u.createElement)(TC,null)),(0,u.createElement)(RC,null))};var LC=e=>{let{blockName:t,clientId:n,hasBlockStyles:r}=e;return(0,u.createElement)(u.Fragment,null,r&&(0,u.createElement)("div",null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Styles")},(0,u.createElement)(cE,{clientId:n}),(0,a.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,u.createElement)(CC,{blockName:t}))),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"}))};const DC=["core/navigation"];var UC=e=>!DC.includes(e);function jC(e){let{blockName:t,clientId:n,hasBlockStyles:r,tabs:o}=e;const i=UC(t)?void 0:PC.name;return(0,u.createElement)(g.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:o,initialTabName:i,key:n},(e=>e.name===xC.name?(0,u.createElement)(FC,{showAdvancedControls:!!t}):e.name===BC.name?(0,u.createElement)(LC,{blockName:t,clientId:n,hasBlockStyles:r}):e.name===PC.name?(0,u.createElement)(Wo.Slot,{group:"list"}):void 0))}const zC=[];function VC(e){const t=[],{border:n,color:r,default:o,dimensions:i,list:l,position:a,styles:s,typography:c}=No,u=UC(e),p=(0,g.__experimentalUseSlotFills)(l.Slot.__unstableName),d=!u&&!!p&&p.length,f=[...(0,g.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(i.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,y=(0,g.__experimentalUseSlotFills)(Ho.slotName)||[],h=[...(0,g.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...d&&f>1?y:[]];d&&t.push(PC),h.length&&t.push(xC),f&&t.push(BC);const v=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,m.useSelect)((e=>e(xr).getSettings().blockInspectorTabs),[]));return v?t:zC}function GC(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]),r=(0,u.useCallback)((e=>!!n[e]),[n]);return(0,u.useMemo)((()=>HC([t],r)),[t,r])}function HC(e,t){const n=[];for(const r of e)t(r.name)&&n.push(r),n.push(...HC(r.innerBlocks,t));return n}function WC(e){let{blockTypes:t,block:n,selectedBlock:r}=e;const{selectBlock:o}=(0,m.useDispatch)(xr),i=t.find((e=>{let{name:t}=e;return t===n.name})),l=r&&r.clientId===n.clientId;return(0,u.createElement)(g.Button,{isPressed:l,onClick:()=>o(n.clientId)},(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(hp,{icon:i.icon}),(0,u.createElement)(g.FlexItem,null,i.title)))}function $C(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:r,selectedBlock:o}=(0,m.useSelect)((e=>({blockTypes:e(a.store).getBlockTypes(),block:e(xr).getBlock(t),selectedBlock:e(xr).getSelectedBlock()})),[t]),i=sy(t),l=GC(n,r);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(vp,c({},i,{className:i.isSynced&&"is-synced"})),(0,u.createElement)(wE,{blockClientId:t}),(0,u.createElement)(g.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},(0,_.__)("Content")),l.map((e=>(0,u.createElement)(WC,{selectedBlock:o,key:e.clientId,block:e,blockTypes:n})))))}const KC=e=>{let{animate:t,wrapper:n,children:r}=e;return t?n(r):r},qC=e=>{let{blockInspectorAnimationSettings:t,selectedBlockClientId:n,children:r}=e;const o=t&&"leftToRight"===t.enterDirection?-50:50;return(0,u.createElement)(g.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:n},r)},JC=e=>{let{clientId:t,blockName:n}=e;const r=VC(n),o=(null==r?void 0:r.length)>1,i=(0,m.useSelect)((e=>{const{getBlockStyles:t}=e(a.store),r=t(n);return r&&r.length>0}),[n]),l=sy(t);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(vp,c({},l,{className:l.isSynced&&"is-synced"})),(0,u.createElement)(wE,{blockClientId:t}),o&&(0,u.createElement)(jC,{hasBlockStyles:i,clientId:t,blockName:n,tabs:r}),!o&&(0,u.createElement)(u.Fragment,null,i&&(0,u.createElement)("div",null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Styles")},(0,u.createElement)(cE,{clientId:t}),(0,a.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,u.createElement)(CC,{blockName:n}))),(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"}),(0,u.createElement)(OC,null),(0,u.createElement)("div",null,(0,u.createElement)(TC,null))),(0,u.createElement)(EC,{key:"back"}))};var YC=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:r,selectedBlockClientId:o,blockType:i,topLevelLockedBlock:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r,__unstableGetContentLockingParent:o,getTemplateLock:i}=e(xr),l=t(),s=l&&r(l),c=s&&(0,a.getBlockType)(s);return{count:n(),selectedBlockClientId:l,selectedBlockName:s,blockType:c,topLevelLockedBlock:o(l)||("contentOnly"===i(l)?l:void 0)}}),[]),s=VC(null==i?void 0:i.name),c=(null==s?void 0:s.length)>1,p=function(e,t){return(0,m.useSelect)((t=>{if(e){const n=t(xr).getSettings().blockInspectorAnimation,r=null==n?void 0:n.animationParent,{getSelectedBlockClientId:o,getBlockParentsByBlockName:i}=t(xr);return i(o(),r,!0)[0]||e.name===r?null==n?void 0:n[e.name]:null}return null}),[t,e])}(i,o);if(n>1)return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(wC,null),c?(0,u.createElement)(jC,{tabs:s}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"})));const d=r===(0,a.getUnregisteredTypeHandlerName)();return i&&o&&!d?l?(0,u.createElement)($C,{topLevelLockedBlock:l}):(0,u.createElement)(KC,{animate:p,wrapper:e=>(0,u.createElement)(qC,{blockInspectorAnimationSettings:p,selectedBlockClientId:o},e)},(0,u.createElement)(JC,{clientId:o,blockName:i.name})):t?(0,u.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,_.__)("No block selected.")):null};var QC=function(e){let{__unstableContentRef:t}=e;const[n,r]=(0,u.useState)(!1),o=(0,m.useSelect)((e=>e(xr).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{r(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?o.map(((e,n)=>n===o.length-1?null:(0,u.createElement)(Xm,{key:e,previousClientId:e,nextClientId:o[n+1],__unstableContentRef:t},(0,u.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,u.createElement)(Wm,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function ZC(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:r}=e(xr);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:r()}}function XC(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,f.useViewportMatch)("medium"),{hasFixedToolbar:i,isZoomOutMode:l,isTyping:a}=(0,m.useSelect)(ZC,[]),s=(0,Pp.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:p,getBlockRootClientId:d}=(0,m.useSelect)(xr),{duplicateBlocks:y,removeBlocks:h,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:_,moveBlocksUp:k,moveBlocksDown:E}=(0,m.useDispatch)(xr);const S=qo(n),w=qo(n);return(0,u.createElement)("div",c({},r,{onKeyDown:function(e){if(!e.defaultPrevented)if(s("core/block-editor/move-up",e)){const t=p();if(t.length){e.preventDefault();const n=d(t[0]);k(t,n)}}else if(s("core/block-editor/move-down",e)){const t=p();if(t.length){e.preventDefault();const n=d(t[0]);E(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=p();t.length&&(e.preventDefault(),y(t))}else if(s("core/block-editor/remove",e)){const t=p();t.length&&(e.preventDefault(),h(t))}else if(s("core/block-editor/insert-after",e)){const t=p();t.length&&(e.preventDefault(),v(t[t.length-1]))}else if(s("core/block-editor/insert-before",e)){const t=p();t.length&&(e.preventDefault(),b(t[0]))}else if(s("core/block-editor/unselect",e)){p().length&&(e.preventDefault(),_(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,u.createElement)(ny.Provider,{value:(0,u.useRef)(!1)},!a&&(0,u.createElement)(oy,{__unstableContentRef:n}),!l&&(i||!o)&&(0,u.createElement)(nh,{isFixed:!0}),(0,u.createElement)(wh,{__unstableContentRef:n}),(0,u.createElement)(g.Popover.Slot,{name:"block-toolbar",ref:S}),t,(0,u.createElement)(g.Popover.Slot,{name:"__unstable-block-tools-after",ref:w}),l&&(0,u.createElement)(QC,{__unstableContentRef:n})))}const eI=()=>{};var tI=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:a,__experimentalFilterValue:s,onSelect:c=eI,shouldFocusBlock:p=!1}=e;const{destinationRootClientId:d,prioritizePatterns:f}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:o}=e(xr);return{destinationRootClientId:n||t(r)||void 0,prioritizePatterns:o().__experimentalPreferPatternsOnRoot}}),[r,n]);return(0,u.createElement)(jm,{onSelect:c,rootClientId:d,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l,__experimentalInsertionIndex:a,__experimentalFilterValue:s,shouldFocusBlock:p,prioritizePatterns:f,ref:t})}));function nI(){return null}nI.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(Pp.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,_.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,_.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,_.__)("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,_.__)("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,_.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,_.__)("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,_.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,_.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,_.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,_.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var rI=nI;function oI(){return $()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const iI=new Set([Xu.UP,Xu.RIGHT,Xu.DOWN,Xu.LEFT,Xu.ENTER,Xu.BACKSPACE]);function lI(){const e=(0,m.useSelect)((e=>e(xr).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function l(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",l),()=>{r.removeEventListener("mousemove",l)}}),[e,t])}function aI(){const{isTyping:e,hasInlineToolbar:t}=(0,m.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(xr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:r}=(0,m.useDispatch)(xr),o=lI(),i=(0,f.useRefEffect)((o=>{const{ownerDocument:i}=o,{defaultView:l}=i,a=l.getSelection();if(e){let c;function u(e){const{target:t}=e;c=l.setTimeout((()=>{(0,Ml.isTextField)(t)||r()}))}function p(e){const{keyCode:t}=e;t!==Xu.ESCAPE&&t!==Xu.TAB||r()}function d(){a.isCollapsed||r()}return o.addEventListener("focus",u),o.addEventListener("keydown",p),t||i.addEventListener("selectionchange",d),()=>{l.clearTimeout(c),o.removeEventListener("focus",u),o.removeEventListener("keydown",p),i.removeEventListener("selectionchange",d)}}function s(e){const{type:t,target:r}=e;(0,Ml.isTextField)(r)&&o.contains(r)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&iI.has(t)}(e))&&n()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}}),[e,t,n,r]);return(0,f.useMergeRefs)([o,i])}var sI=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:aI()},t)};const cI=-1!==window.navigator.userAgent.indexOf("Trident"),uI=new Set([Xu.UP,Xu.DOWN,Xu.LEFT,Xu.RIGHT]);function pI(){const e=(0,m.useSelect)((e=>e(xr).hasSelectedBlock()),[]);return(0,f.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,i,l;function a(){o||(o=r.requestAnimationFrame((()=>{d(),o=null})))}function s(e){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame((()=>{c(e),i=null}))}function c(e){let{keyCode:o}=e;if(!f())return;const i=(0,Ml.computeCaretRect)(r);if(!i)return;if(!l)return void(l=i);if(uI.has(o))return void(l=i);const a=i.top-l.top;if(0===a)return;const s=(0,Ml.getScrollContainer)(t);if(!s)return;const c=s===n.body||s===n.documentElement,u=c?r.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?l.top/r.innerHeight:(l.top-p)/(r.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=i);const m=c?r.innerHeight:s.clientHeight;l.top+l.height>p+m||l.top{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),r.cancelAnimationFrame(o),r.cancelAnimationFrame(i)}}),[e])}var dI=cI?e=>e.children:function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:pI(),className:"block-editor__typewriter"},t)};const fI=(0,u.createContext)({});function mI(e){let{children:t,uniqueId:n,blockName:r=""}=e;const o=(0,u.useContext)(fI),{name:i}=Nr();r=r||i;const l=(0,u.useMemo)((()=>function(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}(o,r,n)),[o,r,n]);return(0,u.createElement)(fI.Provider,{value:l},t)}function yI(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,u.useContext)(fI),{name:o}=Nr();return n=n||o,Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e))}var gI=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 hI(e){let{title:t,help:n,actions:r=[],onClose:o}=e;return(0,u.createElement)(g.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,u.createElement)(g.__experimentalHStack,{alignment:"center"},(0,u.createElement)(g.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,u.createElement)(g.__experimentalSpacer,null),r.map((e=>{let{label:t,icon:n,onClick:r}=e;return(0,u.createElement)(g.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:r},!n&&t)})),o&&(0,u.createElement)(g.Button,{className:"block-editor-inspector-popover-header__action",label:(0,_.__)("Close"),icon:gI,onClick:o})),n&&(0,u.createElement)(g.__experimentalText,null,n))}var vI=(0,u.forwardRef)((function(e,t){let{onClose:n,onChange:r,...o}=e;return(0,u.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,u.createElement)(hI,{title:(0,_.__)("Publish"),actions:[{label:(0,_.__)("Now"),onClick:()=>null==r?void 0:r(null)}],onClose:n}),(0,u.createElement)(g.DateTimePicker,c({startOfWeek:(0,xE.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:r},o)))}));const bI={button:"wp-element-button",caption:"wp-element-caption"},_I=e=>bI[e]?bI[e]:"";function kI(e,t){return Object.entries(t).every((t=>{let[n,r]=t;return"object"==typeof r&&"object"==typeof e[n]?kI(e[n],r):e[n]===r}))}const EI=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&kI(e,n)}));return 1===n.length?n[0]:void 0};function SI(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 wI(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>SI(BI(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function CI(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=wI(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return SI(e)}function II(e){for(let t=0;to.height?o.width:o.height)*r,"%":("font"===o.type?o.fontSize:o.width)*r,ch:8,ex:7.15625,lh:o.lineHeight},l={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function BI(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=SI(e);return n.unit||(n=CI(e)),II(e)&&!n.unit?AI(e):xI(n,t)}const PI={};function TI(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 OI=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+TI(t);return PI[n]||(PI[n]=BI(e,t)),PI[n]};function NI(e,t){var n,r;const{size:o}=e;if(!o||"0"===o)return o;if(null==t||!t.fluid||"object"==typeof(null==t?void 0:t.fluid)&&0===Object.keys(t.fluid).length)return o;if(!1===(null==e?void 0:e.fluid))return o;const i="object"==typeof(null==t?void 0:t.fluid)?null==t?void 0:t.fluid:{},l=Fb({minimumFontSize:null==e||null===(n=e.fluid)||void 0===n?void 0:n.min,maximumFontSize:null==e||null===(r=e.fluid)||void 0===r?void 0:r.max,fontSize:o,minimumFontSizeLimit:null==i?void 0:i.minFontSize});return l||o}const MI="body",RI=[{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 NI(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:[]}],FI={"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 LI(e,t,n,r,o){const i=[(0,y.get)(e,["blocks",t,...n]),(0,y.get)(e,n)];for(const l of i)if(l){const i=["custom","theme","default"];for(const a of i){const i=l[a];if(i){const l=i.find((e=>e[r]===o));if(l){if("slug"===r)return l;return LI(e,t,n,"slug",l.slug)[r]===l[r]?l:void 0}}}}}function DI(e,t,n,r){if(!r)return r;const o=FI[n],i=RI.find((e=>e.cssVarInfix===o));if(!i)return r;const{valueKey:l,path:a}=i,s=LI(e,t,a,l,r);return s?`var:preset|${o}|${s.slug}`:r}function UI(e,t,n){if(!n||"string"!=typeof n){var r,o;if(null===(r=n)||void 0===r||!r.ref||"string"!=typeof(null===(o=n)||void 0===o?void 0:o.ref))return n;{var i;const t=n.ref.split(".");if(!(n=(0,y.get)(e,t))||null!==(i=n)&&void 0!==i&&i.ref)return n}}const l="var:",a="var(--wp--";let s;if(n.startsWith(l))s=n.slice(l.length).split("|");else{if(!n.startsWith(a)||!n.endsWith(")"))return n;s=n.slice(a.length,-")".length).split("--")}const[c,...u]=s;return"preset"===c?function(e,t,n,r){let[o,i]=r;const l=RI.find((e=>e.cssVarInfix===o));if(!l)return n;const a=LI(e.settings,t,l.path,"slug",i);if(a){const{valueKey:n}=l;return UI(e,t,a[n])}return n}(e,t,n,u):"custom"===c?function(e,t,n,r){var o;const i=null!==(o=(0,y.get)(e.settings,["blocks",t,"custom",...r]))&&void 0!==o?o:(0,y.get)(e.settings,["custom",...r]);return i?UI(e,t,i):n}(e,t,n,u):n}const jI=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zI={settings:{},styles:{}},VI=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(jI);return[!!e&&!b()(e,zI),(0,u.useCallback)((()=>t((()=>zI))),[t])]};function GI(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:o,base:i,user:l,setUserConfig:a}=(0,u.useContext)(jI),s=t?`settings.blocks.${t}.${e}`:`settings.${e}`,c=e=>{a((t=>{const n=JSON.parse(JSON.stringify(t));return(0,y.set)(n,s,e),n}))},p=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`;let a;switch(r){case"all":a=(0,y.get)(o,n);break;case"user":a=(0,y.get)(l,n);break;case"base":a=(0,y.get)(i,n);break;default:throw"Unsupported source"}return a},d=null!==(n=p(t))&&void 0!==n?n:p();return[d,c]}function HI(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:o,base:i,user:l,setUserConfig:a}=(0,u.useContext)(jI),s=t?`styles.blocks.${t}.${e}`:`styles.${e}`,c=n=>{a((r=>{const i=JSON.parse(JSON.stringify(r));return(0,y.set)(i,s,DI(o.settings,t,e,n)),i}))};let p;switch(r){case"all":p=UI(o,t,"styles.css"===s?(0,y.get)(l,s):null!==(n=(0,y.get)(l,s))&&void 0!==n?n:(0,y.get)(i,s));break;case"user":p=UI(o,t,(0,y.get)(l,s));break;case"base":p=UI(i,t,(0,y.get)(i,s));break;default:throw"Unsupported source"}return[p,c]}const WI={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function $I(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 KI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return RI.reduce(((n,r)=>{let{path:o,cssVarInfix:i,classes:l}=r;if(!l)return n;const a=(0,y.get)(t,o,[]);return["default","theme","custom"].forEach((t=>{a[t]&&a[t].forEach((t=>{let{slug:r}=t;l.forEach((t=>{let{classSuffix:o,propertyName:l}=t;const a=`.has-${(0,y.kebabCase)(r)}-${o}`,s=e.split(",").map((e=>`${e}${a}`)).join(","),c=`var(--wp--preset--${i}--${(0,y.kebabCase)(r)})`;n+=`${s}{${l}: ${c} !important;}`}))}))})),n}),"")}function qI(){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,r=[];return Object.keys(e).forEach((o=>{const i=t+(0,y.kebabCase)(o.replace("/","-")),l=e[o];if(l instanceof Object){const e=i+n;r=[...r,...qI(l,e,n)]}else r.push(`${i}: ${l}`)})),r}function JI(e,t){const n=e.split(","),r=[];return n.forEach((e=>{r.push(`${t.trim()}${e.trim()}`)})),r.join(", ")}function YI(){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,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=MI===t,i=Object.entries(a.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,r)=>{let[i,{value:l,properties:a,useEngine:s,rootOnly:c}]=r;if(c&&!o)return t;const u=l;if("elements"===u[0]||s)return t;const p=(0,y.get)(e,u);if("--wp--style--root--padding"===i&&("string"==typeof p||!n))return t;if(a&&"string"!=typeof p)Object.entries(a).forEach((e=>{const[n,r]=e;if(!(0,y.get)(p,[r],!1))return;const o=n.startsWith("--")?n:(0,y.kebabCase)(n);t.push(`${o}: ${$I((0,y.get)(p,[r]))}`)}));else if((0,y.get)(e,u,!1)){const n=i.startsWith("--")?i:(0,y.kebabCase)(i);t.push(`${n}: ${$I((0,y.get)(e,u))}`)}return t}),[]),l=(0,nl.getCSSRules)(e);return l.forEach((e=>{var t;if(o&&n&&e.key.startsWith("padding"))return;const l=e.key.startsWith("--")?e.key:(0,y.kebabCase)(e.key);let a=e.value;if("string"!=typeof a&&null!==(t=a)&&void 0!==t&&t.ref){var s;const e=a.ref.split(".");if(a=(0,y.get)(r,e),!a||null!==(s=a)&&void 0!==s&&s.ref)return}var c;"font-size"===l&&(a=NI({size:a},null==r||null===(c=r.settings)||void 0===c?void 0:c.typography));i.push(`${l}: ${a}`)})),i}function QI(e){var t,n,r,o,i;let{tree:l,style:a,selector:s,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:p}=e,d="",f=c?Ii(null==a||null===(t=a.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(s===MI?f=f||"0.5em":!c&&p&&(f=p)),f&&null!=l&&null!==(n=l.settings)&&void 0!==n&&null!==(r=n.layout)&&void 0!==r&&r.definitions&&(Object.values(l.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:r}=e;(c||"flex"===n)&&null!=r&&r.length&&r.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,r]=e;n.push(`${t}: ${r||f}`)})),n.length){let r="";r=c?s===MI?`${s} .${t}${(null==e?void 0:e.selector)||""}`:`${s}.${t}${(null==e?void 0:e.selector)||""}`:s===MI?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${s}.${t}${(null==e?void 0:e.selector)||""})`,d+=`${r} { ${n.join("; ")}; }`}}))})),s===MI&&c&&(d+=`${s} { --wp--style--block-gap: ${f}; }`)),s===MI&&null!=l&&null!==(o=l.settings)&&void 0!==o&&null!==(i=o.layout)&&void 0!==i&&i.definitions){const e=["block","flex","grid"];Object.values(l.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:r,baseStyles:o}=t;r&&e.includes(r)&&(d+=`${s} .${n} { display:${r}; }`),null!=o&&o.length&&o.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,r]=e;t.push(`${n}: ${r}`)})),t.length){const r=`${s} .${n}${(null==e?void 0:e.selector)||""}`;d+=`${r} { ${t.join("; ")}; }`}}))}))}return d}const ZI=(e,t)=>{var n,r;const o=[];if(null==e||!e.styles)return o;const i=e=>Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["border","color","dimensions","spacing","typography","filter","outline","shadow"].includes(t)}))),l=i(e.styles);return l&&o.push({styles:l,selector:MI}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n;let[r,i]=t;var l;null!==(n=e.styles)&&void 0!==n&&n.elements[r]&&o.push({styles:null===(l=e.styles)||void 0===l?void 0:l.elements[r],selector:i})})),Object.entries(null!==(n=null===(r=e.styles)||void 0===r?void 0:r.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,r;let[l,s]=e;const c=i(s);if(null!=s&&s.variations){const e={};Object.keys(s.variations).forEach((t=>{e[t]=i(s.variations[t])})),c.variations=e}c&&null!=t&&null!==(n=t[l])&&void 0!==n&&n.selector&&o.push({duotoneSelector:t[l].duotoneSelector,fallbackGapValue:t[l].fallbackGapValue,hasLayoutSupport:t[l].hasLayoutSupport,selector:t[l].selector,styles:c,featureSelectors:t[l].featureSelectors,styleVariationSelectors:t[l].styleVariationSelectors}),Object.entries(null!==(r=null==s?void 0:s.elements)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;r&&null!=t&&t[l]&&null!==a.__EXPERIMENTAL_ELEMENTS&&void 0!==a.__EXPERIMENTAL_ELEMENTS&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[l].selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},XI=(e,t)=>{var n,r,o;const i=[];if(null==e||!e.settings)return i;const l=e=>{const t={};return RI.forEach((n=>{let{path:r}=n;const o=(0,y.get)(e,r,!1);!1!==o&&(0,y.set)(t,r,o)})),t},a=l(e.settings),s=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,y.isEmpty)(a)&&!s||i.push({presets:a,custom:s,selector:MI}),Object.entries(null!==(r=null===(o=e.settings)||void 0===o?void 0:o.blocks)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;const o=l(r),a=r.custom;(0,y.isEmpty)(o)&&!a||i.push({presets:o,custom:a,selector:t[n].selector})})),i},eA=(e,t)=>{const n=XI(e,t);let r="";return n.forEach((t=>{let{presets:n,custom:o,selector:i}=t;const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return RI.reduce(((n,r)=>{let{path:o,valueKey:i,valueFunc:l,cssVarInfix:a}=r;const s=(0,y.get)(e,o,[]);return["default","theme","custom"].forEach((e=>{s[e]&&s[e].forEach((e=>{i&&!l?n.push(`--wp--preset--${a}--${(0,y.kebabCase)(e.slug)}: ${e[i]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${a}--${(0,y.kebabCase)(e.slug)}: ${l(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),a=qI(o,"--wp--custom--","--");a.length>0&&l.push(...a),l.length>0&&(r+=`${i}{${l.join(";")};}`)})),r};function tA(e,t){return XI(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return RI.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,y.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug})))))}))}(t)}))}const nA=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function rA(){let{merged:e}=(0,u.useContext)(jI);const[t]=GI("spacing.blockGap"),n=null!==t,r=!n,o=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),i=(0,m.useSelect)((e=>e(a.store).getBlockStyles),[]);return(0,u.useMemo)((()=>{var t,l,s;if(null===(t=e)||void 0===t||!t.styles||null===(l=e)||void 0===l||!l.settings)return[];e=function(e){var t,n,r,o,i,l,a,s;return!(null===(t=e.styles)||void 0===t?void 0:t.blocks["core/separator"])||!(null===(n=e.styles)||void 0===n||null===(r=n.blocks["core/separator"].color)||void 0===r?void 0:r.background)||null!==(o=e.styles)&&void 0!==o&&null!==(i=o.blocks["core/separator"].color)&&void 0!==i&&i.text||null!==(l=e.styles)&&void 0!==l&&null!==(a=l.blocks["core/separator"].border)&&void 0!==a&&a.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===(s=e.styles)||void 0===s?void 0:s.blocks["core/separator"].color.background}}}}}}(e);const c=((e,t)=>{const n={};return e.forEach((e=>{var r,o,i,l,a,s,c,u,p;const d=e.name,f=null!==(r=null==e||null===(o=e.supports)||void 0===o?void 0:o.__experimentalSelector)&&void 0!==r?r:".wp-block-"+d.replace("core/","").replace("/","-"),m=null!==(i=null==e||null===(l=e.supports)||void 0===l||null===(a=l.color)||void 0===a?void 0:a.__experimentalDuotone)&&void 0!==i?i:null,y=!(null==e||null===(s=e.supports)||void 0===s||!s.__experimentalLayout),g=null==e||null===(c=e.supports)||void 0===c||null===(u=c.spacing)||void 0===u||null===(p=u.blockGap)||void 0===p?void 0:p.__experimentalDefault,h=t(d),v={};null!=h&&h.length&&h.forEach((e=>{const t=`.is-style-${e.name}${f}`;v[e.name]=t}));const b={};Object.entries(WI).forEach((t=>{var n,r;let[o,i]=t;const l=null==e||null===(n=e.supports)||void 0===n||null===(r=n[o])||void 0===r?void 0:r.__experimentalSelector;l&&(b[i]=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(f,l))})),n[d]={duotoneSelector:m,fallbackGapValue:g,featureSelectors:Object.keys(b).length?b:void 0,hasLayoutSupport:y,name:d,selector:f,styleVariationSelectors:Object.keys(v).length?v:void 0}})),n})((0,a.getBlockTypes)(),i),u=eA(e,c),p=function(e,t,n,r){var o,i;let l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=ZI(e,t),s=XI(e,t),c=null==e||null===(o=e.settings)||void 0===o?void 0:o.useRootPaddingAwareAlignments,{contentSize:u,wideSize:p}=(null==e||null===(i=e.settings)||void 0===i?void 0:i.layout)||{};let d="body {margin: 0;";if(u&&(d+=` --wp--style--global--content-size: ${u};`),p&&(d+=` --wp--style--global--wide-size: ${p};`),c&&(d+='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;'),d+="}",a.forEach((t=>{let{selector:o,duotoneSelector:i,styles:a,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:p,styleVariationSelectors:f}=t;p&&Object.entries(p).forEach((e=>{let[t,n]=e;if(null!=a&&a[t]){const e=YI({[t]:a[t]});delete a[t],e.length&&(d+=`${n}{${e.join(";")} }`)}})),f&&Object.entries(f).forEach((t=>{var n;let[r,o]=t;if(null!=a&&null!==(n=a.variations)&&void 0!==n&&n[r]){var i;p&&Object.entries(p).forEach((e=>{var t,n;let[i,l]=e;if(null!=a&&null!==(t=a.variations)&&void 0!==t&&null!==(n=t[r])&&void 0!==n&&n[i]){const e=YI({[i]:a.variations[r][i]});delete a.variations[r][i],e.length&&(d+=`${JI(l,o)}{${e.join(";")} }`)}}));const t=YI(null==a||null===(i=a.variations)||void 0===i?void 0:i[r],o,c,e);t.length&&(d+=`${o}{${t.join(";")}}`)}}));const m={};if(null!=a&&a.filter&&(m.filter=a.filter,delete a.filter),i){const e=YI(m);e.length>0&&(d+=`${i}{${e.join(";")};}`)}l||MI!==o&&!u||(d+=QI({tree:e,style:a,selector:o,hasBlockGapSupport:n,hasFallbackGapSupport:r,fallbackGapValue:s}));const y=YI(a,o,c,e);null!=y&&y.length&&(d+=`${o}{${y.join(";")};}`);const g=Object.entries(a).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=g&&g.length&&g.forEach((e=>{let[t,n]=e;const r=YI(n);if(null==r||!r.length)return;const i=`${o.split(",").map((e=>e+t)).join(",")}{${r.join(";")};}`;d+=i}))})),d+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",d+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",d+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var f,m;const t=Ii(null==e||null===(f=e.styles)||void 0===f||null===(m=f.spacing)||void 0===m?void 0:m.blockGap)||"0.5em";d+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",d+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return s.forEach((e=>{let{selector:t,presets:n}=e;MI===t&&(t="");const r=KI(t,n);(0,y.isEmpty)(r)||(d+=r)})),d}(e,c,n,r,o),d=tA(e,c),f=[{css:u,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(s=e.styles.css)&&void 0!==s?s:"",isGlobalStyles:!0}];return(0,a.getBlockTypes)().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var r;const n=c[t.name].selector;f.push({css:nA(null===(r=e.styles.blocks[t.name])||void 0===r?void 0:r.css,n),isGlobalStyles:!0})}})),[f,e.settings,d]}),[n,r,e,o])}const oA=["core/navigation-link/page","core/navigation-link"],iA=(0,u.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:r,...o}=e;const[i,l]=(0,u.useState)(null),a=(0,f.useInstanceId)(iA),{hideInserter:s,clientId:p}=(0,m.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n,getSelectedBlockClientId:r}=e(xr),o=r();return{clientId:r(),hideInserter:!!t(o)||"zoom-out"===n()}}),[]),d=cy({clientId:p,context:"list-view"}),y=cy({clientId:null==i?void 0:i.clientId,context:"list-view"});(0,u.useEffect)((()=>{null!=y&&y.length&&(0,dn.speak)((0,_.sprintf)((0,_.__)("%s block inserted"),y),"assertive")}),[y]);const g=(0,u.useCallback)((e=>(e.sort(((e,t)=>{let{id:n}=e,{id:r}=t,o=oA.indexOf(n),i=oA.indexOf(r);return o<0&&(o=oA.length),i<0&&(i=oA.length),o-i})),e)),[]);if(s)return null;const{PrivateInserter:h}=Ir(MA),v=`off-canvas-editor-appender__${a}`,b=(0,_.sprintf)((0,_.__)("Append to %1$s block at position %2$d, Level %3$d"),d,r+1,n);return(0,u.createElement)("div",{className:"offcanvas-editor-appender"},(0,u.createElement)(h,c({ref:t,rootClientId:p,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},o,{toggleProps:{"aria-describedby":v},onSelectOrClose:e=>{null!=e&&e.clientId&&l(e)},orderInitialBlockItems:g})),(0,u.createElement)("div",{className:"offcanvas-editor-appender__description",id:v},b))})),lA=Fu(g.__experimentalTreeGridRow);function aA(e){let{isSelected:t,position:n,level:r,rowCount:o,children:i,className:l,path:a,...s}=e;const p=Uu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:a});return(0,u.createElement)(lA,c({ref:p,className:d()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",l),level:r,positionInSet:n,setSize:o},s),i)}function sA(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)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var cA=(0,u.forwardRef)((function(e,t){let{className:n,block:r,onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const{clientId:f}=r,m=sy(f),y=cy({clientId:f,context:"list-view"}),{isLocked:h}=Pg(f),v=m?(0,_.sprintf)((0,_.__)("Edit %s block"),m.title):(0,_.__)("Edit");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${f}`,"aria-hidden":!0,title:v},(0,u.createElement)(sA,{onClick:i}),(0,u.createElement)(hp,{icon:null==m?void 0:m.icon,showColors:!0,context:"list-view"}),(0,u.createElement)(g.__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)(g.__experimentalTruncate,{ellipsizeMode:"auto"},y)),(null==m?void 0:m.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},m.anchor)),h&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))})),uA=window.wp.escapeHtml;function pA(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 dA(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:r}=(0,m.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:r,getBlockTransformItems:o}=e(xr);return{getBlock:n,blockTransforms:o(n(t),r(t))}}),[t]),{replaceBlock:o}=(0,m.useDispatch)(xr),i=["core/page-list","core/site-logo","core/social-links","core/search"],l=r.filter((e=>i.includes(e.name)));return null!=l&&l.length&&t?(0,u.createElement)("div",{className:"link-control-transform"},(0,u.createElement)("h3",{className:"link-control-transform__subheading"},(0,_.__)("Transform")),(0,u.createElement)("div",{className:"link-control-transform__items"},l.map((e=>(0,u.createElement)(g.Button,{key:`transform-${e.name}`,onClick:()=>o(t,(0,a.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,u.createElement)(hp,{icon:e.icon}),e.title))))):null}function fA(e){const{label:t,url:n,opensInNewTab:r,type:o,kind:i}=e.link,l={url:n,opensInNewTab:r,title:t&&(0,Ml.__unstableStripHTML)(t)};return(0,u.createElement)(g.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,u.createElement)(lw,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:l,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!o,noURLSuggestion:!!o,suggestionsQuery:pA(o,i),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:n?null:()=>(0,u.createElement)(dA,{clientId:e.clientId})}))}const mA=["core/navigation-link","core/navigation-submenu"],yA=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,[h,v]=(0,u.useState)(),{blockMovingClientId:b,selectedBlockInBlockEditor:_,lastInsertedBlockClientId:k}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n,getLastInsertedBlocksClientIds:r}=Ir(e(xr)),o=r();return{blockMovingClientId:t(),selectedBlockInBlockEditor:n(),lastInsertedBlockClientId:o&&o[0]}}),[g]),{insertedBlockAttributes:E,insertedBlockName:S,setInsertedBlockAttributes:w}=(e=>{const{insertedBlockAttributes:t,insertedBlockName:n}=(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr);return{insertedBlockAttributes:r(e),insertedBlockName:n(e)}}),[e]),{updateBlockAttributes:r}=(0,m.useDispatch)(xr),o=t=>{e&&r(e,t)};return e?{insertedBlockAttributes:t,insertedBlockName:n,setInsertedBlockAttributes:o}:{insertedBlockAttributes:void 0,insertedBlockName:void 0,setInsertedBlockAttributes:o}})(k),C=null==E?void 0:E.url;(0,u.useEffect)((()=>{g===k&&null!=mA&&mA.includes(S)&&!C&&v(!0)}),[k,g,S,C]);const I=b&&_===g,A=d()("block-editor-list-view-block-contents",{"is-dropping-before":I}),x=f.includes(g)?f:[g];return(0,u.createElement)(u.Fragment,null,h&&(0,u.createElement)(fA,{clientId:k,link:E,onClose:()=>v(!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:r="",kind:o="",type:i=""}=n,{title:l="",url:a="",opensInNewTab:s,id:c,kind:u=o,type:p=i}=e,d=l.replace(/http(s?):\/\//gi,""),f=a.replace(/http(s?):\/\//gi,""),m=l&&l!==r&&d!==f?(0,uA.escapeHTML)(l):r||(0,uA.escapeHTML)(f),y="post_tag"===p?"tag":p.replace("-","_"),g=["post","page","tag","category"].indexOf(y)>-1,h=!u&&!g||"custom"===u?"custom":u;t({...a&&{url:encodeURI((0,sm.safeDecodeURI)(a))},...m&&{label:m},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...h&&{kind:h},...y&&"URL"!==y&&{type:y}})}(e,w,E),v(!1)}}),(0,u.createElement)(py,{clientIds:x},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(cA,c({ref:t,className:A,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))})))}));var gA=yA;const hA=(0,u.createContext)({}),vA=()=>(0,u.useContext)(hA);var bA=(0,u.memo)((function e(t){let{block:{clientId:n},isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}=t;const S=(0,u.useRef)(null),[w,C]=(0,u.useState)(!1),{isLocked:I,isContentLocked:A}=Pg(n),x=(0,m.useSelect)((e=>!o&&(!!A&&e(xr).hasSelectedInnerBlock(n,!0))),[A,n,o]),B=x||o&&k[0]===n,P=x||o&&k[k.length-1]===n,{toggleBlockHighlight:T}=(0,m.useDispatch)(xr),O=sy(n),N=(0,m.useSelect)((e=>e(xr).getBlock(n)),[n]);(0,u.useEffect)((()=>{!D&&o&&S.current.focus()}),[]);const M=(0,u.useCallback)((()=>{C(!0),T(n,!0)}),[n,C,T]),R=(0,u.useCallback)((()=>{C(!1),T(n,!1)}),[n,C,T]),F=(0,u.useCallback)((e=>{l(e,n),e.preventDefault()}),[n,l]),L=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),{isTreeGridMounted:D,expand:U,collapse:j,LeafMoreMenu:z}=vA(),V=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?j(n):!1===b&&U(n)}),[n,U,j,b]),G=(0,f.useInstanceId)(e);if(!N)return null;const H=!!N&&(0,a.hasBlockSupport)(N.name,"__experimentalToolbar",!0),W=`list-view-block-select-button__${G}`,$=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let K=(0,_.__)("Link");O&&(K=I?(0,_.sprintf)((0,_.__)("%s link (locked)"),O.title):(0,_.sprintf)((0,_.__)("%s link"),O.title));const q=O?(0,_.sprintf)((0,_.__)("Options for %s block"),O.title):(0,_.__)("Options"),J=h&&y>0,Y=d()("block-editor-list-view-block__mover-cell",{"is-visible":w||o}),Q=d()("block-editor-list-view-block__menu-cell",{"is-visible":w||B});let Z;J?Z=1:H||(Z=2);const X=d()({"is-selected":o||x,"is-first-selected":B,"is-last-selected":P,"is-branch-selected":i,"is-dragging":r,"has-single-cell":!H}),ee=k.includes(n)?k:[n],te=z||Wg;return(0,u.createElement)(aA,{className:X,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${n}`,"data-block":n,isExpanded:A?void 0:b,"aria-selected":!!o||x},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Z,ref:S,"aria-label":K,"aria-selected":!!o||x,"aria-expanded":A?void 0:b,"aria-describedby":W},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(gA,{block:N,onClick:F,onToggleExpanded:V,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:n,onFocus:r,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:W},$))})),J&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:Y,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:r,onFocus:o})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:r,onFocus:o})})))),H&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:Q,"aria-selected":!!o||x},(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(te,{clientIds:ee,block:N,clientId:n,icon:dm,label:q,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:r,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L}))}))))}));function _A(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(kA(t,n,r),0):1}const kA=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+_A(o,e,t,n):r+1},EA=()=>{};var SA=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=EA,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:p=0,fixedListWindow:d,isExpanded:f,parentId:y,shouldShowInnerBlocks:h=!0,showAppender:v=!0}=t,b=(0,m.useSelect)((e=>!(!y||"contentOnly"!==e(xr).getTemplateLock(y))),[y]),{expandedState:_,draggedClientIds:k}=vA();if(b)return null;const E=v&&1===l,S=n.filter(Boolean),w=S.length,C=E?w+1:w;let I=p;return(0,u.createElement)(u.Fragment,null,S.map(((t,n)=>{var c;const{clientId:p,innerBlocks:y}=t;n>0&&(I+=_A(S[n-1],_,k,f));const{itemInView:g}=d,b=g(I),E=n+1,A=a.length>0?`${a}_${E}`:`${E}`,x=!(null==y||!y.length),B=x&&h?null!==(c=_[p])&&void 0!==c?c:f:void 0,P=!(null==k||!k.includes(p)),T=P||b,O=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(p,i),N=s||O&&x;return(0,u.createElement)(m.AsyncModeProvider,{key:p,value:!O},T&&(0,u.createElement)(bA,{block:t,selectBlock:r,isSelected:O,isBranchSelected:N,isDragged:P,level:l,position:E,rowCount:C,siblingBlockCount:w,showBlockMovers:o,path:A,isExpanded:B,listPosition:I,selectedClientIds:i}),!T&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),x&&B&&!P&&(0,u.createElement)(e,{parentId:p,blocks:y,selectBlock:r,showBlockMovers:o,level:l+1,path:A,listPosition:I+1,fixedListWindow:d,isBranchSelected:N,selectedClientIds:i,isExpanded:f,showAppender:v}))})),E&&(0,u.createElement)(g.__experimentalTreeGridRow,{level:l,setSize:C,positionInSet:C,isExpanded:!0},(0,u.createElement)(g.__experimentalTreeGridCell,null,(e=>(0,u.createElement)(iA,c({nestingLevel:l,blockCount:w},e))))))}));function wA(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function CA(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const IA=["top","bottom"];function AA(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,IA),u=Fh(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const xA=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var BA=(0,u.forwardRef)((function(e,t){let{id:n,parentClientId:r,blocks:o,showBlockMovers:i=!1,isExpanded:l=!1,showAppender:a=!0,LeafMoreMenu:s,description:c=(0,_.__)("Block navigation structure"),onSelect:p}=e;const{getBlock:d}=(0,m.useSelect)(xr),{clientIdsTree:y,draggedClientIds:h,selectedClientIds:v}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(o),{visibleBlockCount:b,shouldShowInnerBlocks:k}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==h?void 0:h.length)>0?n(h).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[h]),{updateBlockSelection:E}=CA(),[S,w]=(0,u.useReducer)(xA,{}),{ref:C,target:I}=AA(),A=(0,u.useRef)(),x=(0,f.useMergeRefs)([A,C,t]),B=(0,u.useRef)(!1),{setSelectedTreeId:P}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:v[0],setExpandedState:w}),T=(0,u.useCallback)(((e,t)=>{E(e,t),P(t),p&&p(d(t))}),[P,E,p,d]);(0,u.useEffect)((()=>{B.current=!0}),[]);const[O]=(0,f.__experimentalUseFixedWindowList)(A,36,b,{useWindowing:!0,windowOverscan:40}),N=(0,u.useCallback)((e=>{e&&w({type:"expand",clientIds:[e]})}),[w]),M=(0,u.useCallback)((e=>{e&&w({type:"collapse",clientIds:[e]})}),[w]),R=(0,u.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),F=(0,u.useCallback)((e=>{var t;M(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[M]),L=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&E(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[E]),D=(0,u.useMemo)((()=>({isTreeGridMounted:B.current,draggedClientIds:h,expandedState:S,expand:N,collapse:M,LeafMoreMenu:s})),[B.current,h,S,N,M,s]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(wA,{listViewRef:A,blockDropTarget:I}),(0,u.createElement)("div",{className:"offcanvas-editor-list-view-tree-wrapper"},(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:x,onCollapseRow:F,onExpandRow:R,onFocusRow:L,"aria-description":c},(0,u.createElement)(hA.Provider,{value:D},(0,u.createElement)(SA,{parentId:r,blocks:y,selectBlock:T,showBlockMovers:i,fixedListWindow:O,selectedClientIds:v,isExpanded:l,shouldShowInnerBlocks:k,showAppender:a}),(0,u.createElement)(g.__experimentalTreeGridRow,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!y.length&&(0,u.createElement)(g.__experimentalTreeGridCell,{withoutGridItem:!0},(0,u.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},(0,_.__)("Your menu is currently empty. Add your first menu item to get started."))))))))}));var PA=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"}));const TA={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"},OA=["core/navigation-link","core/navigation-submenu"];function NA(e){let{block:t,onClose:n}=e;const{expandedState:r,expand:o}=vA(),{insertBlock:i,replaceBlock:l,replaceInnerBlocks:s}=(0,m.useDispatch)(xr),c=t.clientId,p=!OA.includes(t.name);return(0,u.createElement)(g.MenuItem,{icon:PA,disabled:p,onClick:()=>{const e=(0,a.createBlock)("core/navigation-link");if("core/navigation-submenu"===t.name)i(e,t.innerBlocks.length,c,false);else{const n=(0,a.createBlock)("core/navigation-submenu",t.attributes,t.innerBlocks);l(c,n),s(n.clientId,[e],false)}r[t.clientId]||o(t.clientId),n()}},(0,_.__)("Add submenu link"))}const MA={};Cr(MA,{...l,ExperimentalBlockEditorProvider:Ep,LeafMoreMenu:function(e){const{clientId:t,block:n}=e,{removeBlocks:r}=(0,m.useDispatch)(xr),o=(0,_.sprintf)((0,_.__)("Remove %s"),uy({clientId:t,maximumLength:25}));return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:TA,noIcons:!0},e),(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(NA,{block:n,onClose:i}),(0,u.createElement)(g.MenuItem,{onClick:()=>{r([t],!1),i()}},o))}))},OffCanvasEditor:BA,PrivateInserter:Hm})}(),(window.wp=window.wp||{}).blockEditor=r}(); \ No newline at end of file diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js index 96e8d07030..a49c2a9703 100644 --- a/wp-includes/js/dist/block-library.js +++ b/wp-includes/js/dist/block-library.js @@ -21,193 +21,6 @@ module.exports = function isBlockMetadataExperimental(metadata) { }; -/***/ }), - -/***/ 3827: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var classNames = (function () { - // don't inherit from Object so we can skip hasOwnProperty check later - // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 - function StorageObject() {} - StorageObject.prototype = Object.create(null); - - function _parseArray (resultSet, array) { - var length = array.length; - - for (var i = 0; i < length; ++i) { - _parse(resultSet, array[i]); - } - } - - var hasOwn = {}.hasOwnProperty; - - function _parseNumber (resultSet, num) { - resultSet[num] = true; - } - - function _parseObject (resultSet, object) { - if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) { - resultSet[object.toString()] = true; - return; - } - - for (var k in object) { - if (hasOwn.call(object, k)) { - // set value to false instead of deleting it to avoid changing object structure - // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions - resultSet[k] = !!object[k]; - } - } - } - - var SPACE = /\s+/; - function _parseString (resultSet, str) { - var array = str.split(SPACE); - var length = array.length; - - for (var i = 0; i < length; ++i) { - resultSet[array[i]] = true; - } - } - - function _parse (resultSet, arg) { - if (!arg) return; - var argType = typeof arg; - - // 'foo bar' - if (argType === 'string') { - _parseString(resultSet, arg); - - // ['foo', 'bar', ...] - } else if (Array.isArray(arg)) { - _parseArray(resultSet, arg); - - // { 'foo': true, ... } - } else if (argType === 'object') { - _parseObject(resultSet, arg); - - // '130' - } else if (argType === 'number') { - _parseNumber(resultSet, arg); - } - } - - function _classNames () { - // don't leak arguments - // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments - var len = arguments.length; - var args = Array(len); - for (var i = 0; i < len; i++) { - args[i] = arguments[i]; - } - - var classSet = new StorageObject(); - _parseArray(classSet, args); - - var list = []; - - for (var k in classSet) { - if (classSet[k]) { - list.push(k) - } - } - - return list.join(' '); - } - - return _classNames; - })(); - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - var nativeCodeString = '[native code]'; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - classes.push(arg.toString()); - continue; - } - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - /***/ }), /***/ 5619: @@ -889,6 +702,210 @@ module.exports.has = hasAccents; module.exports.remove = removeAccents; +/***/ }), + +/***/ 4526: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var classNames = (function () { + // don't inherit from Object so we can skip hasOwnProperty check later + // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 + function StorageObject() {} + StorageObject.prototype = Object.create(null); + + function _parseArray (resultSet, array) { + var length = array.length; + + for (var i = 0; i < length; ++i) { + _parse(resultSet, array[i]); + } + } + + var hasOwn = {}.hasOwnProperty; + + function _parseNumber (resultSet, num) { + resultSet[num] = true; + } + + function _parseObject (resultSet, object) { + if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) { + resultSet[object.toString()] = true; + return; + } + + for (var k in object) { + if (hasOwn.call(object, k)) { + // set value to false instead of deleting it to avoid changing object structure + // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions + resultSet[k] = !!object[k]; + } + } + } + + var SPACE = /\s+/; + function _parseString (resultSet, str) { + var array = str.split(SPACE); + var length = array.length; + + for (var i = 0; i < length; ++i) { + resultSet[array[i]] = true; + } + } + + function _parse (resultSet, arg) { + if (!arg) return; + var argType = typeof arg; + + // 'foo bar' + if (argType === 'string') { + _parseString(resultSet, arg); + + // ['foo', 'bar', ...] + } else if (Array.isArray(arg)) { + _parseArray(resultSet, arg); + + // { 'foo': true, ... } + } else if (argType === 'object') { + _parseObject(resultSet, arg); + + // '130' + } else if (argType === 'number') { + _parseNumber(resultSet, arg); + } + } + + function _classNames () { + // don't leak arguments + // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments + var len = arguments.length; + var args = Array(len); + for (var i = 0; i < len; i++) { + args[i] = arguments[i]; + } + + var classSet = new StorageObject(); + _parseArray(classSet, args); + + var list = []; + + for (var k in classSet) { + if (classSet[k]) { + list.push(k) + } + } + + return list.join(' '); + } + + return _classNames; + })(); + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ 7153: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames () { + var classes = ''; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg) { + classes = appendClass(classes, parseValue(arg)); + } + } + + return classes; + } + + function parseValue (arg) { + if (typeof arg === 'string' || typeof arg === 'number') { + return arg; + } + + if (typeof arg !== 'object') { + return ''; + } + + if (Array.isArray(arg)) { + return classNames.apply(null, arg); + } + + if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { + return arg.toString(); + } + + var classes = ''; + + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes = appendClass(classes, key); + } + } + + return classes; + } + + function appendClass (value, newClass) { + if (!newClass) { + return value; + } + + if (value) { + return value + ' ' + newClass; + } + + return value + newClass; + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + /***/ }) /******/ }); @@ -2149,7 +2166,7 @@ function _extends() { return _extends.apply(this, arguments); } // EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); +var classnames = __webpack_require__(7153); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","url"] var external_wp_url_namespaceObject = window["wp"]["url"]; @@ -2725,7 +2742,7 @@ const WP_EMBED_TYPE = 'wp-embed'; ;// CONCATENATED MODULE: external "lodash" var external_lodash_namespaceObject = window["lodash"]; // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js -var dedupe = __webpack_require__(3827); +var dedupe = __webpack_require__(4526); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); // EXTERNAL MODULE: ./node_modules/memize/index.js var memize = __webpack_require__(9756); diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js index 4be9841fc4..13325914c6 100644 --- a/wp-includes/js/dist/block-library.min.js +++ b/wp-includes/js/dist/block-library.min.js @@ -1,14 +1,14 @@ /*! This file is auto-generated */ -!function(){var e={7078:function(e){e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},3827:function(e,t){var n; +!function(){var e={7078:function(e){e.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}},5619:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,a;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=o;0!=r--;){var l=a[r];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},9756:function(e){e.exports=function(e,t){var n,o,r=0;function a(){var a,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;ln({displayAsDropdown:!a})}),a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Group by:"),options:[{label:(0,Ze.__)("Year"),value:"yearly"},{label:(0,Ze.__)("Month"),value:"monthly"},{label:(0,Ze.__)("Week"),value:"weekly"},{label:(0,Ze.__)("Day"),value:"daily"}],value:l,onChange:e=>n({type:e})}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:t}))))}},tt=()=>je({name:Xe,metadata:Je,settings:et});var nt=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const mt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var dt=function(e){let{value:t,onChange:n}=e;const[o,r]=(0,Oe.useState)(),a=(0,st.useSelect)((e=>{const{getUsers:t}=e(it.store);return t(mt)}),[]);if(!a)return null;const l=a.map((e=>({label:e.name,value:e.id})));return(0,Oe.createElement)(We.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("User"),help:(0,Ze.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:t,onChange:n,options:o||l,onFilterValueChange:e=>r(l.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})};const pt=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:r}=e;return(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),onChange:e=>t({size:e}),min:n.minSize,max:n.maxSize,initialPosition:null==o?void 0:o.size,value:null==o?void 0:o.size}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),r&&(0,Oe.createElement)(dt,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},gt=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:r,isSelected:a}=e;const l=(0,Qe.__experimentalUseBorderProps)(n),i=(0,lt.addQueryArgs)((0,lt.removeQueryArgs)(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,Oe.createElement)("div",r,(0,Oe.createElement)(We.ResizableBox,{size:{width:n.size,height:n.size},showHandle:a,onResizeStop:(e,o,r,a)=>{t({size:parseInt(n.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Ze.isRTL)(),bottom:!0,left:(0,Ze.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize},(0,Oe.createElement)("img",ot({src:i,alt:o.alt},l,{className:at()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",l.className),style:{...l.style}}))))},ht=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{commentId:a}=n,l=(0,Qe.useBlockProps)(),i=function(e){let{commentId:t}=e;const[n]=(0,it.useEntityProp)("root","comment","author_avatar_urls",t),[o]=(0,it.useEntityProp)("root","comment","author_name",t),r=n?Object.values(n):null,a=n?Object.keys(n):null,{minSize:l,maxSize:i}=ct(a),s=ut();return{src:r?r[r.length-1]:s,minSize:l,maxSize:i,alt:o?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),o):(0,Ze.__)("Default Avatar")}}({commentId:a});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{avatar:i,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o}))},vt=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{postId:a,postType:l}=n,i=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:r}=(0,st.useSelect)((e=>{var r;const{getEditedEntityRecord:a,getUser:l}=e(it.store);if(t)return{authorDetails:l(t)};const i=null===(r=a("postType",o,n))||void 0===r?void 0:r.author;return{authorDetails:i?l(i):null}}),[o,n,t]),a=null!=r&&r.avatar_urls?Object.values(r.avatar_urls):null,l=null!=r&&r.avatar_urls?Object.keys(r.avatar_urls):null,{minSize:i,maxSize:s}=ct(l),c=ut();return{src:a?a[a.length-1]:c,minSize:i,maxSize:s,alt:r?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),null==r?void 0:r.name):(0,Ze.__)("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:a,postType:l}),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{selectUser:!0,attributes:t,avatar:i,setAttributes:o}),(0,Oe.createElement)("div",null,t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})))};const bt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user’s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},editorStyle:"wp-block-avatar",style:"wp-block-avatar"},{name:_t}=bt,ft={icon:nt,edit:function(e){var t,n;return null!=e&&null!==(t=e.context)&&void 0!==t&&t.commentId||null===(null==e||null===(n=e.context)||void 0===n?void 0:n.commentId)?(0,Oe.createElement)(ht,e):(0,Oe.createElement)(vt,e)}},yt=()=>je({name:_t,metadata:bt,settings:ft});var kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),xt=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return(0,Oe.createElement)("figure",null,(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o}))}}],wt=window.wp.blob;var Et=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})),Ct=window.wp.notices,St=window.wp.compose;const Bt=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Tt="wp-embed";var Nt=window.lodash,Pt=n(3827),It=n.n(Pt),zt=n(9756),Mt=n.n(zt);const{name:Rt}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Lt=e=>{var t;return null===(t=(0,Ge.getBlockVariations)(Rt))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Ht=e=>e&&e.includes('class="wp-embedded-content"'),At=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:r={}}=e,{url:a,providerNameSlug:l,type:i,...s}=r;if(!a||!(0,Ge.getBlockType)(Rt))return;const c=Lt(a),u="wordpress"===l||i===Tt,m=!u&&c&&(c.attributes.providerNameSlug!==l||!l);if(m)return(0,Ge.createBlock)(Rt,{url:a,...s,...c.attributes});const d=null===(t=(0,Ge.getBlockVariations)(Rt))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Ht(o.html)&&!u?(0,Ge.createBlock)(Rt,{url:a,...d.attributes,...n}):void 0},Vt=e=>{if(!e)return e;const t=Bt.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return It()(e,t)};function Ft(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Vt(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const r=o.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n=o.ratio){return e-o.ratio>.1?Vt(t):It()(Vt(t),o.className,"wp-has-aspect-ratio")}}}return t}const Dt=Mt()((function(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=(0,Nt.kebabCase)((s||t).toLowerCase());return Ht(i)&&(l=Tt),(i||"photo"===l)&&(a.type=l,a.providerNameSlug=c),a.className=Ft(i,n,o&&r),a})),$t=function(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:a,className:l}=e;return{...e,...Dt(t,n,r?void 0:l,o,a)}},Gt=["audio"];var Ot=function(e){let{attributes:t,className:n,setAttributes:o,onReplace:r,isSelected:a,insertBlocksAfter:l}=e;const{id:i,autoplay:s,caption:c,loop:u,preload:m,src:d}=t,p=(0,St.usePrevious)(c),[g,h]=(0,Oe.useState)(!!c),v=!i&&(0,wt.isBlobURL)(d),b=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store);return t().mediaUpload}),[]);(0,Oe.useEffect)((()=>{if(!i&&(0,wt.isBlobURL)(d)){const e=(0,wt.getBlobByURL)(d);e&&b({filesList:[e],onFileChange:e=>{let[t]=e;return w(t)},onError:e=>x(e),allowedTypes:Gt})}}),[]),(0,Oe.useEffect)((()=>{c&&!p&&h(!0)}),[c,p]);const _=(0,Oe.useCallback)((e=>{e&&!c&&e.focus()}),[c]);function f(e){return t=>{o({[e]:t})}}function y(e){if(e!==d){const t=At({attributes:{url:e}});if(void 0!==t&&r)return void r(t);o({src:e,id:void 0})}}(0,Oe.useEffect)((()=>{a||c||h(!1)}),[a,c]);const{createErrorNotice:k}=(0,st.useDispatch)(Ct.store);function x(e){k(e,{type:"snackbar"})}function w(e){e&&e.url?o({src:e.url,id:e.id,caption:e.caption}):o({src:void 0,id:void 0,caption:void 0})}const E=at()(n,{"is-transient":v}),C=(0,Qe.useBlockProps)({className:E});return d?(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>{h(!g),g&&c&&o({caption:void 0})},icon:Et,isPressed:g,label:g?(0,Ze.__)("Remove caption"):(0,Ze.__)("Add caption")})),(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:Gt,accept:"audio/*",onSelect:w,onSelectURL:y,onError:x})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Autoplay"),onChange:f("autoplay"),checked:s,help:function(e){return e?(0,Ze.__)("Autoplay may cause usability issues for some users."):null}}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Loop"),onChange:f("loop"),checked:u}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze._x)("Preload","noun; Audio block parameter"),value:m||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,Ze.__)("Browser default")},{value:"auto",label:(0,Ze.__)("Auto")},{value:"metadata",label:(0,Ze.__)("Metadata")},{value:"none",label:(0,Ze._x)("None","Preload value")}]}))),(0,Oe.createElement)("figure",C,(0,Oe.createElement)(We.Disabled,{isDisabled:!a},(0,Oe.createElement)("audio",{controls:"controls",src:d})),v&&(0,Oe.createElement)(We.Spinner,null),g&&(!Qe.RichText.isEmpty(c)||a)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption",tagName:"figcaption",className:(0,Qe.__experimentalGetElementClassName)("caption"),ref:_,"aria-label":(0,Ze.__)("Audio caption text"),placeholder:(0,Ze.__)("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,Oe.createElement)("div",C,(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:kt}),onSelect:w,onSelectURL:y,accept:"audio/*",allowedTypes:Gt,value:t,onError:x}))};const Ut={from:[{type:"files",isMatch(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform(e){const t=e[0];return(0,Ge.createBlock)("core/audio",{src:(0,wt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:r,wav:a,wma:l}}=e;return t||n||o||r||a||l}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]};var qt=Ut;const jt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:Wt}=jt,Zt={icon:kt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:qt,deprecated:xt,edit:Ot,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return l&&(0,Oe.createElement)("figure",Qe.useBlockProps.save(),(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o,className:(0,Qe.__experimentalGetElementClassName)("caption")}))}},Qt=()=>je({name:Wt,metadata:jt,settings:Zt});var Kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const Yt=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,Nt.mapValues)(e,Yt)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,Nt.isEmpty)(t)?void 0:t};var Jt=Yt;function Xt(e){var t,n;if(null==e||null===(t=e.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.fontFamily)return e;const{fontFamily:o,...r}=e.style.typography;return{...e,style:Jt({...e.style,typography:r}),fontFamily:o.split("|").pop()}}const en=e=>{var t,n,o;const{borderRadius:r,...a}=e,l=[r,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return l?{...a,style:{...a.style,border:{...null===(o=a.style)||void 0===o?void 0:o.border,radius:`${l}px`}}}:a};const tn=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:o,customGradient:r,...a}=e;return{...a,style:t}},nn=e=>{const{color:t,textColor:n,...o}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return tn(o)},on={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},rn={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))}},an={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},ln=[rn,an,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,o;let{attributes:r,className:a}=e;const{fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=r;if(!u)return null;const g=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,h=(0,Qe.__experimentalGetColorClassesAndStyles)(r),v=at()("wp-block-button__link",h.className,{"no-border-radius":0===(null==c||null===(n=c.border)||void 0===n?void 0:n.radius)}),b={borderRadius:g||void 0,...h.style},_=at()(a,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:d,title:m,style:b,value:u,target:i,rel:s}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:o,rel:r,text:a,title:l,url:i}=t,s=at()("wp-block-button__link",{"no-border-radius":0===n}),c={borderRadius:n?n+"px":void 0};return(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:s,href:i,title:l,style:c,value:a,target:o,rel:r})},migrate:en},{supports:{align:!0,alignWide:!1},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!(e.customTextColor||e.customBackgroundColor||e.customGradient||e.align),migrate:(0,St.compose)(en,tn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:at()(n.className,`align${e.align}`)}})),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:r,customTextColor:a,customGradient:l,linkTarget:i,gradient:s,rel:c,text:u,textColor:m,title:d,url:p}=t,g=(0,Qe.getColorClassName)("color",m),h=!l&&(0,Qe.getColorClassName)("background-color",n),v=(0,Qe.__experimentalGetGradientClass)(s),b=at()("wp-block-button__link",{"has-text-color":m||a,[g]:g,"has-background":n||r||l||s,[h]:h,"no-border-radius":0===o,[v]:v}),_={background:l||void 0,backgroundColor:h||l||s?void 0:r,color:g?void 0:a,borderRadius:o?o+"px":void 0};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:p,title:d,style:_,value:u,target:i,rel:c}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible(e){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),en(tn({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:r,linkTarget:a,rel:l,text:i,textColor:s,title:c,url:u}=t,m=(0,Qe.getColorClassName)("color",s),d=(0,Qe.getColorClassName)("background-color",n),p=at()("wp-block-button__link",{"has-text-color":s||r,[m]:m,"has-background":n||o,[d]:d}),g={backgroundColor:d?void 0:o,color:m?void 0:r};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:p,href:u,title:c,style:g,value:i,target:a,rel:l}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:nn,save(e){let{attributes:t}=e;const{url:n,text:o,title:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s}=t,c=(0,Qe.getColorClassName)("color",l),u=(0,Qe.getColorClassName)("background-color",a),m=at()("wp-block-button__link",{"has-text-color":l||s,[c]:c,"has-background":a||i,[u]:u}),d={backgroundColor:u?void 0:i,color:c?void 0:s};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:n,title:r,style:d,value:o}))}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t,s={backgroundColor:l,color:i};return(0,Oe.createElement)("div",{className:`align${a}`},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:r,style:s,value:o}))},migrate:nn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t;return(0,Oe.createElement)("div",{className:`align${a}`,style:{backgroundColor:l}},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",href:n,title:r,style:{color:i},value:o}))},migrate:nn}];var sn=ln,cn=window.wp.keycodes;var un=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.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 mn=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.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 dn="noreferrer noopener";function pn(e){let{selectedWidth:t,setAttributes:n}=e;return(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Width settings")},(0,Oe.createElement)(We.ButtonGroup,{"aria-label":(0,Ze.__)("Button width")},[25,50,75,100].map((e=>(0,Oe.createElement)(We.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var o;n({width:t===(o=e)?void 0:o})}},e,"%")))))}var gn=function(e){var t;const{attributes:n,setAttributes:o,className:r,isSelected:a,onReplace:l,mergeBlocks:i}=e,{textAlign:s,linkTarget:c,placeholder:u,rel:m,style:d,text:p,url:g,width:h}=n,[v,b]=(0,Oe.useState)(null),_=(0,Qe.__experimentalUseBorderProps)(n),f=(0,Qe.__experimentalUseColorProps)(n),y=(0,Qe.__experimentalGetSpacingClassesAndStyles)(n),k=(0,Oe.useRef)(),x=(0,Oe.useRef)(),w=(0,Qe.useBlockProps)({ref:(0,St.useMergeRefs)([b,k]),onKeyDown:function(e){if(cn.isKeyboardEvent.primary(e,"k"))T(e);else if(cn.isKeyboardEvent.primaryShift(e,"k")){var t;N(),null===(t=x.current)||void 0===t||t.focus()}}}),[E,C]=(0,Oe.useState)(!1),S=!!g,B="_blank"===c;function T(e){e.preventDefault(),C(!0)}function N(){o({url:void 0,linkTarget:void 0,rel:void 0}),C(!1)}return(0,Oe.useEffect)((()=>{a||C(!1)}),[a]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",ot({},w,{className:at()(w.className,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":w.style.fontSize})}),(0,Oe.createElement)(Qe.RichText,{ref:x,"aria-label":(0,Ze.__)("Button text"),placeholder:u||(0,Ze.__)("Add text…"),value:p,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:at()(r,"wp-block-button__link",f.className,_.className,{[`has-text-align-${s}`]:s,"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),style:{..._.style,...f.style,...y.style},onSplit:e=>(0,Ge.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:i,identifier:"text"})),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:s,onChange:e=>{o({textAlign:e})}}),!S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,Ze.__)("Link"),shortcut:cn.displayShortcut.primary("k"),onClick:T}),S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:mn,title:(0,Ze.__)("Unlink"),shortcut:cn.displayShortcut.primaryShift("k"),onClick:N,isActive:!0})),a&&(E||S)&&(0,Oe.createElement)(We.Popover,{placement:"bottom",onClose:()=>{var e;C(!1),null===(e=x.current)||void 0===e||e.focus()},anchor:v,focusOnMount:!!E&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,Oe.createElement)(Qe.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:g,opensInNewTab:B},onChange:e=>{let{url:t="",opensInNewTab:n}=e;o({url:t}),B!==n&&function(e){const t=e?"_blank":void 0;let n=m;t&&!m?n=dn:t||m!==dn||(n=void 0),o({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;N(),null===(e=x.current)||void 0===e||e.focus()},forceIsEditingLink:E})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(pn,{selectedWidth:h,setAttributes:o})),(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link rel"),value:m||"",onChange:e=>o({rel:e})})))};const hn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:!0,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:vn}=hn,bn={icon:Kt,example:{attributes:{className:"is-style-fill",text:(0,Ze.__)("Call to Action")}},edit:gn,save:function(e){var t,n;let{attributes:o,className:r}=e;const{textAlign:a,fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=o;if(!u)return null;const g=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),h=(0,Qe.__experimentalGetColorClassesAndStyles)(o),v=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),b=at()("wp-block-button__link",h.className,g.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===(null==c||null===(t=c.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),_={...g.style,...h.style,...v.style},f=at()(r,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:f}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:d,title:m,style:_,value:u,target:i,rel:s}))},deprecated:sn,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},_n=()=>je({name:vn,metadata:hn,settings:bn});var fn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"}));const yn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},kn=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:e=>{let{contentJustification:t,orientation:n}=e;return!!t||!!n},migrate:yn,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:at()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))},isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate(e){return yn({...e,align:void 0,contentJustification:e.align})}}];var xn=kn,wn=window.wp.richText;const{name:En}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},Cn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>(0,Ge.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelector("a"),r=null==o?void 0:o.getAttribute("href");return(0,Ge.createBlock)("core/button",{text:n,url:r})}))),isMatch:e=>e.every((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]};var Sn=Cn;const Bn=[vn],Tn={name:vn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Nn=function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=(0,Qe.useBlockProps)({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=(0,st.useSelect)((e=>{var t;const n=e(Qe.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[vn]}),[]),s=(0,Qe.useInnerBlocksProps)(l,{allowedBlocks:Bn,__experimentalDefaultBlock:Tn,__experimentalDirectInsert:!0,template:[[vn,{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0});return(0,Oe.createElement)("div",s)};const Pn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:In}=Pn,zn={icon:fn,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,Ze.__)("Find out more")}},{name:"core/button",attributes:{text:(0,Ze.__)("Contact us")}}]},deprecated:xn,transforms:Sn,edit:Nn,save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=Qe.useBlockProps.save({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)}},Mn=()=>je({name:In,metadata:Pn,settings:zn});var Rn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));const Ln=Mt()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var Hn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/archives")}]};const An={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:Vn}=An,Fn={icon:Rn,example:{},edit:function(e){let{attributes:t}=e;const n=(0,Qe.useBlockProps)(),{date:o,hasPosts:r,hasPostsResolved:a}=(0,st.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(it.store),o={status:"publish",per_page:1},r=t("postType","post",o),a=n("getEntityRecords",["postType","post",o]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:a,hasPosts:a&&1===(null==r?void 0:r.length)}}),[]);return r?(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/calendar",attributes:{...t,...Ln(o)}}))):(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Placeholder,{icon:Rn,label:(0,Ze.__)("Calendar")},a?(0,Ze.__)("No published posts found."):(0,Oe.createElement)(We.Spinner,null)))},transforms:Hn},Dn=()=>je({name:Vn,metadata:An,settings:Fn});var $n=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Gn=window.wp.htmlEntities;var On=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"}));const Un={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/categories",title:"Categories List",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:qn}=Un,jn={icon:$n,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:r,showOnlyTopLevel:a,showEmpty:l},setAttributes:i,className:s}=t;const c=(0,St.useInstanceId)(e,"blocks-category-select"),u={per_page:-1,hide_empty:!l,context:"view"};a&&(u.parent=0);const{records:m,isResolving:d}=(0,it.useEntityRecords)("taxonomy","category",u),p=e=>null!=m&&m.length?null===e?m:m.filter((t=>{let{parent:n}=t;return n===e})):[],g=e=>t=>i({[e]:t}),h=e=>e?(0,Gn.decodeEntities)(e).trim():(0,Ze.__)("(Untitled)"),v=e=>{const t=p(e.id),{id:n,link:a,count:l,name:i}=e;return(0,Oe.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,Oe.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},h(i)),r&&` (${l})`,o&&!!t.length&&(0,Oe.createElement)("ul",{className:"children"},t.map((e=>v(e)))))},b=(e,t)=>{const{id:n,count:a,name:l}=e,i=p(n);return[(0,Oe.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),h(l),r&&` (${a})`),o&&!!i.length&&i.map((e=>b(e,t+1)))]},_=null==m||!m.length||n||d?"div":"ul",f=at()(s,{"wp-block-categories-list":!(null==m||!m.length||n||d),"wp-block-categories-dropdown":!(null==m||!m.length)&&n&&!d}),y=(0,Qe.useBlockProps)({className:f});return(0,Oe.createElement)(_,y,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display as dropdown"),checked:n,onChange:g("displayAsDropdown")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:g("showPostCounts")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show only top level categories"),checked:a,onChange:g("showOnlyTopLevel")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show empty categories"),checked:l,onChange:g("showEmpty")}),!a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show hierarchy"),checked:o,onChange:g("showHierarchy")}))),d&&(0,Oe.createElement)(We.Placeholder,{icon:On,label:(0,Ze.__)("Categories")},(0,Oe.createElement)(We.Spinner,null)),!d&&0===(null==m?void 0:m.length)&&(0,Oe.createElement)("p",null,(0,Ze.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!d&&(null==m?void 0:m.length)>0&&(n?(()=>{const e=p(o?0:null);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.VisuallyHidden,{as:"label",htmlFor:c},(0,Ze.__)("Categories")),(0,Oe.createElement)("select",{id:c},(0,Oe.createElement)("option",null,(0,Ze.__)("Select Category")),e.map((e=>b(e,0)))))})():p(o?0:null).map((e=>v(e)))))}},Wn=()=>je({name:qn,metadata:Un,settings:jn});var Zn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}));var Qn=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,st.useDispatch)(Qe.store),o=(0,st.useSelect)((e=>e(Qe.store).getBlock(t)),[t]);return(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>n(o.clientId,(0,Ge.rawHandler)({HTML:(0,Ge.serialize)(o)}))},(0,Ze.__)("Convert to blocks"))};function Kn(e){const t=(0,st.useSelect)((e=>e(Qe.store).getSettings().styles));return(0,Oe.useEffect)((()=>{const{baseURL:n,suffix:o,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:o}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,height:500,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((e=>{let{css:t}=e;const o=n.createElement("style");o.innerHTML=t,n.head.appendChild(o)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Oe.createElement)("textarea",e)}function Yn(e){const{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e,[a,l]=(0,Oe.useState)(!1),i=`editor-${t}`,s=(0,Ze.__)("Classic Edit");return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>l(!0)},s))),n&&(0,Oe.createElement)(Oe.RawHTML,null,n),(a||!n)&&(0,Oe.createElement)(We.Modal,{title:s,__experimentalHideHeader:!0},(0,Oe.createElement)("h2",{style:{display:"flex",justifyContent:"space-between"}},(0,Oe.createElement)("div",null,s),(0,Oe.createElement)("div",null,(0,Oe.createElement)(We.Button,{onClick:()=>n?l(!1):r([])},(0,Ze.__)("Cancel")),(0,Oe.createElement)(We.Button,{isPrimary:!0,onClick:()=>{o({content:window.wp.oldEditor.getContent(i)}),l(!1)}},(0,Ze.__)("Save")))),(0,Oe.createElement)(Kn,{id:i,defaultValue:n})))}const{wp:Jn}=window;function Xn(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e;const{getMultiSelectedBlockClientIds:a}=(0,st.useSelect)(Qe.store),l=(0,Oe.useRef)(!1);return(0,Oe.useEffect)((()=>{if(!l.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,Oe.useEffect)((()=>{const{baseURL:e,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const r=document.querySelector(".interface-interface-skeleton__content"),l=r.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),r.scrollTop!==l&&(r.scrollTop=l))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const l=(0,St.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{cn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==cn.BACKSPACE&&t.keyCode!==cn.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(r([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===cn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:e}=window.wpEditorL10n.tinymce;Jn.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return l.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),Jn.oldEditor.remove(`editor-${t}`)}}),[]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",{key:"toolbar",id:`toolbar-${t}`,className:"block-library-classic__toolbar",onClick:function(){const e=window.tinymce.get(`editor-${t}`);e&&e.focus()},"data-placeholder":(0,Ze.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Oe.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const eo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:to}=eo,no={icon:Zn,edit:function(e){const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).canRemoveBlock(t)),[t]),[o,r]=(0,Oe.useState)(!1),a=(0,St.useRefEffect)((e=>{r(e.ownerDocument!==document)}),[]);return(0,Oe.createElement)(Oe.Fragment,null,n&&(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(Qn,{clientId:t}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)({ref:a}),o?(0,Oe.createElement)(Yn,e):(0,Oe.createElement)(Xn,e)))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,Oe.createElement)(Oe.RawHTML,null,n)}},oo=()=>je({name:to,metadata:eo,settings:no});var ro=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function ao(e){return e.replace(/\[/g,"[")}function lo(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var io={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Ge.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/code",{content:t})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/paragraph",{content:t.replace(/\n/g,"
")})}}]};const so={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:co}=so,uo={icon:ro,example:{attributes:{content:(0,Ze.__)("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );")}},transforms:io,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const r=(0,Qe.useBlockProps)();return(0,Oe.createElement)("pre",r,(0,Oe.createElement)(Qe.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:(0,Ze.__)("Write code…"),"aria-label":(0,Ze.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,Oe.createElement)("pre",Qe.useBlockProps.save(),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"code",value:(n=t.content,(0,St.pipe)(ao,lo)(n||""))}));var n}},mo=()=>je({name:co,metadata:so,settings:uo});var po=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));const go=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate(e){return{...e,width:`${e.width}%`}},save(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n}),a={flexBasis:o+"%"};return(0,Oe.createElement)("div",{className:r,style:a},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];var ho=go;var vo=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:r},setAttributes:a,clientId:l}=e;const i=at()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Qe.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:m}=(0,st.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Qe.store),o=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:o,columnsIds:t(o)}}),[l]),{updateBlockAttributes:d}=(0,st.useDispatch)(Qe.store),p=Number.isFinite(n)?n+"%":n,g=(0,Qe.useBlockProps)({className:i,style:p?{flexBasis:p}:void 0}),h=c.length,v=c.indexOf(l)+1,b=(0,Ze.sprintf)((0,Ze.__)("%1$s (%2$d of %3$d)"),g["aria-label"],v,h),_=(0,Qe.useInnerBlocksProps)({...g,"aria-label":b},{templateLock:o,allowedBlocks:r,renderAppender:u?void 0:Qe.InnerBlocks.ButtonBlockAppender});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Column settings")},(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:s}))),(0,Oe.createElement)("div",_))};const bo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0}},{name:_o}=bo,fo={icon:po,edit:vo,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n});let a;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&null!=o&&o.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}a={flexBasis:e}}const l=Qe.useBlockProps.save({className:r,style:a}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)},deprecated:ho},yo=()=>je({name:_o,metadata:bo,settings:fo});var ko=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function xo(e){let t,{doc:n}=xo;n||(n=document.implementation.createHTMLDocument(""),xo.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var wo=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:r,textColor:a,customTextColor:l}=t,i=(0,Qe.getColorClassName)("background-color",o),s=(0,Qe.getColorClassName)("color",a),c=at()({"has-background":o||r,"has-text-color":a||l,[i]:i,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:i?void 0:r,color:s?void 0:l};return(0,Oe.createElement)("div",{className:c||void 0,style:u},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==xo(e.originalContent)))},migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=xo(n);return void 0===o&&(o=0),e[o]||(e[o]=[]),e[o].push(t),e}),[]).map((e=>(0,Ge.createBlock)("core/column",{},e))),{columns:o,...r}=e;return[{...r,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,Oe.createElement)("div",{className:`has-${n}-columns`},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...o}=e;return[e={...o,isStackedOnMobile:!0},t]},save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:o}=t,r=at()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,Oe.createElement)("div",{className:r},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];const Eo=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Co(e,t){const{width:n=100/t}=e.attributes;return Eo(n)}function So(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+Co(n,t)),0)}function Bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=Co(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function To(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=So(e,n);return(0,Nt.mapValues)(Bo(e,n),(e=>Eo(t*e/o)))}function No(e,t){return e.map((e=>(0,Nt.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const Po=["core/column"];const Io=(0,st.withDispatch)(((e,t,n)=>({updateAlignment(o){const{clientId:r,setAttributes:a}=t,{updateBlockAttributes:l}=e(Qe.store),{getBlockOrder:i}=n.select(Qe.store);a({verticalAlignment:o});i(r).forEach((e=>{l(e,{verticalAlignment:o})}))},updateColumns(o,r){const{clientId:a}=t,{replaceInnerBlocks:l}=e(Qe.store),{getBlocks:i}=n.select(Qe.store);let s=i(a);const c=s.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}));const u=r>o;if(u&&c){const e=Eo(100/r);s=[...No(s,To(s,100-e)),...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column")))];else if(s=s.slice(0,-(o-r)),c){s=No(s,To(s,100))}l(a,s)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:o,updateColumns:r,clientId:a}=e;const{isStackedOnMobile:l,verticalAlignment:i}=t,{count:s}=(0,st.useSelect)((e=>({count:e(Qe.store).getBlockCount(a)})),[a]),c=at()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!l}),u=(0,Qe.useBlockProps)({className:c}),m=(0,Qe.useInnerBlocksProps)(u,{allowedBlocks:Po,orientation:"horizontal",renderAppender:!1});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:o,value:i})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,null,(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:s,onChange:e=>r(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,Oe.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,Ze.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),(0,Oe.createElement)("div",m))}));function zo(e){let{clientId:t,name:n,setAttributes:o}=e;const{blockType:r,defaultVariation:a,variations:l}=(0,st.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:r}=e(Ge.store);return{blockType:o(n),defaultVariation:r(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:i}=(0,st.useDispatch)(Qe.store),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)("div",s,(0,Oe.createElement)(Qe.__experimentalBlockVariationPicker,{icon:(0,Nt.get)(r,["icon","src"]),label:(0,Nt.get)(r,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e.attributes&&o(e.attributes),e.innerBlocks&&i(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}var Mo=e=>{const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).getBlocks(t).length>0),[t])?Io:zo;return(0,Oe.createElement)(n,e)};var Ro=[{name:"one-column-full",title:(0,Ze.__)("100"),description:(0,Ze.__)("One column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,Ze.__)("50 / 50"),description:(0,Ze.__)("Two columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,Ze.__)("33 / 66"),description:(0,Ze.__)("Two columns; one-third, two-thirds split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,Ze.__)("66 / 33"),description:(0,Ze.__)("Two columns; two-thirds, one-third split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,Ze.__)("33 / 33 / 33"),description:(0,Ze.__)("Three columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,Ze.__)("25 / 50 / 25"),description:(0,Ze.__)("Three columns; wide center column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Lo={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:o,innerBlocks:r}=e;return["core/column",{width:`${t}%`},[[n,{...o},r]]]}));return(0,Ge.createBlock)("core/columns",{},(0,Ge.createBlocksFromInnerBlocksTemplate)(n))},isMatch:(e,t)=>{let{length:n}=e;return(1!==t.length||"core/columns"!==t[0].name)&&(n&&n<=6)}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:r,style:a,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:p}=e;let g;if("image"!==u&&u)g=["core/video",{id:i,src:m}];else{g=["core/image",{...{id:i,alt:l,url:m,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${d}%`},[g]],["core/column",{width:100-d+"%"},t]];return"right"===s&&h.reverse(),(0,Ge.createBlock)("core/columns",{align:n,backgroundColor:o,textColor:r,style:a,verticalAlignment:p},(0,Ge.createBlocksFromInnerBlocksTemplate)(h))}}],to:[{type:"block",blocks:["*"],transform:(e,t)=>t.flatMap((e=>e.innerBlocks))}]};var Ho=Lo;const Ao={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Vo}=Ao,Fo={icon:ko,variations:Ro,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:wo,edit:Mo,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,r=at()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),a=Qe.useBlockProps.save({className:r}),l=Qe.useInnerBlocksProps.save(a);return(0,Oe.createElement)("div",l)},transforms:Ho},Do=()=>je({name:Vo,metadata:Ao,settings:Fo});var $o=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"}));var Go=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:2,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save(e){let{attributes:{tagName:t}}=e;const n=Qe.useBlockProps.save(),{className:o}=n,r=(null==o?void 0:o.split(" "))||[],a=null==r?void 0:r.filter((e=>"wp-block-comments"!==e)),l={...n,className:a.join(" ")};return(0,Oe.createElement)(t,l,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];function Oo(e){let{attributes:{tagName:t},setAttributes:n}=e;const o={section:(0,Ze.__)("The
element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,Ze.__)("The