diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php
index d84700b361..58184baff6 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'), 'version' => '3156534cc54473497e14'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '238360e96c76d37a2468'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '3623a576c78df404ff20'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '10dce9b814bcaf11beef'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => '5036d711d11c0f25d0ad'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'c873e8297fa597560fbf'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '3bdd64155a33d21dc694'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => '14ee29ad1743be844b11'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'e6aa7d1df684af0474b5'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '6f9fbd442ced90fef1d1'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'afcb83dba96ea45361e9'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '613064692ba0de319f4c'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '42a5462097681fd98f6f'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'fe6c4835cd00e12493c3'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'b2f083170ed22ebef396'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'f3a673a30f968c8fa314'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'b6d11176eec96d4410f9'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => 'b55e95d000bd2a901cd2'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '9a04bb29c0759b535e9e'), 'editor.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'c0c98fa65bbf7ce9b052'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'a4eeeadd23c0d7ab1d2d'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'f813b03986e369dad65e'), 'hooks.min.js' => array('dependencies' => array(), 'version' => '4d63a3d491d11ffd8ac6'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '32686e58e84193ce808b'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'ece12b3c74315b4175ef'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => 'c3dd622ad8417c2d4474'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9a0dc535fe222ae46a48'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '6497476653868ae9d711'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '20303a2de19246c83e5a'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '4aa23582b858c882a887'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '9307a8c9e3254140a223'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'aef2543ab60c8c9bb609'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '0f8478f1ba7e0eea562b'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => '71b945a4f0f8ce5a037d'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '73735a77e4e5095733da'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '74178fc8c4d67d66f1a8'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '517fbc2dbcabd4a86568'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '345a014347e34be995f0'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '08cc10e9532531e22456'), 'token-list.min.js' => array('dependencies' => array(), 'version' => '3b5f5dcfde830ecef24f'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6bf93e90403a1eec6501'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '829c9a30d366e1e5054c'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '0b561f75d41627a9d110'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => '55d8c2bf3dc99e7ea5ec'));
+ array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '3156534cc54473497e14'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '238360e96c76d37a2468'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '3623a576c78df404ff20'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '10dce9b814bcaf11beef'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => '3715c435d028ee482f19'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'c873e8297fa597560fbf'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '84530c06a3c62815b497'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => '14ee29ad1743be844b11'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '978744e9ebe563552704'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '84bcf832a5c99203f3db'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'afcb83dba96ea45361e9'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '613064692ba0de319f4c'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '42a5462097681fd98f6f'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'fe6c4835cd00e12493c3'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '85ff222add187a4e358f'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'f3a673a30f968c8fa314'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'b6d11176eec96d4410f9'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => 'b59259191f7026200e68'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '9a04bb29c0759b535e9e'), 'editor.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'be527deda65d31eb2f70'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'a4eeeadd23c0d7ab1d2d'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'f813b03986e369dad65e'), 'hooks.min.js' => array('dependencies' => array(), 'version' => '4d63a3d491d11ffd8ac6'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '32686e58e84193ce808b'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'ece12b3c74315b4175ef'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => 'c3dd622ad8417c2d4474'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '9a0dc535fe222ae46a48'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '6497476653868ae9d711'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '20303a2de19246c83e5a'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '4aa23582b858c882a887'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => '9307a8c9e3254140a223'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => 'aef2543ab60c8c9bb609'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '0f8478f1ba7e0eea562b'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => '8bb92d45458b29590f53'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '73735a77e4e5095733da'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '74178fc8c4d67d66f1a8'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '517fbc2dbcabd4a86568'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '345a014347e34be995f0'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '08cc10e9532531e22456'), 'token-list.min.js' => array('dependencies' => array(), 'version' => '3b5f5dcfde830ecef24f'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6bf93e90403a1eec6501'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '829c9a30d366e1e5054c'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '0b561f75d41627a9d110'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => '55d8c2bf3dc99e7ea5ec'));
diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php
index 7c9c87323e..a63698812d 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'), 'version' => '604a4359a838a9073d9f'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => 'dfaab3186d5cfee4a4c2'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '52446bd41c30bc419a05'), 'autop.js' => array('dependencies' => array(), 'version' => 'a0567e518e6863383ace'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '65d38acd0a443932b695'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'eb738cd63c38c7c74ca0'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => 'f69808d2ccdef50f0a0f'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'a30ea530249f33300bf1'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '8753e41399e407f0705c'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'afc09c8bf245fe46c7a0'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '460eddfcd99fafd06712'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '5a9e1443496d9cdcb291'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'a0115e38272e1800dbd2'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '14c7e3854c9f96a13e52'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '96ce1edc9b683b77847c'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '2797f012cdb7d180a746'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => 'e31cdcc73f3eea4fbe01'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => 'e57c1cf4ea424525f320'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '741e32edb0e7c2dd30da'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => '5c5821604f66f88e084b'), 'dom-ready.js' => array('dependencies' => array(), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'dc4a9715e6f20ec85889'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '2fe552a9358271d6f020'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '47b223cb88d85c713a6b'), 'editor.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '192ba6e70beae2fc42bf'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '6bd445740b34f5eae604'), 'escape-html.js' => array('dependencies' => array(), 'version' => '93558693d672af42c190'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '36151f5b565e0cdf6ddc'), 'hooks.js' => array('dependencies' => array(), 'version' => 'be67dc331e61e06d52fa'), 'html-entities.js' => array('dependencies' => array(), 'version' => '0d1913e5b8fb9137bad2'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '5edc734adb78e0d7d00e'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => '58ed73f7376c883f832b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => 'c0e19c4aa8550cb4f71d'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => '2bad5660ad4ebde6540c'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'ad48bd203f06c82d4c77'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '6c862a9b6eee311930ac'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bb7ea4346f0c7a77df98'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'a8290a113a755fbd665b'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ea1ca8506283289a8aeb'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '7313a68349c296697e15'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => 'f49ac7669ac11f416b6f'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'a5baddbc610561581693'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '66632613c3c6b0ed6f76'), 'priority-queue.js' => array('dependencies' => array(), 'version' => 'be4e4334602693fa7256'), 'private-apis.js' => array('dependencies' => array(), 'version' => '18ea1d568a3bfd485afb'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '35aec385f9088222e2bc'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '03eefa7ca729412606a7'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => 'bc76e6f025d3556aa54a'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '74a6aae8a222653c5cdc'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '5058284dc05b1b1b2661'), 'shortcode.js' => array('dependencies' => array(), 'version' => '37060a10de8dd991d95d'), 'style-engine.js' => array('dependencies' => array(), 'version' => '95bc9b8c9f4f0e8a6423'), 'token-list.js' => array('dependencies' => array(), 'version' => '09fdc83606f766278b8b'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'de0b7a9192bc77a4d766'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '82036eb97185ee78762b'), 'warning.js' => array('dependencies' => array(), 'version' => '4ecd4ff4d8fa94314090'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'b2d3d6f0ca283bd27cbc'), 'wordcount.js' => array('dependencies' => array(), 'version' => 'f5354b03b95c624877fb'));
+ array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '604a4359a838a9073d9f'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => 'dfaab3186d5cfee4a4c2'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '52446bd41c30bc419a05'), 'autop.js' => array('dependencies' => array(), 'version' => 'a0567e518e6863383ace'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '65d38acd0a443932b695'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'eb738cd63c38c7c74ca0'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => 'bb199ee78fe438dd0a02'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'a30ea530249f33300bf1'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => 'e851ee8e9644a9abf7ed'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'afc09c8bf245fe46c7a0'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'e7bf4e3486d6b78b6945'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => 'ccc1a46c6a7b3734d300'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'a0115e38272e1800dbd2'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '14c7e3854c9f96a13e52'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '96ce1edc9b683b77847c'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => '2797f012cdb7d180a746'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => 'e31cdcc73f3eea4fbe01'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '93f88d98de5601d8a46d'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '741e32edb0e7c2dd30da'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => '5c5821604f66f88e084b'), 'dom-ready.js' => array('dependencies' => array(), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'dc4a9715e6f20ec85889'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '7687a788531141ca9d91'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '47b223cb88d85c713a6b'), 'editor.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '5650272c1cbcfdcb2104'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '6bd445740b34f5eae604'), 'escape-html.js' => array('dependencies' => array(), 'version' => '93558693d672af42c190'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '36151f5b565e0cdf6ddc'), 'hooks.js' => array('dependencies' => array(), 'version' => 'be67dc331e61e06d52fa'), 'html-entities.js' => array('dependencies' => array(), 'version' => '0d1913e5b8fb9137bad2'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '5edc734adb78e0d7d00e'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => '58ed73f7376c883f832b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => 'c0e19c4aa8550cb4f71d'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => '2bad5660ad4ebde6540c'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'ad48bd203f06c82d4c77'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '6c862a9b6eee311930ac'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bb7ea4346f0c7a77df98'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'a8290a113a755fbd665b'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ea1ca8506283289a8aeb'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '7313a68349c296697e15'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => 'f49ac7669ac11f416b6f'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'a5baddbc610561581693'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '66632613c3c6b0ed6f76'), 'priority-queue.js' => array('dependencies' => array(), 'version' => 'be4e4334602693fa7256'), 'private-apis.js' => array('dependencies' => array(), 'version' => '18ea1d568a3bfd485afb'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '9473249104d09cb1245d'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '03eefa7ca729412606a7'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => 'bc76e6f025d3556aa54a'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '74a6aae8a222653c5cdc'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '5058284dc05b1b1b2661'), 'shortcode.js' => array('dependencies' => array(), 'version' => '37060a10de8dd991d95d'), 'style-engine.js' => array('dependencies' => array(), 'version' => '95bc9b8c9f4f0e8a6423'), 'token-list.js' => array('dependencies' => array(), 'version' => '09fdc83606f766278b8b'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'de0b7a9192bc77a4d766'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => '82036eb97185ee78762b'), 'warning.js' => array('dependencies' => array(), 'version' => '4ecd4ff4d8fa94314090'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'b2d3d6f0ca283bd27cbc'), 'wordcount.js' => array('dependencies' => array(), 'version' => 'f5354b03b95c624877fb'));
diff --git a/wp-includes/assets/script-loader-react-refresh-entry.min.php b/wp-includes/assets/script-loader-react-refresh-entry.min.php
index ca82a47e72..a433cd01f1 100644
--- a/wp-includes/assets/script-loader-react-refresh-entry.min.php
+++ b/wp-includes/assets/script-loader-react-refresh-entry.min.php
@@ -1 +1 @@
- array('wp-react-refresh-runtime'), 'version' => '7f2b9b64306bff9c719f');
+ array('wp-react-refresh-runtime'), 'version' => '461b2e321e6e009f2209');
diff --git a/wp-includes/assets/script-loader-react-refresh-entry.php b/wp-includes/assets/script-loader-react-refresh-entry.php
index ca82a47e72..a433cd01f1 100644
--- a/wp-includes/assets/script-loader-react-refresh-entry.php
+++ b/wp-includes/assets/script-loader-react-refresh-entry.php
@@ -1 +1 @@
- array('wp-react-refresh-runtime'), 'version' => '7f2b9b64306bff9c719f');
+ array('wp-react-refresh-runtime'), 'version' => '461b2e321e6e009f2209');
diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js
index 843fdba755..5a60b41fd3 100644
--- a/wp-includes/js/dist/block-editor.js
+++ b/wp-includes/js/dist/block-editor.js
@@ -1,2258 +1,14 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 4306:
-/***/ (function(module, exports) {
+/***/ 197:
+/***/ (() => {
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- autosize 4.0.4
- license: MIT
- http://www.jacklmoore.com/autosize
-*/
-(function (global, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else { var mod; }
-})(this, function (module, exports) {
- 'use strict';
-
- var map = typeof Map === "function" ? new Map() : function () {
- var keys = [];
- var values = [];
-
- return {
- has: function has(key) {
- return keys.indexOf(key) > -1;
- },
- get: function get(key) {
- return values[keys.indexOf(key)];
- },
- set: function set(key, value) {
- if (keys.indexOf(key) === -1) {
- keys.push(key);
- values.push(value);
- }
- },
- delete: function _delete(key) {
- var index = keys.indexOf(key);
- if (index > -1) {
- keys.splice(index, 1);
- values.splice(index, 1);
- }
- }
- };
- }();
-
- var createEvent = function createEvent(name) {
- return new Event(name, { bubbles: true });
- };
- try {
- new Event('test');
- } catch (e) {
- // IE does not support `new Event()`
- createEvent = function createEvent(name) {
- var evt = document.createEvent('Event');
- evt.initEvent(name, true, false);
- return evt;
- };
- }
-
- function assign(ta) {
- if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
-
- var heightOffset = null;
- var clientWidth = null;
- var cachedHeight = null;
-
- function init() {
- var style = window.getComputedStyle(ta, null);
-
- if (style.resize === 'vertical') {
- ta.style.resize = 'none';
- } else if (style.resize === 'both') {
- ta.style.resize = 'horizontal';
- }
-
- if (style.boxSizing === 'content-box') {
- heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
- } else {
- heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
- }
- // Fix when a textarea is not on document body and heightOffset is Not a Number
- if (isNaN(heightOffset)) {
- heightOffset = 0;
- }
-
- update();
- }
-
- function changeOverflow(value) {
- {
- // Chrome/Safari-specific fix:
- // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
- // made available by removing the scrollbar. The following forces the necessary text reflow.
- var width = ta.style.width;
- ta.style.width = '0px';
- // Force reflow:
- /* jshint ignore:start */
- ta.offsetWidth;
- /* jshint ignore:end */
- ta.style.width = width;
- }
-
- ta.style.overflowY = value;
- }
-
- function getParentOverflows(el) {
- var arr = [];
-
- while (el && el.parentNode && el.parentNode instanceof Element) {
- if (el.parentNode.scrollTop) {
- arr.push({
- node: el.parentNode,
- scrollTop: el.parentNode.scrollTop
- });
- }
- el = el.parentNode;
- }
-
- return arr;
- }
-
- function resize() {
- if (ta.scrollHeight === 0) {
- // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
- return;
- }
-
- var overflows = getParentOverflows(ta);
- var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
-
- ta.style.height = '';
- ta.style.height = ta.scrollHeight + heightOffset + 'px';
-
- // used to check if an update is actually necessary on window.resize
- clientWidth = ta.clientWidth;
-
- // prevents scroll-position jumping
- overflows.forEach(function (el) {
- el.node.scrollTop = el.scrollTop;
- });
-
- if (docTop) {
- document.documentElement.scrollTop = docTop;
- }
- }
-
- function update() {
- resize();
-
- var styleHeight = Math.round(parseFloat(ta.style.height));
- var computed = window.getComputedStyle(ta, null);
-
- // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
- var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
-
- // The actual height not matching the style height (set via the resize method) indicates that
- // the max-height has been exceeded, in which case the overflow should be allowed.
- if (actualHeight < styleHeight) {
- if (computed.overflowY === 'hidden') {
- changeOverflow('scroll');
- resize();
- actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
- }
- } else {
- // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
- if (computed.overflowY !== 'hidden') {
- changeOverflow('hidden');
- resize();
- actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
- }
- }
-
- if (cachedHeight !== actualHeight) {
- cachedHeight = actualHeight;
- var evt = createEvent('autosize:resized');
- try {
- ta.dispatchEvent(evt);
- } catch (err) {
- // Firefox will throw an error on dispatchEvent for a detached element
- // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
- }
- }
- }
-
- var pageResize = function pageResize() {
- if (ta.clientWidth !== clientWidth) {
- update();
- }
- };
-
- var destroy = function (style) {
- window.removeEventListener('resize', pageResize, false);
- ta.removeEventListener('input', update, false);
- ta.removeEventListener('keyup', update, false);
- ta.removeEventListener('autosize:destroy', destroy, false);
- ta.removeEventListener('autosize:update', update, false);
-
- Object.keys(style).forEach(function (key) {
- ta.style[key] = style[key];
- });
-
- map.delete(ta);
- }.bind(ta, {
- height: ta.style.height,
- resize: ta.style.resize,
- overflowY: ta.style.overflowY,
- overflowX: ta.style.overflowX,
- wordWrap: ta.style.wordWrap
- });
-
- ta.addEventListener('autosize:destroy', destroy, false);
-
- // IE9 does not fire onpropertychange or oninput for deletions,
- // so binding to onkeyup to catch most of those events.
- // There is no way that I know of to detect something like 'cut' in IE9.
- if ('onpropertychange' in ta && 'oninput' in ta) {
- ta.addEventListener('keyup', update, false);
- }
-
- window.addEventListener('resize', pageResize, false);
- ta.addEventListener('input', update, false);
- ta.addEventListener('autosize:update', update, false);
- ta.style.overflowX = 'hidden';
- ta.style.wordWrap = 'break-word';
-
- map.set(ta, {
- destroy: destroy,
- update: update
- });
-
- init();
- }
-
- function destroy(ta) {
- var methods = map.get(ta);
- if (methods) {
- methods.destroy();
- }
- }
-
- function update(ta) {
- var methods = map.get(ta);
- if (methods) {
- methods.update();
- }
- }
-
- var autosize = null;
-
- // Do nothing in Node.js environment and IE8 (or lower)
- if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
- autosize = function autosize(el) {
- return el;
- };
- autosize.destroy = function (el) {
- return el;
- };
- autosize.update = function (el) {
- return el;
- };
- } else {
- autosize = function autosize(el, options) {
- if (el) {
- Array.prototype.forEach.call(el.length ? el : [el], function (x) {
- return assign(x, options);
- });
- }
- return el;
- };
- autosize.destroy = function (el) {
- if (el) {
- Array.prototype.forEach.call(el.length ? el : [el], destroy);
- }
- return el;
- };
- autosize.update = function (el) {
- if (el) {
- Array.prototype.forEach.call(el.length ? el : [el], update);
- }
- return el;
- };
- }
-
- exports.default = autosize;
- module.exports = exports['default'];
-});
+/* (ignored) */
/***/ }),
-/***/ 6109:
-/***/ ((module) => {
-
-// This code has been refactored for 140 bytes
-// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
-var computedStyle = function (el, prop, getComputedStyle) {
- getComputedStyle = window.getComputedStyle;
-
- // In one fell swoop
- return (
- // If we have getComputedStyle
- getComputedStyle ?
- // Query it
- // TODO: From CSS-Query notes, we might need (node, null) for FF
- getComputedStyle(el) :
-
- // Otherwise, we are in IE and use currentStyle
- el.currentStyle
- )[
- // Switch to camelCase for CSSOM
- // DEV: Grabbed from jQuery
- // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
- // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
- prop.replace(/-(\w)/gi, function (word, letter) {
- return letter.toUpperCase();
- })
- ];
-};
-
-module.exports = computedStyle;
-
-
-/***/ }),
-
-/***/ 5417:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-/*istanbul ignore start*/
-
-
-Object.defineProperty(exports, "__esModule", ({
- value: true
-}));
-exports["default"] = Diff;
-
-/*istanbul ignore end*/
-function Diff() {}
-
-Diff.prototype = {
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- diff: function diff(oldString, newString) {
- /*istanbul ignore start*/
- var
- /*istanbul ignore end*/
- options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var callback = options.callback;
-
- if (typeof options === 'function') {
- callback = options;
- options = {};
- }
-
- this.options = options;
- var self = this;
-
- function done(value) {
- if (callback) {
- setTimeout(function () {
- callback(undefined, value);
- }, 0);
- return true;
- } else {
- return value;
- }
- } // Allow subclasses to massage the input prior to running
-
-
- oldString = this.castInput(oldString);
- newString = this.castInput(newString);
- oldString = this.removeEmpty(this.tokenize(oldString));
- newString = this.removeEmpty(this.tokenize(newString));
- var newLen = newString.length,
- oldLen = oldString.length;
- var editLength = 1;
- var maxEditLength = newLen + oldLen;
- var bestPath = [{
- newPos: -1,
- components: []
- }]; // Seed editLength = 0, i.e. the content starts with the same values
-
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
-
- if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
- // Identity per the equality and tokenizer
- return done([{
- value: this.join(newString),
- count: newString.length
- }]);
- } // Main worker method. checks all permutations of a given edit length for acceptance.
-
-
- function execEditLength() {
- for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
- var basePath =
- /*istanbul ignore start*/
- void 0
- /*istanbul ignore end*/
- ;
-
- var addPath = bestPath[diagonalPath - 1],
- removePath = bestPath[diagonalPath + 1],
- _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
-
- if (addPath) {
- // No one else is going to attempt to use this value, clear it
- bestPath[diagonalPath - 1] = undefined;
- }
-
- var canAdd = addPath && addPath.newPos + 1 < newLen,
- canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
-
- if (!canAdd && !canRemove) {
- // If this path is a terminal then prune
- bestPath[diagonalPath] = undefined;
- continue;
- } // Select the diagonal that we want to branch from. We select the prior
- // path whose position in the new string is the farthest from the origin
- // and does not pass the bounds of the diff graph
-
-
- if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
- basePath = clonePath(removePath);
- self.pushComponent(basePath.components, undefined, true);
- } else {
- basePath = addPath; // No need to clone, we've pulled it from the list
-
- basePath.newPos++;
- self.pushComponent(basePath.components, true, undefined);
- }
-
- _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
-
- if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
- return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
- } else {
- // Otherwise track this path as a potential candidate and continue.
- bestPath[diagonalPath] = basePath;
- }
- }
-
- editLength++;
- } // Performs the length of edit iteration. Is a bit fugly as this has to support the
- // sync and async mode which is never fun. Loops over execEditLength until a value
- // is produced.
-
-
- if (callback) {
- (function exec() {
- setTimeout(function () {
- // This should not happen, but we want to be safe.
-
- /* istanbul ignore next */
- if (editLength > maxEditLength) {
- return callback();
- }
-
- if (!execEditLength()) {
- exec();
- }
- }, 0);
- })();
- } else {
- while (editLength <= maxEditLength) {
- var ret = execEditLength();
-
- if (ret) {
- return ret;
- }
- }
- }
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- pushComponent: function pushComponent(components, added, removed) {
- var last = components[components.length - 1];
-
- if (last && last.added === added && last.removed === removed) {
- // We need to clone here as the component clone operation is just
- // as shallow array clone
- components[components.length - 1] = {
- count: last.count + 1,
- added: added,
- removed: removed
- };
- } else {
- components.push({
- count: 1,
- added: added,
- removed: removed
- });
- }
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
- var newLen = newString.length,
- oldLen = oldString.length,
- newPos = basePath.newPos,
- oldPos = newPos - diagonalPath,
- commonCount = 0;
-
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
- newPos++;
- oldPos++;
- commonCount++;
- }
-
- if (commonCount) {
- basePath.components.push({
- count: commonCount
- });
- }
-
- basePath.newPos = newPos;
- return oldPos;
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- equals: function equals(left, right) {
- if (this.options.comparator) {
- return this.options.comparator(left, right);
- } else {
- return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
- }
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- removeEmpty: function removeEmpty(array) {
- var ret = [];
-
- for (var i = 0; i < array.length; i++) {
- if (array[i]) {
- ret.push(array[i]);
- }
- }
-
- return ret;
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- castInput: function castInput(value) {
- return value;
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- tokenize: function tokenize(value) {
- return value.split('');
- },
-
- /*istanbul ignore start*/
-
- /*istanbul ignore end*/
- join: function join(chars) {
- return chars.join('');
- }
-};
-
-function buildValues(diff, components, newString, oldString, useLongestToken) {
- var componentPos = 0,
- componentLen = components.length,
- newPos = 0,
- oldPos = 0;
-
- for (; componentPos < componentLen; componentPos++) {
- var component = components[componentPos];
-
- if (!component.removed) {
- if (!component.added && useLongestToken) {
- var value = newString.slice(newPos, newPos + component.count);
- value = value.map(function (value, i) {
- var oldValue = oldString[oldPos + i];
- return oldValue.length > value.length ? oldValue : value;
- });
- component.value = diff.join(value);
- } else {
- component.value = diff.join(newString.slice(newPos, newPos + component.count));
- }
-
- newPos += component.count; // Common case
-
- if (!component.added) {
- oldPos += component.count;
- }
- } else {
- component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
- oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
- // The diffing algorithm is tied to add then remove output and this is the simplest
- // route to get the desired output with minimal overhead.
-
- if (componentPos && components[componentPos - 1].added) {
- var tmp = components[componentPos - 1];
- components[componentPos - 1] = components[componentPos];
- components[componentPos] = tmp;
- }
- }
- } // Special case handle for when one terminal is ignored (i.e. whitespace).
- // For this case we merge the terminal into the prior string and drop the change.
- // This is only available for string mode.
-
-
- var lastComponent = components[componentLen - 1];
-
- if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
- components[componentLen - 2].value += lastComponent.value;
- components.pop();
- }
-
- return components;
-}
-
-function clonePath(path) {
- return {
- newPos: path.newPos,
- components: path.components.slice(0)
- };
-}
-
-
-/***/ }),
-
-/***/ 8021:
-/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-
-"use strict";
-var __webpack_unused_export__;
-/*istanbul ignore start*/
-
-
-__webpack_unused_export__ = ({
- value: true
-});
-exports.JJ = diffChars;
-__webpack_unused_export__ = void 0;
-
-/*istanbul ignore end*/
-var
-/*istanbul ignore start*/
-_base = _interopRequireDefault(__webpack_require__(5417))
-/*istanbul ignore end*/
-;
-
-/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/*istanbul ignore end*/
-var characterDiff = new
-/*istanbul ignore start*/
-_base
-/*istanbul ignore end*/
-.
-/*istanbul ignore start*/
-default
-/*istanbul ignore end*/
-();
-
-/*istanbul ignore start*/
-__webpack_unused_export__ = characterDiff;
-
-/*istanbul ignore end*/
-function diffChars(oldStr, newStr, options) {
- return characterDiff.diff(oldStr, newStr, options);
-}
-
-
-/***/ }),
-
-/***/ 7734:
-/***/ ((module) => {
-
-"use strict";
-
-
-// do not edit .js files directly - edit src/index.jst
-
-
- var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
-
-
-module.exports = function equal(a, b) {
- if (a === b) return true;
-
- if (a && b && typeof a == 'object' && typeof b == 'object') {
- if (a.constructor !== b.constructor) return false;
-
- var length, i, keys;
- if (Array.isArray(a)) {
- length = a.length;
- if (length != b.length) return false;
- for (i = length; i-- !== 0;)
- if (!equal(a[i], b[i])) return false;
- return true;
- }
-
-
- if ((a instanceof Map) && (b instanceof Map)) {
- if (a.size !== b.size) return false;
- for (i of a.entries())
- if (!b.has(i[0])) return false;
- for (i of a.entries())
- if (!equal(i[1], b.get(i[0]))) return false;
- return true;
- }
-
- if ((a instanceof Set) && (b instanceof Set)) {
- if (a.size !== b.size) return false;
- for (i of a.entries())
- if (!b.has(i[0])) return false;
- return true;
- }
-
- if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
- length = a.length;
- if (length != b.length) return false;
- for (i = length; i-- !== 0;)
- if (a[i] !== b[i]) return false;
- return true;
- }
-
-
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
-
- keys = Object.keys(a);
- length = keys.length;
- if (length !== Object.keys(b).length) return false;
-
- for (i = length; i-- !== 0;)
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
-
- for (i = length; i-- !== 0;) {
- var key = keys[i];
-
- if (!equal(a[key], b[key])) return false;
- }
-
- return true;
- }
-
- // true if both NaN, false otherwise
- return a!==a && b!==b;
-};
-
-
-/***/ }),
-
-/***/ 5215:
-/***/ ((module) => {
-
-"use strict";
-
-
-// do not edit .js files directly - edit src/index.jst
-
-
-
-module.exports = function equal(a, b) {
- if (a === b) return true;
-
- if (a && b && typeof a == 'object' && typeof b == 'object') {
- if (a.constructor !== b.constructor) return false;
-
- var length, i, keys;
- if (Array.isArray(a)) {
- length = a.length;
- if (length != b.length) return false;
- for (i = length; i-- !== 0;)
- if (!equal(a[i], b[i])) return false;
- return true;
- }
-
-
-
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
-
- keys = Object.keys(a);
- length = keys.length;
- if (length !== Object.keys(b).length) return false;
-
- for (i = length; i-- !== 0;)
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
-
- for (i = length; i-- !== 0;) {
- var key = keys[i];
-
- if (!equal(a[key], b[key])) return false;
- }
-
- return true;
- }
-
- // true if both NaN, false otherwise
- return a!==a && b!==b;
-};
-
-
-/***/ }),
-
-/***/ 461:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-// Load in dependencies
-var computedStyle = __webpack_require__(6109);
-
-/**
- * Calculate the `line-height` of a given node
- * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
- * @returns {Number} `line-height` of the element in pixels
- */
-function lineHeight(node) {
- // Grab the line-height via style
- var lnHeightStr = computedStyle(node, 'line-height');
- var lnHeight = parseFloat(lnHeightStr, 10);
-
- // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
- if (lnHeightStr === lnHeight + '') {
- // Save the old lineHeight style and update the em unit to the element
- var _lnHeightStyle = node.style.lineHeight;
- node.style.lineHeight = lnHeightStr + 'em';
-
- // Calculate the em based height
- lnHeightStr = computedStyle(node, 'line-height');
- lnHeight = parseFloat(lnHeightStr, 10);
-
- // Revert the lineHeight style
- if (_lnHeightStyle) {
- node.style.lineHeight = _lnHeightStyle;
- } else {
- delete node.style.lineHeight;
- }
- }
-
- // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
- // DEV: `em` units are converted to `pt` in IE6
- // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
- if (lnHeightStr.indexOf('pt') !== -1) {
- lnHeight *= 4;
- lnHeight /= 3;
- // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
- } else if (lnHeightStr.indexOf('mm') !== -1) {
- lnHeight *= 96;
- lnHeight /= 25.4;
- // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
- } else if (lnHeightStr.indexOf('cm') !== -1) {
- lnHeight *= 96;
- lnHeight /= 2.54;
- // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
- } else if (lnHeightStr.indexOf('in') !== -1) {
- lnHeight *= 96;
- // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
- } else if (lnHeightStr.indexOf('pc') !== -1) {
- lnHeight *= 16;
- }
-
- // Continue our computation
- lnHeight = Math.round(lnHeight);
-
- // If the line-height is "normal", calculate by font-size
- if (lnHeightStr === 'normal') {
- // Create a temporary node
- var nodeName = node.nodeName;
- var _node = document.createElement(nodeName);
- _node.innerHTML = ' ';
-
- // If we have a text area, reset it to only 1 row
- // https://github.com/twolfson/line-height/issues/4
- if (nodeName.toUpperCase() === 'TEXTAREA') {
- _node.setAttribute('rows', '1');
- }
-
- // Set the font-size of the element
- var fontSizeStr = computedStyle(node, 'font-size');
- _node.style.fontSize = fontSizeStr;
-
- // Remove default padding/border which can affect offset height
- // https://github.com/twolfson/line-height/issues/4
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
- _node.style.padding = '0px';
- _node.style.border = '0px';
-
- // Append it to the body
- var body = document.body;
- body.appendChild(_node);
-
- // Assume the line height of the element is the height
- var height = _node.offsetHeight;
- lnHeight = height;
-
- // Remove our child from the DOM
- body.removeChild(_node);
- }
-
- // Return the calculated height
- return lnHeight;
-}
-
-// Export lineHeight
-module.exports = lineHeight;
-
-
-/***/ }),
-
-/***/ 7520:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-module.exports = __webpack_require__(7191);
-
-
-/***/ }),
-
-/***/ 8202:
-/***/ ((module) => {
-
-"use strict";
-/**
- * Copyright (c) 2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @providesModule ExecutionEnvironment
- */
-
-/*jslint evil: true */
-
-
-
-var canUseDOM = !!(
- typeof window !== 'undefined' &&
- window.document &&
- window.document.createElement
-);
-
-/**
- * Simple, lightweight module assisting with the detection and context of
- * Worker. Helps avoid circular dependencies and allows code to reason about
- * whether or not they are in a Worker, even if they never include the main
- * `ReactWorker` dependency.
- */
-var ExecutionEnvironment = {
-
- canUseDOM: canUseDOM,
-
- canUseWorkers: typeof Worker !== 'undefined',
-
- canUseEventListeners:
- canUseDOM && !!(window.addEventListener || window.attachEvent),
-
- canUseViewport: canUseDOM && !!window.screen,
-
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
-
-};
-
-module.exports = ExecutionEnvironment;
-
-
-/***/ }),
-
-/***/ 2213:
-/***/ ((module) => {
-
-/**
- * Copyright 2004-present Facebook. All Rights Reserved.
- *
- * @providesModule UserAgent_DEPRECATED
- */
-
-/**
- * Provides entirely client-side User Agent and OS detection. You should prefer
- * the non-deprecated UserAgent module when possible, which exposes our
- * authoritative server-side PHP-based detection to the client.
- *
- * Usage is straightforward:
- *
- * if (UserAgent_DEPRECATED.ie()) {
- * // IE
- * }
- *
- * You can also do version checks:
- *
- * if (UserAgent_DEPRECATED.ie() >= 7) {
- * // IE7 or better
- * }
- *
- * The browser functions will return NaN if the browser does not match, so
- * you can also do version compares the other way:
- *
- * if (UserAgent_DEPRECATED.ie() < 7) {
- * // IE6 or worse
- * }
- *
- * Note that the version is a float and may include a minor version number,
- * so you should always use range operators to perform comparisons, not
- * strict equality.
- *
- * **Note:** You should **strongly** prefer capability detection to browser
- * version detection where it's reasonable:
- *
- * http://www.quirksmode.org/js/support.html
- *
- * Further, we have a large number of mature wrapper functions and classes
- * which abstract away many browser irregularities. Check the documentation,
- * grep for things, or ask on javascript@lists.facebook.com before writing yet
- * another copy of "event || window.event".
- *
- */
-
-var _populated = false;
-
-// Browsers
-var _ie, _firefox, _opera, _webkit, _chrome;
-
-// Actual IE browser for compatibility mode
-var _ie_real_version;
-
-// Platforms
-var _osx, _windows, _linux, _android;
-
-// Architectures
-var _win64;
-
-// Devices
-var _iphone, _ipad, _native;
-
-var _mobile;
-
-function _populate() {
- if (_populated) {
- return;
- }
-
- _populated = true;
-
- // To work around buggy JS libraries that can't handle multi-digit
- // version numbers, Opera 10's user agent string claims it's Opera
- // 9, then later includes a Version/X.Y field:
- //
- // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
- var uas = navigator.userAgent;
- var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
- var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
-
- _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
- _ipad = /\b(iP[ao]d)/.exec(uas);
- _android = /Android/i.exec(uas);
- _native = /FBAN\/\w+;/i.exec(uas);
- _mobile = /Mobile/i.exec(uas);
-
- // Note that the IE team blog would have you believe you should be checking
- // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
- // from either x64 or ia64; so ultimately, you should just check for Win64
- // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
- // Windows will send 'WOW64' instead.
- _win64 = !!(/Win64/.exec(uas));
-
- if (agent) {
- _ie = agent[1] ? parseFloat(agent[1]) : (
- agent[5] ? parseFloat(agent[5]) : NaN);
- // IE compatibility mode
- if (_ie && document && document.documentMode) {
- _ie = document.documentMode;
- }
- // grab the "true" ie version from the trident token if available
- var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
- _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
-
- _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
- _opera = agent[3] ? parseFloat(agent[3]) : NaN;
- _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
- if (_webkit) {
- // We do not add the regexp to the above test, because it will always
- // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
- // the userAgent string.
- agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
- _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
- } else {
- _chrome = NaN;
- }
- } else {
- _ie = _firefox = _opera = _chrome = _webkit = NaN;
- }
-
- if (os) {
- if (os[1]) {
- // Detect OS X version. If no version number matches, set _osx to true.
- // Version examples: 10, 10_6_1, 10.7
- // Parses version number as a float, taking only first two sets of
- // digits. If only one set of digits is found, returns just the major
- // version number.
- var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
-
- _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
- } else {
- _osx = false;
- }
- _windows = !!os[2];
- _linux = !!os[3];
- } else {
- _osx = _windows = _linux = false;
- }
-}
-
-var UserAgent_DEPRECATED = {
-
- /**
- * Check if the UA is Internet Explorer.
- *
- *
- * @return float|NaN Version number (if match) or NaN.
- */
- ie: function() {
- return _populate() || _ie;
- },
-
- /**
- * Check if we're in Internet Explorer compatibility mode.
- *
- * @return bool true if in compatibility mode, false if
- * not compatibility mode or not ie
- */
- ieCompatibilityMode: function() {
- return _populate() || (_ie_real_version > _ie);
- },
-
-
- /**
- * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
- * only need this because Skype can't handle 64-bit IE yet. We need to remove
- * this when we don't need it -- tracked by #601957.
- */
- ie64: function() {
- return UserAgent_DEPRECATED.ie() && _win64;
- },
-
- /**
- * Check if the UA is Firefox.
- *
- *
- * @return float|NaN Version number (if match) or NaN.
- */
- firefox: function() {
- return _populate() || _firefox;
- },
-
-
- /**
- * Check if the UA is Opera.
- *
- *
- * @return float|NaN Version number (if match) or NaN.
- */
- opera: function() {
- return _populate() || _opera;
- },
-
-
- /**
- * Check if the UA is WebKit.
- *
- *
- * @return float|NaN Version number (if match) or NaN.
- */
- webkit: function() {
- return _populate() || _webkit;
- },
-
- /**
- * For Push
- * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
- */
- safari: function() {
- return UserAgent_DEPRECATED.webkit();
- },
-
- /**
- * Check if the UA is a Chrome browser.
- *
- *
- * @return float|NaN Version number (if match) or NaN.
- */
- chrome : function() {
- return _populate() || _chrome;
- },
-
-
- /**
- * Check if the user is running Windows.
- *
- * @return bool `true' if the user's OS is Windows.
- */
- windows: function() {
- return _populate() || _windows;
- },
-
-
- /**
- * Check if the user is running Mac OS X.
- *
- * @return float|bool Returns a float if a version number is detected,
- * otherwise true/false.
- */
- osx: function() {
- return _populate() || _osx;
- },
-
- /**
- * Check if the user is running Linux.
- *
- * @return bool `true' if the user's OS is some flavor of Linux.
- */
- linux: function() {
- return _populate() || _linux;
- },
-
- /**
- * Check if the user is running on an iPhone or iPod platform.
- *
- * @return bool `true' if the user is running some flavor of the
- * iPhone OS.
- */
- iphone: function() {
- return _populate() || _iphone;
- },
-
- mobile: function() {
- return _populate() || (_iphone || _ipad || _android || _mobile);
- },
-
- nativeApp: function() {
- // webviews inside of the native apps
- return _populate() || _native;
- },
-
- android: function() {
- return _populate() || _android;
- },
-
- ipad: function() {
- return _populate() || _ipad;
- }
-};
-
-module.exports = UserAgent_DEPRECATED;
-
-
-/***/ }),
-
-/***/ 1087:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-/**
- * Copyright 2013-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @providesModule isEventSupported
- */
-
-
-
-var ExecutionEnvironment = __webpack_require__(8202);
-
-var useHasFeature;
-if (ExecutionEnvironment.canUseDOM) {
- useHasFeature =
- document.implementation &&
- document.implementation.hasFeature &&
- // always returns true in newer browsers as per the standard.
- // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
- document.implementation.hasFeature('', '') !== true;
-}
-
-/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @param {?boolean} capture Check if the capture phase is supported.
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-function isEventSupported(eventNameSuffix, capture) {
- if (!ExecutionEnvironment.canUseDOM ||
- capture && !('addEventListener' in document)) {
- return false;
- }
-
- var eventName = 'on' + eventNameSuffix;
- var isSupported = eventName in document;
-
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
-
- if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
- // This is the only way to test support for the `wheel` event in IE9+.
- isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
- }
-
- return isSupported;
-}
-
-module.exports = isEventSupported;
-
-
-/***/ }),
-
-/***/ 7191:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-/**
- * Copyright (c) 2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @providesModule normalizeWheel
- * @typechecks
- */
-
-
-
-var UserAgent_DEPRECATED = __webpack_require__(2213);
-
-var isEventSupported = __webpack_require__(1087);
-
-
-// Reasonable defaults
-var PIXEL_STEP = 10;
-var LINE_HEIGHT = 40;
-var PAGE_HEIGHT = 800;
-
-/**
- * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
- * complicated, thus this doc is long and (hopefully) detailed enough to answer
- * your questions.
- *
- * If you need to react to the mouse wheel in a predictable way, this code is
- * like your bestest friend. * hugs *
- *
- * As of today, there are 4 DOM event types you can listen to:
- *
- * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
- * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
- * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
- * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
- *
- * So what to do? The is the best:
- *
- * normalizeWheel.getEventType();
- *
- * In your event callback, use this code to get sane interpretation of the
- * deltas. This code will return an object with properties:
- *
- * spinX -- normalized spin speed (use for zoom) - x plane
- * spinY -- " - y plane
- * pixelX -- normalized distance (to pixels) - x plane
- * pixelY -- " - y plane
- *
- * Wheel values are provided by the browser assuming you are using the wheel to
- * scroll a web page by a number of lines or pixels (or pages). Values can vary
- * significantly on different platforms and browsers, forgetting that you can
- * scroll at different speeds. Some devices (like trackpads) emit more events
- * at smaller increments with fine granularity, and some emit massive jumps with
- * linear speed or acceleration.
- *
- * This code does its best to normalize the deltas for you:
- *
- * - spin is trying to normalize how far the wheel was spun (or trackpad
- * dragged). This is super useful for zoom support where you want to
- * throw away the chunky scroll steps on the PC and make those equal to
- * the slow and smooth tiny steps on the Mac. Key data: This code tries to
- * resolve a single slow step on a wheel to 1.
- *
- * - pixel is normalizing the desired scroll delta in pixel units. You'll
- * get the crazy differences between browsers, but at least it'll be in
- * pixels!
- *
- * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
- * should translate to positive value zooming IN, negative zooming OUT.
- * This matches the newer 'wheel' event.
- *
- * Why are there spinX, spinY (or pixels)?
- *
- * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
- * with a mouse. It results in side-scrolling in the browser by default.
- *
- * - spinY is what you expect -- it's the classic axis of a mouse wheel.
- *
- * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
- * probably is by browsers in conjunction with fancy 3D controllers .. but
- * you know.
- *
- * Implementation info:
- *
- * Examples of 'wheel' event if you scroll slowly (down) by one step with an
- * average mouse:
- *
- * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
- * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
- * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
- * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
- * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
- *
- * On the trackpad:
- *
- * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
- * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
- *
- * On other/older browsers.. it's more complicated as there can be multiple and
- * also missing delta values.
- *
- * The 'wheel' event is more standard:
- *
- * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
- *
- * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
- * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
- * backward compatibility with older events. Those other values help us
- * better normalize spin speed. Example of what the browsers provide:
- *
- * | event.wheelDelta | event.detail
- * ------------------+------------------+--------------
- * Safari v5/OS X | -120 | 0
- * Safari v5/Win7 | -120 | 0
- * Chrome v17/OS X | -120 | 0
- * Chrome v17/Win7 | -120 | 0
- * IE9/Win7 | -120 | undefined
- * Firefox v4/OS X | undefined | 1
- * Firefox v4/Win7 | undefined | 3
- *
- */
-function normalizeWheel(/*object*/ event) /*object*/ {
- var sX = 0, sY = 0, // spinX, spinY
- pX = 0, pY = 0; // pixelX, pixelY
-
- // Legacy
- if ('detail' in event) { sY = event.detail; }
- if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
- if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
- if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
-
- // side scrolling on FF with DOMMouseScroll
- if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
- sX = sY;
- sY = 0;
- }
-
- pX = sX * PIXEL_STEP;
- pY = sY * PIXEL_STEP;
-
- if ('deltaY' in event) { pY = event.deltaY; }
- if ('deltaX' in event) { pX = event.deltaX; }
-
- if ((pX || pY) && event.deltaMode) {
- if (event.deltaMode == 1) { // delta in LINE units
- pX *= LINE_HEIGHT;
- pY *= LINE_HEIGHT;
- } else { // delta in PAGE units
- pX *= PAGE_HEIGHT;
- pY *= PAGE_HEIGHT;
- }
- }
-
- // Fall-back if spin cannot be determined
- if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
- if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
-
- return { spinX : sX,
- spinY : sY,
- pixelX : pX,
- pixelY : pY };
-}
-
-
-/**
- * The best combination if you prefer spinX + spinY normalization. It favors
- * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
- * 'wheel' event, making spin speed determination impossible.
- */
-normalizeWheel.getEventType = function() /*string*/ {
- return (UserAgent_DEPRECATED.firefox())
- ? 'DOMMouseScroll'
- : (isEventSupported('wheel'))
- ? 'wheel'
- : 'mousewheel';
-};
-
-module.exports = normalizeWheel;
-
-
-/***/ }),
-
-/***/ 2775:
-/***/ ((module) => {
-
-var x=String;
-var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
-module.exports=create();
-module.exports.createColors = create;
-
-
-/***/ }),
-
-/***/ 1443:
-/***/ ((module) => {
-
-module.exports = function postcssPrefixSelector(options) {
- const prefix = options.prefix;
- const prefixWithSpace = /\s+$/.test(prefix) ? prefix : `${prefix} `;
- const ignoreFiles = options.ignoreFiles ? [].concat(options.ignoreFiles) : [];
- const includeFiles = options.includeFiles
- ? [].concat(options.includeFiles)
- : [];
-
- return function (root) {
- if (
- ignoreFiles.length &&
- root.source.input.file &&
- isFileInArray(root.source.input.file, ignoreFiles)
- ) {
- return;
- }
- if (
- includeFiles.length &&
- root.source.input.file &&
- !isFileInArray(root.source.input.file, includeFiles)
- ) {
- return;
- }
-
- root.walkRules((rule) => {
- const keyframeRules = [
- 'keyframes',
- '-webkit-keyframes',
- '-moz-keyframes',
- '-o-keyframes',
- '-ms-keyframes',
- ];
-
- if (rule.parent && keyframeRules.includes(rule.parent.name)) {
- return;
- }
-
- rule.selectors = rule.selectors.map((selector) => {
- if (options.exclude && excludeSelector(selector, options.exclude)) {
- return selector;
- }
-
- if (options.transform) {
- return options.transform(
- prefix,
- selector,
- prefixWithSpace + selector,
- root.source.input.file,
- rule
- );
- }
-
- return prefixWithSpace + selector;
- });
- });
- };
-};
-
-function isFileInArray(file, arr) {
- return arr.some((ruleOrString) => {
- if (ruleOrString instanceof RegExp) {
- return ruleOrString.test(file);
- }
-
- return file.includes(ruleOrString);
- });
-}
-
-function excludeSelector(selector, excludeArr) {
- return excludeArr.some((excludeRule) => {
- if (excludeRule instanceof RegExp) {
- return excludeRule.test(selector);
- }
-
- return selector === excludeRule;
- });
-}
-
-
-/***/ }),
-
-/***/ 5404:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-const CSSValueParser = __webpack_require__(1544)
-
-/**
- * @type {import('postcss').PluginCreator}
- */
-module.exports = (opts) => {
-
- const DEFAULTS = {
- skipHostRelativeUrls: true,
- }
- const config = Object.assign(DEFAULTS, opts)
-
- return {
- postcssPlugin: 'rebaseUrl',
-
- Declaration(decl) {
- // The faster way to find Declaration node
- const parsedValue = CSSValueParser(decl.value)
-
- let valueChanged = false
- parsedValue.walk(node => {
- if (node.type !== 'function' || node.value !== 'url') {
- return
- }
-
- const urlVal = node.nodes[0].value
-
- // bases relative URLs with rootUrl
- const basedUrl = new URL(urlVal, opts.rootUrl)
-
- // skip host-relative, already normalized URLs (e.g. `/images/image.jpg`, without `..`s)
- if ((basedUrl.pathname === urlVal) && config.skipHostRelativeUrls) {
- return false // skip this value
- }
-
- node.nodes[0].value = basedUrl.toString()
- valueChanged = true
-
- return false // do not walk deeper
- })
-
- if (valueChanged) {
- decl.value = CSSValueParser.stringify(parsedValue)
- }
-
- }
- }
-}
-
-module.exports.postcss = true
-
-
-/***/ }),
-
-/***/ 1544:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-var parse = __webpack_require__(8491);
-var walk = __webpack_require__(3815);
-var stringify = __webpack_require__(4725);
-
-function ValueParser(value) {
- if (this instanceof ValueParser) {
- this.nodes = parse(value);
- return this;
- }
- return new ValueParser(value);
-}
-
-ValueParser.prototype.toString = function() {
- return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
-};
-
-ValueParser.prototype.walk = function(cb, bubble) {
- walk(this.nodes, cb, bubble);
- return this;
-};
-
-ValueParser.unit = __webpack_require__(1524);
-
-ValueParser.walk = walk;
-
-ValueParser.stringify = stringify;
-
-module.exports = ValueParser;
-
-
-/***/ }),
-
-/***/ 8491:
-/***/ ((module) => {
-
-var openParentheses = "(".charCodeAt(0);
-var closeParentheses = ")".charCodeAt(0);
-var singleQuote = "'".charCodeAt(0);
-var doubleQuote = '"'.charCodeAt(0);
-var backslash = "\\".charCodeAt(0);
-var slash = "/".charCodeAt(0);
-var comma = ",".charCodeAt(0);
-var colon = ":".charCodeAt(0);
-var star = "*".charCodeAt(0);
-var uLower = "u".charCodeAt(0);
-var uUpper = "U".charCodeAt(0);
-var plus = "+".charCodeAt(0);
-var isUnicodeRange = /^[a-f0-9?-]+$/i;
-
-module.exports = function(input) {
- var tokens = [];
- var value = input;
-
- var next,
- quote,
- prev,
- token,
- escape,
- escapePos,
- whitespacePos,
- parenthesesOpenPos;
- var pos = 0;
- var code = value.charCodeAt(pos);
- var max = value.length;
- var stack = [{ nodes: tokens }];
- var balanced = 0;
- var parent;
-
- var name = "";
- var before = "";
- var after = "";
-
- while (pos < max) {
- // Whitespaces
- if (code <= 32) {
- next = pos;
- do {
- next += 1;
- code = value.charCodeAt(next);
- } while (code <= 32);
- token = value.slice(pos, next);
-
- prev = tokens[tokens.length - 1];
- if (code === closeParentheses && balanced) {
- after = token;
- } else if (prev && prev.type === "div") {
- prev.after = token;
- prev.sourceEndIndex += token.length;
- } else if (
- code === comma ||
- code === colon ||
- (code === slash &&
- value.charCodeAt(next + 1) !== star &&
- (!parent ||
- (parent && parent.type === "function" && parent.value !== "calc")))
- ) {
- before = token;
- } else {
- tokens.push({
- type: "space",
- sourceIndex: pos,
- sourceEndIndex: next,
- value: token
- });
- }
-
- pos = next;
-
- // Quotes
- } else if (code === singleQuote || code === doubleQuote) {
- next = pos;
- quote = code === singleQuote ? "'" : '"';
- token = {
- type: "string",
- sourceIndex: pos,
- quote: quote
- };
- do {
- escape = false;
- next = value.indexOf(quote, next + 1);
- if (~next) {
- escapePos = next;
- while (value.charCodeAt(escapePos - 1) === backslash) {
- escapePos -= 1;
- escape = !escape;
- }
- } else {
- value += quote;
- next = value.length - 1;
- token.unclosed = true;
- }
- } while (escape);
- token.value = value.slice(pos + 1, next);
- token.sourceEndIndex = token.unclosed ? next : next + 1;
- tokens.push(token);
- pos = next + 1;
- code = value.charCodeAt(pos);
-
- // Comments
- } else if (code === slash && value.charCodeAt(pos + 1) === star) {
- next = value.indexOf("*/", pos);
-
- token = {
- type: "comment",
- sourceIndex: pos,
- sourceEndIndex: next + 2
- };
-
- if (next === -1) {
- token.unclosed = true;
- next = value.length;
- token.sourceEndIndex = next;
- }
-
- token.value = value.slice(pos + 2, next);
- tokens.push(token);
-
- pos = next + 2;
- code = value.charCodeAt(pos);
-
- // Operation within calc
- } else if (
- (code === slash || code === star) &&
- parent &&
- parent.type === "function" &&
- parent.value === "calc"
- ) {
- token = value[pos];
- tokens.push({
- type: "word",
- sourceIndex: pos - before.length,
- sourceEndIndex: pos + token.length,
- value: token
- });
- pos += 1;
- code = value.charCodeAt(pos);
-
- // Dividers
- } else if (code === slash || code === comma || code === colon) {
- token = value[pos];
-
- tokens.push({
- type: "div",
- sourceIndex: pos - before.length,
- sourceEndIndex: pos + token.length,
- value: token,
- before: before,
- after: ""
- });
- before = "";
-
- pos += 1;
- code = value.charCodeAt(pos);
-
- // Open parentheses
- } else if (openParentheses === code) {
- // Whitespaces after open parentheses
- next = pos;
- do {
- next += 1;
- code = value.charCodeAt(next);
- } while (code <= 32);
- parenthesesOpenPos = pos;
- token = {
- type: "function",
- sourceIndex: pos - name.length,
- value: name,
- before: value.slice(parenthesesOpenPos + 1, next)
- };
- pos = next;
-
- if (name === "url" && code !== singleQuote && code !== doubleQuote) {
- next -= 1;
- do {
- escape = false;
- next = value.indexOf(")", next + 1);
- if (~next) {
- escapePos = next;
- while (value.charCodeAt(escapePos - 1) === backslash) {
- escapePos -= 1;
- escape = !escape;
- }
- } else {
- value += ")";
- next = value.length - 1;
- token.unclosed = true;
- }
- } while (escape);
- // Whitespaces before closed
- whitespacePos = next;
- do {
- whitespacePos -= 1;
- code = value.charCodeAt(whitespacePos);
- } while (code <= 32);
- if (parenthesesOpenPos < whitespacePos) {
- if (pos !== whitespacePos + 1) {
- token.nodes = [
- {
- type: "word",
- sourceIndex: pos,
- sourceEndIndex: whitespacePos + 1,
- value: value.slice(pos, whitespacePos + 1)
- }
- ];
- } else {
- token.nodes = [];
- }
- if (token.unclosed && whitespacePos + 1 !== next) {
- token.after = "";
- token.nodes.push({
- type: "space",
- sourceIndex: whitespacePos + 1,
- sourceEndIndex: next,
- value: value.slice(whitespacePos + 1, next)
- });
- } else {
- token.after = value.slice(whitespacePos + 1, next);
- token.sourceEndIndex = next;
- }
- } else {
- token.after = "";
- token.nodes = [];
- }
- pos = next + 1;
- token.sourceEndIndex = token.unclosed ? next : pos;
- code = value.charCodeAt(pos);
- tokens.push(token);
- } else {
- balanced += 1;
- token.after = "";
- token.sourceEndIndex = pos + 1;
- tokens.push(token);
- stack.push(token);
- tokens = token.nodes = [];
- parent = token;
- }
- name = "";
-
- // Close parentheses
- } else if (closeParentheses === code && balanced) {
- pos += 1;
- code = value.charCodeAt(pos);
-
- parent.after = after;
- parent.sourceEndIndex += after.length;
- after = "";
- balanced -= 1;
- stack[stack.length - 1].sourceEndIndex = pos;
- stack.pop();
- parent = stack[balanced];
- tokens = parent.nodes;
-
- // Words
- } else {
- next = pos;
- do {
- if (code === backslash) {
- next += 1;
- }
- next += 1;
- code = value.charCodeAt(next);
- } while (
- next < max &&
- !(
- code <= 32 ||
- code === singleQuote ||
- code === doubleQuote ||
- code === comma ||
- code === colon ||
- code === slash ||
- code === openParentheses ||
- (code === star &&
- parent &&
- parent.type === "function" &&
- parent.value === "calc") ||
- (code === slash &&
- parent.type === "function" &&
- parent.value === "calc") ||
- (code === closeParentheses && balanced)
- )
- );
- token = value.slice(pos, next);
-
- if (openParentheses === code) {
- name = token;
- } else if (
- (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&
- plus === token.charCodeAt(1) &&
- isUnicodeRange.test(token.slice(2))
- ) {
- tokens.push({
- type: "unicode-range",
- sourceIndex: pos,
- sourceEndIndex: next,
- value: token
- });
- } else {
- tokens.push({
- type: "word",
- sourceIndex: pos,
- sourceEndIndex: next,
- value: token
- });
- }
-
- pos = next;
- }
- }
-
- for (pos = stack.length - 1; pos; pos -= 1) {
- stack[pos].unclosed = true;
- stack[pos].sourceEndIndex = value.length;
- }
-
- return stack[0].nodes;
-};
-
-
-/***/ }),
-
-/***/ 4725:
-/***/ ((module) => {
-
-function stringifyNode(node, custom) {
- var type = node.type;
- var value = node.value;
- var buf;
- var customResult;
-
- if (custom && (customResult = custom(node)) !== undefined) {
- return customResult;
- } else if (type === "word" || type === "space") {
- return value;
- } else if (type === "string") {
- buf = node.quote || "";
- return buf + value + (node.unclosed ? "" : buf);
- } else if (type === "comment") {
- return "/*" + value + (node.unclosed ? "" : "*/");
- } else if (type === "div") {
- return (node.before || "") + value + (node.after || "");
- } else if (Array.isArray(node.nodes)) {
- buf = stringify(node.nodes, custom);
- if (type !== "function") {
- return buf;
- }
- return (
- value +
- "(" +
- (node.before || "") +
- buf +
- (node.after || "") +
- (node.unclosed ? "" : ")")
- );
- }
- return value;
-}
-
-function stringify(nodes, custom) {
- var result, i;
-
- if (Array.isArray(nodes)) {
- result = "";
- for (i = nodes.length - 1; ~i; i -= 1) {
- result = stringifyNode(nodes[i], custom) + result;
- }
- return result;
- }
- return stringifyNode(nodes, custom);
-}
-
-module.exports = stringify;
-
-
-/***/ }),
-
-/***/ 1524:
-/***/ ((module) => {
-
-var minus = "-".charCodeAt(0);
-var plus = "+".charCodeAt(0);
-var dot = ".".charCodeAt(0);
-var exp = "e".charCodeAt(0);
-var EXP = "E".charCodeAt(0);
-
-// Check if three code points would start a number
-// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
-function likeNumber(value) {
- var code = value.charCodeAt(0);
- var nextCode;
-
- if (code === plus || code === minus) {
- nextCode = value.charCodeAt(1);
-
- if (nextCode >= 48 && nextCode <= 57) {
- return true;
- }
-
- var nextNextCode = value.charCodeAt(2);
-
- if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
- return true;
- }
-
- return false;
- }
-
- if (code === dot) {
- nextCode = value.charCodeAt(1);
-
- if (nextCode >= 48 && nextCode <= 57) {
- return true;
- }
-
- return false;
- }
-
- if (code >= 48 && code <= 57) {
- return true;
- }
-
- return false;
-}
-
-// Consume a number
-// https://www.w3.org/TR/css-syntax-3/#consume-number
-module.exports = function(value) {
- var pos = 0;
- var length = value.length;
- var code;
- var nextCode;
- var nextNextCode;
-
- if (length === 0 || !likeNumber(value)) {
- return false;
- }
-
- code = value.charCodeAt(pos);
-
- if (code === plus || code === minus) {
- pos++;
- }
-
- while (pos < length) {
- code = value.charCodeAt(pos);
-
- if (code < 48 || code > 57) {
- break;
- }
-
- pos += 1;
- }
-
- code = value.charCodeAt(pos);
- nextCode = value.charCodeAt(pos + 1);
-
- if (code === dot && nextCode >= 48 && nextCode <= 57) {
- pos += 2;
-
- while (pos < length) {
- code = value.charCodeAt(pos);
-
- if (code < 48 || code > 57) {
- break;
- }
-
- pos += 1;
- }
- }
-
- code = value.charCodeAt(pos);
- nextCode = value.charCodeAt(pos + 1);
- nextNextCode = value.charCodeAt(pos + 2);
-
- if (
- (code === exp || code === EXP) &&
- ((nextCode >= 48 && nextCode <= 57) ||
- ((nextCode === plus || nextCode === minus) &&
- nextNextCode >= 48 &&
- nextNextCode <= 57))
- ) {
- pos += nextCode === plus || nextCode === minus ? 3 : 2;
-
- while (pos < length) {
- code = value.charCodeAt(pos);
-
- if (code < 48 || code > 57) {
- break;
- }
-
- pos += 1;
- }
- }
-
- return {
- number: value.slice(0, pos),
- unit: value.slice(pos)
- };
-};
-
-
-/***/ }),
-
-/***/ 3815:
-/***/ ((module) => {
-
-module.exports = function walk(nodes, cb, bubble) {
- var i, max, node, result;
-
- for (i = 0, max = nodes.length; i < max; i += 1) {
- node = nodes[i];
- if (!bubble) {
- result = cb(node, i, nodes);
- }
-
- if (
- result !== false &&
- node.type === "function" &&
- Array.isArray(node.nodes)
- ) {
- walk(node.nodes, cb, bubble);
- }
-
- if (bubble) {
- cb(node, i, nodes);
- }
- }
-};
-
-
-/***/ }),
-
-/***/ 1326:
+/***/ 271:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
@@ -2260,503 +16,396 @@ module.exports = function walk(nodes, cb, bubble) {
let Container = __webpack_require__(683)
-class AtRule extends Container {
+let LazyResult, Processor
+
+class Document extends Container {
constructor(defaults) {
- super(defaults)
- this.type = 'atrule'
+ // type needs to be passed to super, otherwise child roots won't be normalized correctly
+ super({ type: 'document', ...defaults })
+
+ if (!this.nodes) {
+ this.nodes = []
+ }
}
- append(...children) {
- if (!this.proxyOf.nodes) this.nodes = []
- return super.append(...children)
- }
+ toResult(opts = {}) {
+ let lazy = new LazyResult(new Processor(), this, opts)
- prepend(...children) {
- if (!this.proxyOf.nodes) this.nodes = []
- return super.prepend(...children)
+ return lazy.stringify()
}
}
-module.exports = AtRule
-AtRule.default = AtRule
+Document.registerLazyResult = dependant => {
+ LazyResult = dependant
+}
-Container.registerAtRule(AtRule)
+Document.registerProcessor = dependant => {
+ Processor = dependant
+}
+
+module.exports = Document
+Document.default = Document
/***/ }),
-/***/ 6589:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 346:
+/***/ ((module) => {
"use strict";
-let Node = __webpack_require__(7490)
-
-class Comment extends Node {
- constructor(defaults) {
- super(defaults)
- this.type = 'comment'
- }
+const DEFAULT_RAW = {
+ after: '\n',
+ beforeClose: '\n',
+ beforeComment: '\n',
+ beforeDecl: '\n',
+ beforeOpen: ' ',
+ beforeRule: '\n',
+ colon: ': ',
+ commentLeft: ' ',
+ commentRight: ' ',
+ emptyBody: '',
+ indent: ' ',
+ semicolon: false
}
-module.exports = Comment
-Comment.default = Comment
-
-
-/***/ }),
-
-/***/ 683:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-
-
-let Comment = __webpack_require__(6589)
-let Declaration = __webpack_require__(1516)
-let Node = __webpack_require__(7490)
-let { isClean, my } = __webpack_require__(1381)
-
-let AtRule, parse, Root, Rule
-
-function cleanSource(nodes) {
- return nodes.map(i => {
- if (i.nodes) i.nodes = cleanSource(i.nodes)
- delete i.source
- return i
- })
+function capitalize(str) {
+ return str[0].toUpperCase() + str.slice(1)
}
-function markTreeDirty(node) {
- node[isClean] = false
- if (node.proxyOf.nodes) {
- for (let i of node.proxyOf.nodes) {
- markTreeDirty(i)
- }
+class Stringifier {
+ constructor(builder) {
+ this.builder = builder
}
-}
-class Container extends Node {
- append(...children) {
- for (let child of children) {
- let nodes = this.normalize(child, this.last)
- for (let node of nodes) this.proxyOf.nodes.push(node)
+ atrule(node, semicolon) {
+ let name = '@' + node.name
+ let params = node.params ? this.rawValue(node, 'params') : ''
+
+ if (typeof node.raws.afterName !== 'undefined') {
+ name += node.raws.afterName
+ } else if (params) {
+ name += ' '
}
- this.markDirty()
-
- return this
- }
-
- cleanRaws(keepBetween) {
- super.cleanRaws(keepBetween)
- if (this.nodes) {
- for (let node of this.nodes) node.cleanRaws(keepBetween)
- }
- }
-
- each(callback) {
- if (!this.proxyOf.nodes) return undefined
- let iterator = this.getIterator()
-
- let index, result
- while (this.indexes[iterator] < this.proxyOf.nodes.length) {
- index = this.indexes[iterator]
- result = callback(this.proxyOf.nodes[index], index)
- if (result === false) break
-
- this.indexes[iterator] += 1
- }
-
- delete this.indexes[iterator]
- return result
- }
-
- every(condition) {
- return this.nodes.every(condition)
- }
-
- getIterator() {
- if (!this.lastEach) this.lastEach = 0
- if (!this.indexes) this.indexes = {}
-
- this.lastEach += 1
- let iterator = this.lastEach
- this.indexes[iterator] = 0
-
- return iterator
- }
-
- getProxyProcessor() {
- return {
- get(node, prop) {
- if (prop === 'proxyOf') {
- return node
- } else if (!node[prop]) {
- return node[prop]
- } else if (
- prop === 'each' ||
- (typeof prop === 'string' && prop.startsWith('walk'))
- ) {
- return (...args) => {
- return node[prop](
- ...args.map(i => {
- if (typeof i === 'function') {
- return (child, index) => i(child.toProxy(), index)
- } else {
- return i
- }
- })
- )
- }
- } else if (prop === 'every' || prop === 'some') {
- return cb => {
- return node[prop]((child, ...other) =>
- cb(child.toProxy(), ...other)
- )
- }
- } else if (prop === 'root') {
- return () => node.root().toProxy()
- } else if (prop === 'nodes') {
- return node.nodes.map(i => i.toProxy())
- } else if (prop === 'first' || prop === 'last') {
- return node[prop].toProxy()
- } else {
- return node[prop]
- }
- },
-
- set(node, prop, value) {
- if (node[prop] === value) return true
- node[prop] = value
- if (prop === 'name' || prop === 'params' || prop === 'selector') {
- node.markDirty()
- }
- return true
- }
- }
- }
-
- index(child) {
- if (typeof child === 'number') return child
- if (child.proxyOf) child = child.proxyOf
- return this.proxyOf.nodes.indexOf(child)
- }
-
- insertAfter(exist, add) {
- let existIndex = this.index(exist)
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
- existIndex = this.index(exist)
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (existIndex < index) {
- this.indexes[id] = index + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- insertBefore(exist, add) {
- let existIndex = this.index(exist)
- let type = existIndex === 0 ? 'prepend' : false
- let nodes = this.normalize(
- add,
- this.proxyOf.nodes[existIndex],
- type
- ).reverse()
- existIndex = this.index(exist)
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (existIndex <= index) {
- this.indexes[id] = index + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- normalize(nodes, sample) {
- if (typeof nodes === 'string') {
- nodes = cleanSource(parse(nodes).nodes)
- } else if (typeof nodes === 'undefined') {
- nodes = []
- } else if (Array.isArray(nodes)) {
- nodes = nodes.slice(0)
- for (let i of nodes) {
- if (i.parent) i.parent.removeChild(i, 'ignore')
- }
- } else if (nodes.type === 'root' && this.type !== 'document') {
- nodes = nodes.nodes.slice(0)
- for (let i of nodes) {
- if (i.parent) i.parent.removeChild(i, 'ignore')
- }
- } else if (nodes.type) {
- nodes = [nodes]
- } else if (nodes.prop) {
- if (typeof nodes.value === 'undefined') {
- throw new Error('Value field is missed in node creation')
- } else if (typeof nodes.value !== 'string') {
- nodes.value = String(nodes.value)
- }
- nodes = [new Declaration(nodes)]
- } else if (nodes.selector || nodes.selectors) {
- nodes = [new Rule(nodes)]
- } else if (nodes.name) {
- nodes = [new AtRule(nodes)]
- } else if (nodes.text) {
- nodes = [new Comment(nodes)]
+ if (node.nodes) {
+ this.block(node, name + params)
} else {
- throw new Error('Unknown node type in node creation')
+ let end = (node.raws.between || '') + (semicolon ? ';' : '')
+ this.builder(name + params + end, node)
+ }
+ }
+
+ beforeAfter(node, detect) {
+ let value
+ if (node.type === 'decl') {
+ value = this.raw(node, null, 'beforeDecl')
+ } else if (node.type === 'comment') {
+ value = this.raw(node, null, 'beforeComment')
+ } else if (detect === 'before') {
+ value = this.raw(node, null, 'beforeRule')
+ } else {
+ value = this.raw(node, null, 'beforeClose')
}
- let processed = nodes.map(i => {
- /* c8 ignore next */
- if (!i[my]) Container.rebuild(i)
- i = i.proxyOf
- if (i.parent) i.parent.removeChild(i)
- if (i[isClean]) markTreeDirty(i)
+ let buf = node.parent
+ let depth = 0
+ while (buf && buf.type !== 'root') {
+ depth += 1
+ buf = buf.parent
+ }
- if (!i.raws) i.raws = {}
- if (typeof i.raws.before === 'undefined') {
- if (sample && typeof sample.raws.before !== 'undefined') {
- i.raws.before = sample.raws.before.replace(/\S/g, '')
+ if (value.includes('\n')) {
+ let indent = this.raw(node, null, 'indent')
+ if (indent.length) {
+ for (let step = 0; step < depth; step++) value += indent
+ }
+ }
+
+ return value
+ }
+
+ block(node, start) {
+ let between = this.raw(node, 'between', 'beforeOpen')
+ this.builder(start + between + '{', node, 'start')
+
+ let after
+ if (node.nodes && node.nodes.length) {
+ this.body(node)
+ after = this.raw(node, 'after')
+ } else {
+ after = this.raw(node, 'after', 'emptyBody')
+ }
+
+ if (after) this.builder(after)
+ this.builder('}', node, 'end')
+ }
+
+ body(node) {
+ let last = node.nodes.length - 1
+ while (last > 0) {
+ if (node.nodes[last].type !== 'comment') break
+ last -= 1
+ }
+
+ let semicolon = this.raw(node, 'semicolon')
+ for (let i = 0; i < node.nodes.length; i++) {
+ let child = node.nodes[i]
+ let before = this.raw(child, 'before')
+ if (before) this.builder(before)
+ this.stringify(child, last !== i || semicolon)
+ }
+ }
+
+ comment(node) {
+ let left = this.raw(node, 'left', 'commentLeft')
+ let right = this.raw(node, 'right', 'commentRight')
+ this.builder('/*' + left + node.text + right + '*/', node)
+ }
+
+ decl(node, semicolon) {
+ let between = this.raw(node, 'between', 'colon')
+ let string = node.prop + between + this.rawValue(node, 'value')
+
+ if (node.important) {
+ string += node.raws.important || ' !important'
+ }
+
+ if (semicolon) string += ';'
+ this.builder(string, node)
+ }
+
+ document(node) {
+ this.body(node)
+ }
+
+ raw(node, own, detect) {
+ let value
+ if (!detect) detect = own
+
+ // Already had
+ if (own) {
+ value = node.raws[own]
+ if (typeof value !== 'undefined') return value
+ }
+
+ let parent = node.parent
+
+ if (detect === 'before') {
+ // Hack for first rule in CSS
+ if (!parent || (parent.type === 'root' && parent.first === node)) {
+ return ''
+ }
+
+ // `root` nodes in `document` should use only their own raws
+ if (parent && parent.type === 'document') {
+ return ''
+ }
+ }
+
+ // Floating child without parent
+ if (!parent) return DEFAULT_RAW[detect]
+
+ // Detect style by other nodes
+ let root = node.root()
+ if (!root.rawCache) root.rawCache = {}
+ if (typeof root.rawCache[detect] !== 'undefined') {
+ return root.rawCache[detect]
+ }
+
+ if (detect === 'before' || detect === 'after') {
+ return this.beforeAfter(node, detect)
+ } else {
+ let method = 'raw' + capitalize(detect)
+ if (this[method]) {
+ value = this[method](root, node)
+ } else {
+ root.walk(i => {
+ value = i.raws[own]
+ if (typeof value !== 'undefined') return false
+ })
+ }
+ }
+
+ if (typeof value === 'undefined') value = DEFAULT_RAW[detect]
+
+ root.rawCache[detect] = value
+ return value
+ }
+
+ rawBeforeClose(root) {
+ let value
+ root.walk(i => {
+ if (i.nodes && i.nodes.length > 0) {
+ if (typeof i.raws.after !== 'undefined') {
+ value = i.raws.after
+ if (value.includes('\n')) {
+ value = value.replace(/[^\n]+$/, '')
+ }
+ return false
}
}
- i.parent = this.proxyOf
- return i
})
-
- return processed
+ if (value) value = value.replace(/\S/g, '')
+ return value
}
- prepend(...children) {
- children = children.reverse()
- for (let child of children) {
- let nodes = this.normalize(child, this.first, 'prepend').reverse()
- for (let node of nodes) this.proxyOf.nodes.unshift(node)
- for (let id in this.indexes) {
- this.indexes[id] = this.indexes[id] + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- push(child) {
- child.parent = this
- this.proxyOf.nodes.push(child)
- return this
- }
-
- removeAll() {
- for (let node of this.proxyOf.nodes) node.parent = undefined
- this.proxyOf.nodes = []
-
- this.markDirty()
-
- return this
- }
-
- removeChild(child) {
- child = this.index(child)
- this.proxyOf.nodes[child].parent = undefined
- this.proxyOf.nodes.splice(child, 1)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (index >= child) {
- this.indexes[id] = index - 1
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- replaceValues(pattern, opts, callback) {
- if (!callback) {
- callback = opts
- opts = {}
- }
-
- this.walkDecls(decl => {
- if (opts.props && !opts.props.includes(decl.prop)) return
- if (opts.fast && !decl.value.includes(opts.fast)) return
-
- decl.value = decl.value.replace(pattern, callback)
- })
-
- this.markDirty()
-
- return this
- }
-
- some(condition) {
- return this.nodes.some(condition)
- }
-
- walk(callback) {
- return this.each((child, i) => {
- let result
- try {
- result = callback(child, i)
- } catch (e) {
- throw child.addToError(e)
- }
- if (result !== false && child.walk) {
- result = child.walk(callback)
- }
-
- return result
- })
- }
-
- walkAtRules(name, callback) {
- if (!callback) {
- callback = name
- return this.walk((child, i) => {
- if (child.type === 'atrule') {
- return callback(child, i)
+ rawBeforeComment(root, node) {
+ let value
+ root.walkComments(i => {
+ if (typeof i.raws.before !== 'undefined') {
+ value = i.raws.before
+ if (value.includes('\n')) {
+ value = value.replace(/[^\n]+$/, '')
}
- })
- }
- if (name instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'atrule' && name.test(child.name)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'atrule' && child.name === name) {
- return callback(child, i)
+ return false
}
})
+ if (typeof value === 'undefined') {
+ value = this.raw(node, null, 'beforeDecl')
+ } else if (value) {
+ value = value.replace(/\S/g, '')
+ }
+ return value
}
- walkComments(callback) {
- return this.walk((child, i) => {
- if (child.type === 'comment') {
- return callback(child, i)
+ rawBeforeDecl(root, node) {
+ let value
+ root.walkDecls(i => {
+ if (typeof i.raws.before !== 'undefined') {
+ value = i.raws.before
+ if (value.includes('\n')) {
+ value = value.replace(/[^\n]+$/, '')
+ }
+ return false
}
})
+ if (typeof value === 'undefined') {
+ value = this.raw(node, null, 'beforeRule')
+ } else if (value) {
+ value = value.replace(/\S/g, '')
+ }
+ return value
}
- walkDecls(prop, callback) {
- if (!callback) {
- callback = prop
- return this.walk((child, i) => {
- if (child.type === 'decl') {
- return callback(child, i)
- }
- })
- }
- if (prop instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'decl' && prop.test(child.prop)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'decl' && child.prop === prop) {
- return callback(child, i)
+ rawBeforeOpen(root) {
+ let value
+ root.walk(i => {
+ if (i.type !== 'decl') {
+ value = i.raws.between
+ if (typeof value !== 'undefined') return false
}
})
+ return value
}
- walkRules(selector, callback) {
- if (!callback) {
- callback = selector
-
- return this.walk((child, i) => {
- if (child.type === 'rule') {
- return callback(child, i)
+ rawBeforeRule(root) {
+ let value
+ root.walk(i => {
+ if (i.nodes && (i.parent !== root || root.first !== i)) {
+ if (typeof i.raws.before !== 'undefined') {
+ value = i.raws.before
+ if (value.includes('\n')) {
+ value = value.replace(/[^\n]+$/, '')
+ }
+ return false
}
- })
- }
- if (selector instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'rule' && selector.test(child.selector)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'rule' && child.selector === selector) {
- return callback(child, i)
}
})
+ if (value) value = value.replace(/\S/g, '')
+ return value
}
- get first() {
- if (!this.proxyOf.nodes) return undefined
- return this.proxyOf.nodes[0]
+ rawColon(root) {
+ let value
+ root.walkDecls(i => {
+ if (typeof i.raws.between !== 'undefined') {
+ value = i.raws.between.replace(/[^\s:]/g, '')
+ return false
+ }
+ })
+ return value
}
- get last() {
- if (!this.proxyOf.nodes) return undefined
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
+ rawEmptyBody(root) {
+ let value
+ root.walk(i => {
+ if (i.nodes && i.nodes.length === 0) {
+ value = i.raws.after
+ if (typeof value !== 'undefined') return false
+ }
+ })
+ return value
+ }
+
+ rawIndent(root) {
+ if (root.raws.indent) return root.raws.indent
+ let value
+ root.walk(i => {
+ let p = i.parent
+ if (p && p !== root && p.parent && p.parent === root) {
+ if (typeof i.raws.before !== 'undefined') {
+ let parts = i.raws.before.split('\n')
+ value = parts[parts.length - 1]
+ value = value.replace(/\S/g, '')
+ return false
+ }
+ }
+ })
+ return value
+ }
+
+ rawSemicolon(root) {
+ let value
+ root.walk(i => {
+ if (i.nodes && i.nodes.length && i.last.type === 'decl') {
+ value = i.raws.semicolon
+ if (typeof value !== 'undefined') return false
+ }
+ })
+ return value
+ }
+
+ rawValue(node, prop) {
+ let value = node[prop]
+ let raw = node.raws[prop]
+ if (raw && raw.value === value) {
+ return raw.raw
+ }
+
+ return value
+ }
+
+ root(node) {
+ this.body(node)
+ if (node.raws.after) this.builder(node.raws.after)
+ }
+
+ rule(node) {
+ this.block(node, this.rawValue(node, 'selector'))
+ if (node.raws.ownSemicolon) {
+ this.builder(node.raws.ownSemicolon, node, 'end')
+ }
+ }
+
+ stringify(node, semicolon) {
+ /* c8 ignore start */
+ if (!this[node.type]) {
+ throw new Error(
+ 'Unknown AST node type ' +
+ node.type +
+ '. ' +
+ 'Maybe you need to change PostCSS stringifier.'
+ )
+ }
+ /* c8 ignore stop */
+ this[node.type](node, semicolon)
}
}
-Container.registerParse = dependant => {
- parse = dependant
-}
-
-Container.registerRule = dependant => {
- Rule = dependant
-}
-
-Container.registerAtRule = dependant => {
- AtRule = dependant
-}
-
-Container.registerRoot = dependant => {
- Root = dependant
-}
-
-module.exports = Container
-Container.default = Container
-
-/* c8 ignore start */
-Container.rebuild = node => {
- if (node.type === 'atrule') {
- Object.setPrototypeOf(node, AtRule.prototype)
- } else if (node.type === 'rule') {
- Object.setPrototypeOf(node, Rule.prototype)
- } else if (node.type === 'decl') {
- Object.setPrototypeOf(node, Declaration.prototype)
- } else if (node.type === 'comment') {
- Object.setPrototypeOf(node, Comment.prototype)
- } else if (node.type === 'root') {
- Object.setPrototypeOf(node, Root.prototype)
- }
-
- node[my] = true
-
- if (node.nodes) {
- node.nodes.forEach(child => {
- Container.rebuild(child)
- })
- }
-}
-/* c8 ignore stop */
+module.exports = Stringifier
+Stringifier.default = Stringifier
/***/ }),
@@ -2900,335 +549,6 @@ module.exports = CssSyntaxError
CssSyntaxError.default = CssSyntaxError
-/***/ }),
-
-/***/ 1516:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-
-
-let Node = __webpack_require__(7490)
-
-class Declaration extends Node {
- constructor(defaults) {
- if (
- defaults &&
- typeof defaults.value !== 'undefined' &&
- typeof defaults.value !== 'string'
- ) {
- defaults = { ...defaults, value: String(defaults.value) }
- }
- super(defaults)
- this.type = 'decl'
- }
-
- get variable() {
- return this.prop.startsWith('--') || this.prop[0] === '$'
- }
-}
-
-module.exports = Declaration
-Declaration.default = Declaration
-
-
-/***/ }),
-
-/***/ 271:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-
-
-let Container = __webpack_require__(683)
-
-let LazyResult, Processor
-
-class Document extends Container {
- constructor(defaults) {
- // type needs to be passed to super, otherwise child roots won't be normalized correctly
- super({ type: 'document', ...defaults })
-
- if (!this.nodes) {
- this.nodes = []
- }
- }
-
- toResult(opts = {}) {
- let lazy = new LazyResult(new Processor(), this, opts)
-
- return lazy.stringify()
- }
-}
-
-Document.registerLazyResult = dependant => {
- LazyResult = dependant
-}
-
-Document.registerProcessor = dependant => {
- Processor = dependant
-}
-
-module.exports = Document
-Document.default = Document
-
-
-/***/ }),
-
-/***/ 5380:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-
-
-let { nanoid } = __webpack_require__(5042)
-let { isAbsolute, resolve } = __webpack_require__(197)
-let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(1866)
-let { fileURLToPath, pathToFileURL } = __webpack_require__(2739)
-
-let CssSyntaxError = __webpack_require__(356)
-let PreviousMap = __webpack_require__(5696)
-let terminalHighlight = __webpack_require__(9746)
-
-let fromOffsetCache = Symbol('fromOffsetCache')
-
-let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
-let pathAvailable = Boolean(resolve && isAbsolute)
-
-class Input {
- constructor(css, opts = {}) {
- if (
- css === null ||
- typeof css === 'undefined' ||
- (typeof css === 'object' && !css.toString)
- ) {
- throw new Error(`PostCSS received ${css} instead of CSS string`)
- }
-
- this.css = css.toString()
-
- if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') {
- this.hasBOM = true
- this.css = this.css.slice(1)
- } else {
- this.hasBOM = false
- }
-
- if (opts.from) {
- if (
- !pathAvailable ||
- /^\w+:\/\//.test(opts.from) ||
- isAbsolute(opts.from)
- ) {
- this.file = opts.from
- } else {
- this.file = resolve(opts.from)
- }
- }
-
- if (pathAvailable && sourceMapAvailable) {
- let map = new PreviousMap(this.css, opts)
- if (map.text) {
- this.map = map
- let file = map.consumer().file
- if (!this.file && file) this.file = this.mapResolve(file)
- }
- }
-
- if (!this.file) {
- this.id = ''
- }
- if (this.map) this.map.file = this.from
- }
-
- error(message, line, column, opts = {}) {
- let endColumn, endLine, result
-
- if (line && typeof line === 'object') {
- let start = line
- let end = column
- if (typeof start.offset === 'number') {
- let pos = this.fromOffset(start.offset)
- line = pos.line
- column = pos.col
- } else {
- line = start.line
- column = start.column
- }
- if (typeof end.offset === 'number') {
- let pos = this.fromOffset(end.offset)
- endLine = pos.line
- endColumn = pos.col
- } else {
- endLine = end.line
- endColumn = end.column
- }
- } else if (!column) {
- let pos = this.fromOffset(line)
- line = pos.line
- column = pos.col
- }
-
- let origin = this.origin(line, column, endLine, endColumn)
- if (origin) {
- result = new CssSyntaxError(
- message,
- origin.endLine === undefined
- ? origin.line
- : { column: origin.column, line: origin.line },
- origin.endLine === undefined
- ? origin.column
- : { column: origin.endColumn, line: origin.endLine },
- origin.source,
- origin.file,
- opts.plugin
- )
- } else {
- result = new CssSyntaxError(
- message,
- endLine === undefined ? line : { column, line },
- endLine === undefined ? column : { column: endColumn, line: endLine },
- this.css,
- this.file,
- opts.plugin
- )
- }
-
- result.input = { column, endColumn, endLine, line, source: this.css }
- if (this.file) {
- if (pathToFileURL) {
- result.input.url = pathToFileURL(this.file).toString()
- }
- result.input.file = this.file
- }
-
- return result
- }
-
- fromOffset(offset) {
- let lastLine, lineToIndex
- if (!this[fromOffsetCache]) {
- let lines = this.css.split('\n')
- lineToIndex = new Array(lines.length)
- let prevIndex = 0
-
- for (let i = 0, l = lines.length; i < l; i++) {
- lineToIndex[i] = prevIndex
- prevIndex += lines[i].length + 1
- }
-
- this[fromOffsetCache] = lineToIndex
- } else {
- lineToIndex = this[fromOffsetCache]
- }
- lastLine = lineToIndex[lineToIndex.length - 1]
-
- let min = 0
- if (offset >= lastLine) {
- min = lineToIndex.length - 1
- } else {
- let max = lineToIndex.length - 2
- let mid
- while (min < max) {
- mid = min + ((max - min) >> 1)
- if (offset < lineToIndex[mid]) {
- max = mid - 1
- } else if (offset >= lineToIndex[mid + 1]) {
- min = mid + 1
- } else {
- min = mid
- break
- }
- }
- }
- return {
- col: offset - lineToIndex[min] + 1,
- line: min + 1
- }
- }
-
- mapResolve(file) {
- if (/^\w+:\/\//.test(file)) {
- return file
- }
- return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)
- }
-
- origin(line, column, endLine, endColumn) {
- if (!this.map) return false
- let consumer = this.map.consumer()
-
- let from = consumer.originalPositionFor({ column, line })
- if (!from.source) return false
-
- let to
- if (typeof endLine === 'number') {
- to = consumer.originalPositionFor({ column: endColumn, line: endLine })
- }
-
- let fromUrl
-
- if (isAbsolute(from.source)) {
- fromUrl = pathToFileURL(from.source)
- } else {
- fromUrl = new URL(
- from.source,
- this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
- )
- }
-
- let result = {
- column: from.column,
- endColumn: to && to.column,
- endLine: to && to.line,
- line: from.line,
- url: fromUrl.toString()
- }
-
- if (fromUrl.protocol === 'file:') {
- if (fileURLToPath) {
- result.file = fileURLToPath(fromUrl)
- } else {
- /* c8 ignore next 2 */
- throw new Error(`file: protocol is not available in this PostCSS build`)
- }
- }
-
- let source = consumer.sourceContentFor(from.source)
- if (source) result.source = source
-
- return result
- }
-
- toJSON() {
- let json = {}
- for (let name of ['hasBOM', 'css', 'file', 'id']) {
- if (this[name] != null) {
- json[name] = this[name]
- }
- }
- if (this.map) {
- json.map = { ...this.map }
- if (json.map.consumerCache) {
- json.map.consumerCache = undefined
- }
- }
- return json
- }
-
- get from() {
- return this.file || this.id
- }
-}
-
-module.exports = Input
-Input.default = Input
-
-if (terminalHighlight && terminalHighlight.registerInput) {
- terminalHighlight.registerInput(Input)
-}
-
-
/***/ }),
/***/ 448:
@@ -3342,6 +662,38 @@ function cleanMarks(node) {
let postcss = {}
class LazyResult {
+ get content() {
+ return this.stringify().content
+ }
+
+ get css() {
+ return this.stringify().css
+ }
+
+ get map() {
+ return this.stringify().map
+ }
+
+ get messages() {
+ return this.sync().messages
+ }
+
+ get opts() {
+ return this.result.opts
+ }
+
+ get processor() {
+ return this.result.processor
+ }
+
+ get root() {
+ return this.sync().root
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'LazyResult'
+ }
+
constructor(processor, css, opts) {
this.stringified = false
this.processed = false
@@ -3714,38 +1066,6 @@ class LazyResult {
warnings() {
return this.sync().warnings()
}
-
- get content() {
- return this.stringify().content
- }
-
- get css() {
- return this.stringify().css
- }
-
- get map() {
- return this.stringify().map
- }
-
- get messages() {
- return this.sync().messages
- }
-
- get opts() {
- return this.result.opts
- }
-
- get processor() {
- return this.result.processor
- }
-
- get root() {
- return this.sync().root
- }
-
- get [Symbol.toStringTag]() {
- return 'LazyResult'
- }
}
LazyResult.registerPostcss = dependant => {
@@ -3761,70 +1081,1058 @@ Document.registerLazyResult(LazyResult)
/***/ }),
-/***/ 7374:
+/***/ 461:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+// Load in dependencies
+var computedStyle = __webpack_require__(6109);
+
+/**
+ * Calculate the `line-height` of a given node
+ * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
+ * @returns {Number} `line-height` of the element in pixels
+ */
+function lineHeight(node) {
+ // Grab the line-height via style
+ var lnHeightStr = computedStyle(node, 'line-height');
+ var lnHeight = parseFloat(lnHeightStr, 10);
+
+ // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
+ if (lnHeightStr === lnHeight + '') {
+ // Save the old lineHeight style and update the em unit to the element
+ var _lnHeightStyle = node.style.lineHeight;
+ node.style.lineHeight = lnHeightStr + 'em';
+
+ // Calculate the em based height
+ lnHeightStr = computedStyle(node, 'line-height');
+ lnHeight = parseFloat(lnHeightStr, 10);
+
+ // Revert the lineHeight style
+ if (_lnHeightStyle) {
+ node.style.lineHeight = _lnHeightStyle;
+ } else {
+ delete node.style.lineHeight;
+ }
+ }
+
+ // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
+ // DEV: `em` units are converted to `pt` in IE6
+ // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
+ if (lnHeightStr.indexOf('pt') !== -1) {
+ lnHeight *= 4;
+ lnHeight /= 3;
+ // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
+ } else if (lnHeightStr.indexOf('mm') !== -1) {
+ lnHeight *= 96;
+ lnHeight /= 25.4;
+ // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
+ } else if (lnHeightStr.indexOf('cm') !== -1) {
+ lnHeight *= 96;
+ lnHeight /= 2.54;
+ // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
+ } else if (lnHeightStr.indexOf('in') !== -1) {
+ lnHeight *= 96;
+ // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
+ } else if (lnHeightStr.indexOf('pc') !== -1) {
+ lnHeight *= 16;
+ }
+
+ // Continue our computation
+ lnHeight = Math.round(lnHeight);
+
+ // If the line-height is "normal", calculate by font-size
+ if (lnHeightStr === 'normal') {
+ // Create a temporary node
+ var nodeName = node.nodeName;
+ var _node = document.createElement(nodeName);
+ _node.innerHTML = ' ';
+
+ // If we have a text area, reset it to only 1 row
+ // https://github.com/twolfson/line-height/issues/4
+ if (nodeName.toUpperCase() === 'TEXTAREA') {
+ _node.setAttribute('rows', '1');
+ }
+
+ // Set the font-size of the element
+ var fontSizeStr = computedStyle(node, 'font-size');
+ _node.style.fontSize = fontSizeStr;
+
+ // Remove default padding/border which can affect offset height
+ // https://github.com/twolfson/line-height/issues/4
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
+ _node.style.padding = '0px';
+ _node.style.border = '0px';
+
+ // Append it to the body
+ var body = document.body;
+ body.appendChild(_node);
+
+ // Assume the line height of the element is the height
+ var height = _node.offsetHeight;
+ lnHeight = height;
+
+ // Remove our child from the DOM
+ body.removeChild(_node);
+ }
+
+ // Return the calculated height
+ return lnHeight;
+}
+
+// Export lineHeight
+module.exports = lineHeight;
+
+
+/***/ }),
+
+/***/ 628:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var ReactPropTypesSecret = __webpack_require__(4067);
+
+function emptyFunction() {}
+function emptyFunctionWithReset() {}
+emptyFunctionWithReset.resetWarningCache = emptyFunction;
+
+module.exports = function() {
+ function shim(props, propName, componentName, location, propFullName, secret) {
+ if (secret === ReactPropTypesSecret) {
+ // It is still safe when called from React.
+ return;
+ }
+ var err = 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'
+ );
+ err.name = 'Invariant Violation';
+ throw err;
+ };
+ shim.isRequired = shim;
+ function getShim() {
+ return shim;
+ };
+ // Important!
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
+ var ReactPropTypes = {
+ array: shim,
+ bigint: shim,
+ bool: shim,
+ func: shim,
+ number: shim,
+ object: shim,
+ string: shim,
+ symbol: shim,
+
+ any: shim,
+ arrayOf: getShim,
+ element: shim,
+ elementType: shim,
+ instanceOf: getShim,
+ node: shim,
+ objectOf: getShim,
+ oneOf: getShim,
+ oneOfType: getShim,
+ shape: getShim,
+ exact: getShim,
+
+ checkPropTypes: emptyFunctionWithReset,
+ resetWarningCache: emptyFunction
+ };
+
+ ReactPropTypes.PropTypes = ReactPropTypes;
+
+ return ReactPropTypes;
+};
+
+
+/***/ }),
+
+/***/ 633:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Stringifier = __webpack_require__(346)
+
+function stringify(node, builder) {
+ let str = new Stringifier(builder)
+ str.stringify(node)
+}
+
+module.exports = stringify
+stringify.default = stringify
+
+
+/***/ }),
+
+/***/ 683:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Comment = __webpack_require__(6589)
+let Declaration = __webpack_require__(1516)
+let Node = __webpack_require__(7490)
+let { isClean, my } = __webpack_require__(1381)
+
+let AtRule, parse, Root, Rule
+
+function cleanSource(nodes) {
+ return nodes.map(i => {
+ if (i.nodes) i.nodes = cleanSource(i.nodes)
+ delete i.source
+ return i
+ })
+}
+
+function markTreeDirty(node) {
+ node[isClean] = false
+ if (node.proxyOf.nodes) {
+ for (let i of node.proxyOf.nodes) {
+ markTreeDirty(i)
+ }
+ }
+}
+
+class Container extends Node {
+ get first() {
+ if (!this.proxyOf.nodes) return undefined
+ return this.proxyOf.nodes[0]
+ }
+
+ get last() {
+ if (!this.proxyOf.nodes) return undefined
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
+ }
+
+ append(...children) {
+ for (let child of children) {
+ let nodes = this.normalize(child, this.last)
+ for (let node of nodes) this.proxyOf.nodes.push(node)
+ }
+
+ this.markDirty()
+
+ return this
+ }
+
+ cleanRaws(keepBetween) {
+ super.cleanRaws(keepBetween)
+ if (this.nodes) {
+ for (let node of this.nodes) node.cleanRaws(keepBetween)
+ }
+ }
+
+ each(callback) {
+ if (!this.proxyOf.nodes) return undefined
+ let iterator = this.getIterator()
+
+ let index, result
+ while (this.indexes[iterator] < this.proxyOf.nodes.length) {
+ index = this.indexes[iterator]
+ result = callback(this.proxyOf.nodes[index], index)
+ if (result === false) break
+
+ this.indexes[iterator] += 1
+ }
+
+ delete this.indexes[iterator]
+ return result
+ }
+
+ every(condition) {
+ return this.nodes.every(condition)
+ }
+
+ getIterator() {
+ if (!this.lastEach) this.lastEach = 0
+ if (!this.indexes) this.indexes = {}
+
+ this.lastEach += 1
+ let iterator = this.lastEach
+ this.indexes[iterator] = 0
+
+ return iterator
+ }
+
+ getProxyProcessor() {
+ return {
+ get(node, prop) {
+ if (prop === 'proxyOf') {
+ return node
+ } else if (!node[prop]) {
+ return node[prop]
+ } else if (
+ prop === 'each' ||
+ (typeof prop === 'string' && prop.startsWith('walk'))
+ ) {
+ return (...args) => {
+ return node[prop](
+ ...args.map(i => {
+ if (typeof i === 'function') {
+ return (child, index) => i(child.toProxy(), index)
+ } else {
+ return i
+ }
+ })
+ )
+ }
+ } else if (prop === 'every' || prop === 'some') {
+ return cb => {
+ return node[prop]((child, ...other) =>
+ cb(child.toProxy(), ...other)
+ )
+ }
+ } else if (prop === 'root') {
+ return () => node.root().toProxy()
+ } else if (prop === 'nodes') {
+ return node.nodes.map(i => i.toProxy())
+ } else if (prop === 'first' || prop === 'last') {
+ return node[prop].toProxy()
+ } else {
+ return node[prop]
+ }
+ },
+
+ set(node, prop, value) {
+ if (node[prop] === value) return true
+ node[prop] = value
+ if (prop === 'name' || prop === 'params' || prop === 'selector') {
+ node.markDirty()
+ }
+ return true
+ }
+ }
+ }
+
+ index(child) {
+ if (typeof child === 'number') return child
+ if (child.proxyOf) child = child.proxyOf
+ return this.proxyOf.nodes.indexOf(child)
+ }
+
+ insertAfter(exist, add) {
+ let existIndex = this.index(exist)
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
+ existIndex = this.index(exist)
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
+
+ let index
+ for (let id in this.indexes) {
+ index = this.indexes[id]
+ if (existIndex < index) {
+ this.indexes[id] = index + nodes.length
+ }
+ }
+
+ this.markDirty()
+
+ return this
+ }
+
+ insertBefore(exist, add) {
+ let existIndex = this.index(exist)
+ let type = existIndex === 0 ? 'prepend' : false
+ let nodes = this.normalize(
+ add,
+ this.proxyOf.nodes[existIndex],
+ type
+ ).reverse()
+ existIndex = this.index(exist)
+ for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
+
+ let index
+ for (let id in this.indexes) {
+ index = this.indexes[id]
+ if (existIndex <= index) {
+ this.indexes[id] = index + nodes.length
+ }
+ }
+
+ this.markDirty()
+
+ return this
+ }
+
+ normalize(nodes, sample) {
+ if (typeof nodes === 'string') {
+ nodes = cleanSource(parse(nodes).nodes)
+ } else if (typeof nodes === 'undefined') {
+ nodes = []
+ } else if (Array.isArray(nodes)) {
+ nodes = nodes.slice(0)
+ for (let i of nodes) {
+ if (i.parent) i.parent.removeChild(i, 'ignore')
+ }
+ } else if (nodes.type === 'root' && this.type !== 'document') {
+ nodes = nodes.nodes.slice(0)
+ for (let i of nodes) {
+ if (i.parent) i.parent.removeChild(i, 'ignore')
+ }
+ } else if (nodes.type) {
+ nodes = [nodes]
+ } else if (nodes.prop) {
+ if (typeof nodes.value === 'undefined') {
+ throw new Error('Value field is missed in node creation')
+ } else if (typeof nodes.value !== 'string') {
+ nodes.value = String(nodes.value)
+ }
+ nodes = [new Declaration(nodes)]
+ } else if (nodes.selector || nodes.selectors) {
+ nodes = [new Rule(nodes)]
+ } else if (nodes.name) {
+ nodes = [new AtRule(nodes)]
+ } else if (nodes.text) {
+ nodes = [new Comment(nodes)]
+ } else {
+ throw new Error('Unknown node type in node creation')
+ }
+
+ let processed = nodes.map(i => {
+ /* c8 ignore next */
+ if (!i[my]) Container.rebuild(i)
+ i = i.proxyOf
+ if (i.parent) i.parent.removeChild(i)
+ if (i[isClean]) markTreeDirty(i)
+
+ if (!i.raws) i.raws = {}
+ if (typeof i.raws.before === 'undefined') {
+ if (sample && typeof sample.raws.before !== 'undefined') {
+ i.raws.before = sample.raws.before.replace(/\S/g, '')
+ }
+ }
+ i.parent = this.proxyOf
+ return i
+ })
+
+ return processed
+ }
+
+ prepend(...children) {
+ children = children.reverse()
+ for (let child of children) {
+ let nodes = this.normalize(child, this.first, 'prepend').reverse()
+ for (let node of nodes) this.proxyOf.nodes.unshift(node)
+ for (let id in this.indexes) {
+ this.indexes[id] = this.indexes[id] + nodes.length
+ }
+ }
+
+ this.markDirty()
+
+ return this
+ }
+
+ push(child) {
+ child.parent = this
+ this.proxyOf.nodes.push(child)
+ return this
+ }
+
+ removeAll() {
+ for (let node of this.proxyOf.nodes) node.parent = undefined
+ this.proxyOf.nodes = []
+
+ this.markDirty()
+
+ return this
+ }
+
+ removeChild(child) {
+ child = this.index(child)
+ this.proxyOf.nodes[child].parent = undefined
+ this.proxyOf.nodes.splice(child, 1)
+
+ let index
+ for (let id in this.indexes) {
+ index = this.indexes[id]
+ if (index >= child) {
+ this.indexes[id] = index - 1
+ }
+ }
+
+ this.markDirty()
+
+ return this
+ }
+
+ replaceValues(pattern, opts, callback) {
+ if (!callback) {
+ callback = opts
+ opts = {}
+ }
+
+ this.walkDecls(decl => {
+ if (opts.props && !opts.props.includes(decl.prop)) return
+ if (opts.fast && !decl.value.includes(opts.fast)) return
+
+ decl.value = decl.value.replace(pattern, callback)
+ })
+
+ this.markDirty()
+
+ return this
+ }
+
+ some(condition) {
+ return this.nodes.some(condition)
+ }
+
+ walk(callback) {
+ return this.each((child, i) => {
+ let result
+ try {
+ result = callback(child, i)
+ } catch (e) {
+ throw child.addToError(e)
+ }
+ if (result !== false && child.walk) {
+ result = child.walk(callback)
+ }
+
+ return result
+ })
+ }
+
+ walkAtRules(name, callback) {
+ if (!callback) {
+ callback = name
+ return this.walk((child, i) => {
+ if (child.type === 'atrule') {
+ return callback(child, i)
+ }
+ })
+ }
+ if (name instanceof RegExp) {
+ return this.walk((child, i) => {
+ if (child.type === 'atrule' && name.test(child.name)) {
+ return callback(child, i)
+ }
+ })
+ }
+ return this.walk((child, i) => {
+ if (child.type === 'atrule' && child.name === name) {
+ return callback(child, i)
+ }
+ })
+ }
+
+ walkComments(callback) {
+ return this.walk((child, i) => {
+ if (child.type === 'comment') {
+ return callback(child, i)
+ }
+ })
+ }
+
+ walkDecls(prop, callback) {
+ if (!callback) {
+ callback = prop
+ return this.walk((child, i) => {
+ if (child.type === 'decl') {
+ return callback(child, i)
+ }
+ })
+ }
+ if (prop instanceof RegExp) {
+ return this.walk((child, i) => {
+ if (child.type === 'decl' && prop.test(child.prop)) {
+ return callback(child, i)
+ }
+ })
+ }
+ return this.walk((child, i) => {
+ if (child.type === 'decl' && child.prop === prop) {
+ return callback(child, i)
+ }
+ })
+ }
+
+ walkRules(selector, callback) {
+ if (!callback) {
+ callback = selector
+
+ return this.walk((child, i) => {
+ if (child.type === 'rule') {
+ return callback(child, i)
+ }
+ })
+ }
+ if (selector instanceof RegExp) {
+ return this.walk((child, i) => {
+ if (child.type === 'rule' && selector.test(child.selector)) {
+ return callback(child, i)
+ }
+ })
+ }
+ return this.walk((child, i) => {
+ if (child.type === 'rule' && child.selector === selector) {
+ return callback(child, i)
+ }
+ })
+ }
+}
+
+Container.registerParse = dependant => {
+ parse = dependant
+}
+
+Container.registerRule = dependant => {
+ Rule = dependant
+}
+
+Container.registerAtRule = dependant => {
+ AtRule = dependant
+}
+
+Container.registerRoot = dependant => {
+ Root = dependant
+}
+
+module.exports = Container
+Container.default = Container
+
+/* c8 ignore start */
+Container.rebuild = node => {
+ if (node.type === 'atrule') {
+ Object.setPrototypeOf(node, AtRule.prototype)
+ } else if (node.type === 'rule') {
+ Object.setPrototypeOf(node, Rule.prototype)
+ } else if (node.type === 'decl') {
+ Object.setPrototypeOf(node, Declaration.prototype)
+ } else if (node.type === 'comment') {
+ Object.setPrototypeOf(node, Comment.prototype)
+ } else if (node.type === 'root') {
+ Object.setPrototypeOf(node, Root.prototype)
+ }
+
+ node[my] = true
+
+ if (node.nodes) {
+ node.nodes.forEach(child => {
+ Container.rebuild(child)
+ })
+ }
+}
+/* c8 ignore stop */
+
+
+/***/ }),
+
+/***/ 1087:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule isEventSupported
+ */
+
+
+
+var ExecutionEnvironment = __webpack_require__(8202);
+
+var useHasFeature;
+if (ExecutionEnvironment.canUseDOM) {
+ useHasFeature =
+ document.implementation &&
+ document.implementation.hasFeature &&
+ // always returns true in newer browsers as per the standard.
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
+ document.implementation.hasFeature('', '') !== true;
+}
+
+/**
+ * Checks if an event is supported in the current execution environment.
+ *
+ * NOTE: This will not work correctly for non-generic events such as `change`,
+ * `reset`, `load`, `error`, and `select`.
+ *
+ * Borrows from Modernizr.
+ *
+ * @param {string} eventNameSuffix Event name, e.g. "click".
+ * @param {?boolean} capture Check if the capture phase is supported.
+ * @return {boolean} True if the event is supported.
+ * @internal
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
+ */
+function isEventSupported(eventNameSuffix, capture) {
+ if (!ExecutionEnvironment.canUseDOM ||
+ capture && !('addEventListener' in document)) {
+ return false;
+ }
+
+ var eventName = 'on' + eventNameSuffix;
+ var isSupported = eventName in document;
+
+ if (!isSupported) {
+ var element = document.createElement('div');
+ element.setAttribute(eventName, 'return;');
+ isSupported = typeof element[eventName] === 'function';
+ }
+
+ if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
+ // This is the only way to test support for the `wheel` event in IE9+.
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
+ }
+
+ return isSupported;
+}
+
+module.exports = isEventSupported;
+
+
+/***/ }),
+
+/***/ 1326:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Container = __webpack_require__(683)
+
+class AtRule extends Container {
+ constructor(defaults) {
+ super(defaults)
+ this.type = 'atrule'
+ }
+
+ append(...children) {
+ if (!this.proxyOf.nodes) this.nodes = []
+ return super.append(...children)
+ }
+
+ prepend(...children) {
+ if (!this.proxyOf.nodes) this.nodes = []
+ return super.prepend(...children)
+ }
+}
+
+module.exports = AtRule
+AtRule.default = AtRule
+
+Container.registerAtRule(AtRule)
+
+
+/***/ }),
+
+/***/ 1381:
/***/ ((module) => {
"use strict";
-let list = {
- comma(string) {
- return list.split(string, [','], true)
- },
+module.exports.isClean = Symbol('isClean')
- space(string) {
- let spaces = [' ', '\n', '\t']
- return list.split(string, spaces)
- },
+module.exports.my = Symbol('my')
- split(string, separators, last) {
- let array = []
- let current = ''
- let split = false
- let func = 0
- let inQuote = false
- let prevQuote = ''
- let escape = false
+/***/ }),
- for (let letter of string) {
- if (escape) {
- escape = false
- } else if (letter === '\\') {
- escape = true
- } else if (inQuote) {
- if (letter === prevQuote) {
- inQuote = false
- }
- } else if (letter === '"' || letter === "'") {
- inQuote = true
- prevQuote = letter
- } else if (letter === '(') {
- func += 1
- } else if (letter === ')') {
- if (func > 0) func -= 1
- } else if (func === 0) {
- if (separators.includes(letter)) split = true
- }
+/***/ 1443:
+/***/ ((module) => {
- if (split) {
- if (current !== '') array.push(current.trim())
- current = ''
- split = false
- } else {
- current += letter
- }
+module.exports = function postcssPrefixSelector(options) {
+ const prefix = options.prefix;
+ const prefixWithSpace = /\s+$/.test(prefix) ? prefix : `${prefix} `;
+ const ignoreFiles = options.ignoreFiles ? [].concat(options.ignoreFiles) : [];
+ const includeFiles = options.includeFiles
+ ? [].concat(options.includeFiles)
+ : [];
+
+ return function (root) {
+ if (
+ ignoreFiles.length &&
+ root.source.input.file &&
+ isFileInArray(root.source.input.file, ignoreFiles)
+ ) {
+ return;
+ }
+ if (
+ includeFiles.length &&
+ root.source.input.file &&
+ !isFileInArray(root.source.input.file, includeFiles)
+ ) {
+ return;
+ }
+
+ root.walkRules((rule) => {
+ const keyframeRules = [
+ 'keyframes',
+ '-webkit-keyframes',
+ '-moz-keyframes',
+ '-o-keyframes',
+ '-ms-keyframes',
+ ];
+
+ if (rule.parent && keyframeRules.includes(rule.parent.name)) {
+ return;
+ }
+
+ rule.selectors = rule.selectors.map((selector) => {
+ if (options.exclude && excludeSelector(selector, options.exclude)) {
+ return selector;
+ }
+
+ if (options.transform) {
+ return options.transform(
+ prefix,
+ selector,
+ prefixWithSpace + selector,
+ root.source.input.file,
+ rule
+ );
+ }
+
+ return prefixWithSpace + selector;
+ });
+ });
+ };
+};
+
+function isFileInArray(file, arr) {
+ return arr.some((ruleOrString) => {
+ if (ruleOrString instanceof RegExp) {
+ return ruleOrString.test(file);
+ }
+
+ return file.includes(ruleOrString);
+ });
+}
+
+function excludeSelector(selector, excludeArr) {
+ return excludeArr.some((excludeRule) => {
+ if (excludeRule instanceof RegExp) {
+ return excludeRule.test(selector);
+ }
+
+ return selector === excludeRule;
+ });
+}
+
+
+/***/ }),
+
+/***/ 1516:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Node = __webpack_require__(7490)
+
+class Declaration extends Node {
+ get variable() {
+ return this.prop.startsWith('--') || this.prop[0] === '$'
+ }
+
+ constructor(defaults) {
+ if (
+ defaults &&
+ typeof defaults.value !== 'undefined' &&
+ typeof defaults.value !== 'string'
+ ) {
+ defaults = { ...defaults, value: String(defaults.value) }
}
-
- if (last || current !== '') array.push(current.trim())
- return array
+ super(defaults)
+ this.type = 'decl'
}
}
-module.exports = list
-list.default = list
+module.exports = Declaration
+Declaration.default = Declaration
+/***/ }),
+
+/***/ 1524:
+/***/ ((module) => {
+
+var minus = "-".charCodeAt(0);
+var plus = "+".charCodeAt(0);
+var dot = ".".charCodeAt(0);
+var exp = "e".charCodeAt(0);
+var EXP = "E".charCodeAt(0);
+
+// Check if three code points would start a number
+// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
+function likeNumber(value) {
+ var code = value.charCodeAt(0);
+ var nextCode;
+
+ if (code === plus || code === minus) {
+ nextCode = value.charCodeAt(1);
+
+ if (nextCode >= 48 && nextCode <= 57) {
+ return true;
+ }
+
+ var nextNextCode = value.charCodeAt(2);
+
+ if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
+ return true;
+ }
+
+ return false;
+ }
+
+ if (code === dot) {
+ nextCode = value.charCodeAt(1);
+
+ if (nextCode >= 48 && nextCode <= 57) {
+ return true;
+ }
+
+ return false;
+ }
+
+ if (code >= 48 && code <= 57) {
+ return true;
+ }
+
+ return false;
+}
+
+// Consume a number
+// https://www.w3.org/TR/css-syntax-3/#consume-number
+module.exports = function(value) {
+ var pos = 0;
+ var length = value.length;
+ var code;
+ var nextCode;
+ var nextNextCode;
+
+ if (length === 0 || !likeNumber(value)) {
+ return false;
+ }
+
+ code = value.charCodeAt(pos);
+
+ if (code === plus || code === minus) {
+ pos++;
+ }
+
+ while (pos < length) {
+ code = value.charCodeAt(pos);
+
+ if (code < 48 || code > 57) {
+ break;
+ }
+
+ pos += 1;
+ }
+
+ code = value.charCodeAt(pos);
+ nextCode = value.charCodeAt(pos + 1);
+
+ if (code === dot && nextCode >= 48 && nextCode <= 57) {
+ pos += 2;
+
+ while (pos < length) {
+ code = value.charCodeAt(pos);
+
+ if (code < 48 || code > 57) {
+ break;
+ }
+
+ pos += 1;
+ }
+ }
+
+ code = value.charCodeAt(pos);
+ nextCode = value.charCodeAt(pos + 1);
+ nextNextCode = value.charCodeAt(pos + 2);
+
+ if (
+ (code === exp || code === EXP) &&
+ ((nextCode >= 48 && nextCode <= 57) ||
+ ((nextCode === plus || nextCode === minus) &&
+ nextNextCode >= 48 &&
+ nextNextCode <= 57))
+ ) {
+ pos += nextCode === plus || nextCode === minus ? 3 : 2;
+
+ while (pos < length) {
+ code = value.charCodeAt(pos);
+
+ if (code < 48 || code > 57) {
+ break;
+ }
+
+ pos += 1;
+ }
+ }
+
+ return {
+ number: value.slice(0, pos),
+ unit: value.slice(pos)
+ };
+};
+
+
+/***/ }),
+
+/***/ 1544:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var parse = __webpack_require__(8491);
+var walk = __webpack_require__(3815);
+var stringify = __webpack_require__(4725);
+
+function ValueParser(value) {
+ if (this instanceof ValueParser) {
+ this.nodes = parse(value);
+ return this;
+ }
+ return new ValueParser(value);
+}
+
+ValueParser.prototype.toString = function() {
+ return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
+};
+
+ValueParser.prototype.walk = function(cb, bubble) {
+ walk(this.nodes, cb, bubble);
+ return this;
+};
+
+ValueParser.unit = __webpack_require__(1524);
+
+ValueParser.walk = walk;
+
+ValueParser.stringify = stringify;
+
+module.exports = ValueParser;
+
+
+/***/ }),
+
+/***/ 1609:
+/***/ ((module) => {
+
+"use strict";
+module.exports = window["React"];
+
/***/ }),
/***/ 1670:
@@ -4203,604 +2511,640 @@ module.exports = MapGenerator
/***/ }),
-/***/ 7661:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 1866:
+/***/ (() => {
-"use strict";
+/* (ignored) */
+/***/ }),
-let MapGenerator = __webpack_require__(1670)
-let parse = __webpack_require__(4295)
-const Result = __webpack_require__(9055)
-let stringify = __webpack_require__(633)
-let warnOnce = __webpack_require__(3122)
+/***/ 2213:
+/***/ ((module) => {
-class NoWorkResult {
- constructor(processor, css, opts) {
- css = css.toString()
- this.stringified = false
+/**
+ * Copyright 2004-present Facebook. All Rights Reserved.
+ *
+ * @providesModule UserAgent_DEPRECATED
+ */
- this._processor = processor
- this._css = css
- this._opts = opts
- this._map = undefined
- let root
+/**
+ * Provides entirely client-side User Agent and OS detection. You should prefer
+ * the non-deprecated UserAgent module when possible, which exposes our
+ * authoritative server-side PHP-based detection to the client.
+ *
+ * Usage is straightforward:
+ *
+ * if (UserAgent_DEPRECATED.ie()) {
+ * // IE
+ * }
+ *
+ * You can also do version checks:
+ *
+ * if (UserAgent_DEPRECATED.ie() >= 7) {
+ * // IE7 or better
+ * }
+ *
+ * The browser functions will return NaN if the browser does not match, so
+ * you can also do version compares the other way:
+ *
+ * if (UserAgent_DEPRECATED.ie() < 7) {
+ * // IE6 or worse
+ * }
+ *
+ * Note that the version is a float and may include a minor version number,
+ * so you should always use range operators to perform comparisons, not
+ * strict equality.
+ *
+ * **Note:** You should **strongly** prefer capability detection to browser
+ * version detection where it's reasonable:
+ *
+ * http://www.quirksmode.org/js/support.html
+ *
+ * Further, we have a large number of mature wrapper functions and classes
+ * which abstract away many browser irregularities. Check the documentation,
+ * grep for things, or ask on javascript@lists.facebook.com before writing yet
+ * another copy of "event || window.event".
+ *
+ */
- let str = stringify
- this.result = new Result(this._processor, root, this._opts)
- this.result.css = css
+var _populated = false;
- let self = this
- Object.defineProperty(this.result, 'root', {
- get() {
- return self.root
- }
- })
+// Browsers
+var _ie, _firefox, _opera, _webkit, _chrome;
- let map = new MapGenerator(str, root, this._opts, css)
- if (map.isMap()) {
- let [generatedCSS, generatedMap] = map.generate()
- if (generatedCSS) {
- this.result.css = generatedCSS
- }
- if (generatedMap) {
- this.result.map = generatedMap
- }
+// Actual IE browser for compatibility mode
+var _ie_real_version;
+
+// Platforms
+var _osx, _windows, _linux, _android;
+
+// Architectures
+var _win64;
+
+// Devices
+var _iphone, _ipad, _native;
+
+var _mobile;
+
+function _populate() {
+ if (_populated) {
+ return;
+ }
+
+ _populated = true;
+
+ // To work around buggy JS libraries that can't handle multi-digit
+ // version numbers, Opera 10's user agent string claims it's Opera
+ // 9, then later includes a Version/X.Y field:
+ //
+ // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
+ var uas = navigator.userAgent;
+ var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
+ var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
+
+ _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
+ _ipad = /\b(iP[ao]d)/.exec(uas);
+ _android = /Android/i.exec(uas);
+ _native = /FBAN\/\w+;/i.exec(uas);
+ _mobile = /Mobile/i.exec(uas);
+
+ // Note that the IE team blog would have you believe you should be checking
+ // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
+ // from either x64 or ia64; so ultimately, you should just check for Win64
+ // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
+ // Windows will send 'WOW64' instead.
+ _win64 = !!(/Win64/.exec(uas));
+
+ if (agent) {
+ _ie = agent[1] ? parseFloat(agent[1]) : (
+ agent[5] ? parseFloat(agent[5]) : NaN);
+ // IE compatibility mode
+ if (_ie && document && document.documentMode) {
+ _ie = document.documentMode;
+ }
+ // grab the "true" ie version from the trident token if available
+ var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
+ _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
+
+ _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
+ _opera = agent[3] ? parseFloat(agent[3]) : NaN;
+ _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
+ if (_webkit) {
+ // We do not add the regexp to the above test, because it will always
+ // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
+ // the userAgent string.
+ agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
+ _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
} else {
- map.clearAnnotation()
- this.result.css = map.css
+ _chrome = NaN;
}
+ } else {
+ _ie = _firefox = _opera = _chrome = _webkit = NaN;
}
- async() {
- if (this.error) return Promise.reject(this.error)
- return Promise.resolve(this.result)
- }
+ if (os) {
+ if (os[1]) {
+ // Detect OS X version. If no version number matches, set _osx to true.
+ // Version examples: 10, 10_6_1, 10.7
+ // Parses version number as a float, taking only first two sets of
+ // digits. If only one set of digits is found, returns just the major
+ // version number.
+ var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
- catch(onRejected) {
- return this.async().catch(onRejected)
- }
-
- finally(onFinally) {
- return this.async().then(onFinally, onFinally)
- }
-
- sync() {
- if (this.error) throw this.error
- return this.result
- }
-
- then(onFulfilled, onRejected) {
- if (false) {}
-
- return this.async().then(onFulfilled, onRejected)
- }
-
- toString() {
- return this._css
- }
-
- warnings() {
- return []
- }
-
- get content() {
- return this.result.css
- }
-
- get css() {
- return this.result.css
- }
-
- get map() {
- return this.result.map
- }
-
- get messages() {
- return []
- }
-
- get opts() {
- return this.result.opts
- }
-
- get processor() {
- return this.result.processor
- }
-
- get root() {
- if (this._root) {
- return this._root
- }
-
- let root
- let parser = parse
-
- try {
- root = parser(this._css, this._opts)
- } catch (error) {
- this.error = error
- }
-
- if (this.error) {
- throw this.error
+ _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
} else {
- this._root = root
- return root
+ _osx = false;
}
- }
-
- get [Symbol.toStringTag]() {
- return 'NoWorkResult'
+ _windows = !!os[2];
+ _linux = !!os[3];
+ } else {
+ _osx = _windows = _linux = false;
}
}
-module.exports = NoWorkResult
-NoWorkResult.default = NoWorkResult
+var UserAgent_DEPRECATED = {
+
+ /**
+ * Check if the UA is Internet Explorer.
+ *
+ *
+ * @return float|NaN Version number (if match) or NaN.
+ */
+ ie: function() {
+ return _populate() || _ie;
+ },
+
+ /**
+ * Check if we're in Internet Explorer compatibility mode.
+ *
+ * @return bool true if in compatibility mode, false if
+ * not compatibility mode or not ie
+ */
+ ieCompatibilityMode: function() {
+ return _populate() || (_ie_real_version > _ie);
+ },
+
+
+ /**
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
+ * this when we don't need it -- tracked by #601957.
+ */
+ ie64: function() {
+ return UserAgent_DEPRECATED.ie() && _win64;
+ },
+
+ /**
+ * Check if the UA is Firefox.
+ *
+ *
+ * @return float|NaN Version number (if match) or NaN.
+ */
+ firefox: function() {
+ return _populate() || _firefox;
+ },
+
+
+ /**
+ * Check if the UA is Opera.
+ *
+ *
+ * @return float|NaN Version number (if match) or NaN.
+ */
+ opera: function() {
+ return _populate() || _opera;
+ },
+
+
+ /**
+ * Check if the UA is WebKit.
+ *
+ *
+ * @return float|NaN Version number (if match) or NaN.
+ */
+ webkit: function() {
+ return _populate() || _webkit;
+ },
+
+ /**
+ * For Push
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
+ */
+ safari: function() {
+ return UserAgent_DEPRECATED.webkit();
+ },
+
+ /**
+ * Check if the UA is a Chrome browser.
+ *
+ *
+ * @return float|NaN Version number (if match) or NaN.
+ */
+ chrome : function() {
+ return _populate() || _chrome;
+ },
+
+
+ /**
+ * Check if the user is running Windows.
+ *
+ * @return bool `true' if the user's OS is Windows.
+ */
+ windows: function() {
+ return _populate() || _windows;
+ },
+
+
+ /**
+ * Check if the user is running Mac OS X.
+ *
+ * @return float|bool Returns a float if a version number is detected,
+ * otherwise true/false.
+ */
+ osx: function() {
+ return _populate() || _osx;
+ },
+
+ /**
+ * Check if the user is running Linux.
+ *
+ * @return bool `true' if the user's OS is some flavor of Linux.
+ */
+ linux: function() {
+ return _populate() || _linux;
+ },
+
+ /**
+ * Check if the user is running on an iPhone or iPod platform.
+ *
+ * @return bool `true' if the user is running some flavor of the
+ * iPhone OS.
+ */
+ iphone: function() {
+ return _populate() || _iphone;
+ },
+
+ mobile: function() {
+ return _populate() || (_iphone || _ipad || _android || _mobile);
+ },
+
+ nativeApp: function() {
+ // webviews inside of the native apps
+ return _populate() || _native;
+ },
+
+ android: function() {
+ return _populate() || _android;
+ },
+
+ ipad: function() {
+ return _populate() || _ipad;
+ }
+};
+
+module.exports = UserAgent_DEPRECATED;
/***/ }),
-/***/ 7490:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 2327:
+/***/ ((module) => {
"use strict";
-let CssSyntaxError = __webpack_require__(356)
-let Stringifier = __webpack_require__(346)
-let stringify = __webpack_require__(633)
-let { isClean, my } = __webpack_require__(1381)
+const SINGLE_QUOTE = "'".charCodeAt(0)
+const DOUBLE_QUOTE = '"'.charCodeAt(0)
+const BACKSLASH = '\\'.charCodeAt(0)
+const SLASH = '/'.charCodeAt(0)
+const NEWLINE = '\n'.charCodeAt(0)
+const SPACE = ' '.charCodeAt(0)
+const FEED = '\f'.charCodeAt(0)
+const TAB = '\t'.charCodeAt(0)
+const CR = '\r'.charCodeAt(0)
+const OPEN_SQUARE = '['.charCodeAt(0)
+const CLOSE_SQUARE = ']'.charCodeAt(0)
+const OPEN_PARENTHESES = '('.charCodeAt(0)
+const CLOSE_PARENTHESES = ')'.charCodeAt(0)
+const OPEN_CURLY = '{'.charCodeAt(0)
+const CLOSE_CURLY = '}'.charCodeAt(0)
+const SEMICOLON = ';'.charCodeAt(0)
+const ASTERISK = '*'.charCodeAt(0)
+const COLON = ':'.charCodeAt(0)
+const AT = '@'.charCodeAt(0)
-function cloneNode(obj, parent) {
- let cloned = new obj.constructor()
+const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g
+const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g
+const RE_BAD_BRACKET = /.[\r\n"'(/\\]/
+const RE_HEX_ESCAPE = /[\da-f]/i
- for (let i in obj) {
- if (!Object.prototype.hasOwnProperty.call(obj, i)) {
- /* c8 ignore next 2 */
- continue
- }
- if (i === 'proxyCache') continue
- let value = obj[i]
- let type = typeof value
+module.exports = function tokenizer(input, options = {}) {
+ let css = input.css.valueOf()
+ let ignore = options.ignoreErrors
- if (i === 'parent' && type === 'object') {
- if (parent) cloned[i] = parent
- } else if (i === 'source') {
- cloned[i] = value
- } else if (Array.isArray(value)) {
- cloned[i] = value.map(j => cloneNode(j, cloned))
- } else {
- if (type === 'object' && value !== null) value = cloneNode(value)
- cloned[i] = value
- }
- }
+ let code, content, escape, next, quote
+ let currentToken, escaped, escapePos, n, prev
- return cloned
-}
+ let length = css.length
+ let pos = 0
+ let buffer = []
+ let returned = []
-function sourceOffset(inputCSS, position) {
- // Not all custom syntaxes support `offset` in `source.start` and `source.end`
- if (
- position &&
- typeof position.offset !== 'undefined'
- ) {
- return position.offset;
- }
-
- let column = 1
- let line = 1
- let offset = 0
-
- for (let i = 0; i < inputCSS.length; i++) {
- if (line === position.line && column === position.column) {
- offset = i
- break
- }
-
- if (inputCSS[i] === '\n') {
- column = 1
- line += 1
- } else {
- column += 1
- }
- }
-
- return offset
-}
-
-class Node {
- constructor(defaults = {}) {
- this.raws = {}
- this[isClean] = false
- this[my] = true
-
- for (let name in defaults) {
- if (name === 'nodes') {
- this.nodes = []
- for (let node of defaults[name]) {
- if (typeof node.clone === 'function') {
- this.append(node.clone())
- } else {
- this.append(node)
- }
- }
- } else {
- this[name] = defaults[name]
- }
- }
- }
-
- addToError(error) {
- error.postcssNode = this
- if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
- let s = this.source
- error.stack = error.stack.replace(
- /\n\s{4}at /,
- `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
- )
- }
- return error
- }
-
- after(add) {
- this.parent.insertAfter(this, add)
- return this
- }
-
- assign(overrides = {}) {
- for (let name in overrides) {
- this[name] = overrides[name]
- }
- return this
- }
-
- before(add) {
- this.parent.insertBefore(this, add)
- return this
- }
-
- cleanRaws(keepBetween) {
- delete this.raws.before
- delete this.raws.after
- if (!keepBetween) delete this.raws.between
- }
-
- clone(overrides = {}) {
- let cloned = cloneNode(this)
- for (let name in overrides) {
- cloned[name] = overrides[name]
- }
- return cloned
- }
-
- cloneAfter(overrides = {}) {
- let cloned = this.clone(overrides)
- this.parent.insertAfter(this, cloned)
- return cloned
- }
-
- cloneBefore(overrides = {}) {
- let cloned = this.clone(overrides)
- this.parent.insertBefore(this, cloned)
- return cloned
- }
-
- error(message, opts = {}) {
- if (this.source) {
- let { end, start } = this.rangeBy(opts)
- return this.source.input.error(
- message,
- { column: start.column, line: start.line },
- { column: end.column, line: end.line },
- opts
- )
- }
- return new CssSyntaxError(message)
- }
-
- getProxyProcessor() {
- return {
- get(node, prop) {
- if (prop === 'proxyOf') {
- return node
- } else if (prop === 'root') {
- return () => node.root().toProxy()
- } else {
- return node[prop]
- }
- },
-
- set(node, prop, value) {
- if (node[prop] === value) return true
- node[prop] = value
- if (
- prop === 'prop' ||
- prop === 'value' ||
- prop === 'name' ||
- prop === 'params' ||
- prop === 'important' ||
- /* c8 ignore next */
- prop === 'text'
- ) {
- node.markDirty()
- }
- return true
- }
- }
- }
-
- /* c8 ignore next 3 */
- markClean() {
- this[isClean] = true
- }
-
- markDirty() {
- if (this[isClean]) {
- this[isClean] = false
- let next = this
- while ((next = next.parent)) {
- next[isClean] = false
- }
- }
- }
-
- next() {
- if (!this.parent) return undefined
- let index = this.parent.index(this)
- return this.parent.nodes[index + 1]
- }
-
- positionBy(opts) {
- let pos = this.source.start
- if (opts.index) {
- pos = this.positionInside(opts.index)
- } else if (opts.word) {
- let stringRepresentation = this.source.input.css.slice(
- sourceOffset(this.source.input.css, this.source.start),
- sourceOffset(this.source.input.css, this.source.end)
- )
- let index = stringRepresentation.indexOf(opts.word)
- if (index !== -1) pos = this.positionInside(index)
- }
+ function position() {
return pos
}
- positionInside(index) {
- let column = this.source.start.column
- let line = this.source.start.line
- let offset = sourceOffset(this.source.input.css, this.source.start)
- let end = offset + index
-
- for (let i = offset; i < end; i++) {
- if (this.source.input.css[i] === '\n') {
- column = 1
- line += 1
- } else {
- column += 1
- }
- }
-
- return { column, line }
+ function unclosed(what) {
+ throw input.error('Unclosed ' + what, pos)
}
- prev() {
- if (!this.parent) return undefined
- let index = this.parent.index(this)
- return this.parent.nodes[index - 1]
+ function endOfFile() {
+ return returned.length === 0 && pos >= length
}
- rangeBy(opts) {
- let start = {
- column: this.source.start.column,
- line: this.source.start.line
- }
- let end = this.source.end
- ? {
- column: this.source.end.column + 1,
- line: this.source.end.line
- }
- : {
- column: start.column + 1,
- line: start.line
- }
+ function nextToken(opts) {
+ if (returned.length) return returned.pop()
+ if (pos >= length) return
- if (opts.word) {
- let stringRepresentation = this.source.input.css.slice(
- sourceOffset(this.source.input.css, this.source.start),
- sourceOffset(this.source.input.css, this.source.end)
- )
- let index = stringRepresentation.indexOf(opts.word)
- if (index !== -1) {
- start = this.positionInside(index)
- end = this.positionInside(
- index + opts.word.length,
+ let ignoreUnclosed = opts ? opts.ignoreUnclosed : false
+
+ code = css.charCodeAt(pos)
+
+ switch (code) {
+ case NEWLINE:
+ case SPACE:
+ case TAB:
+ case CR:
+ case FEED: {
+ next = pos
+ do {
+ next += 1
+ code = css.charCodeAt(next)
+ } while (
+ code === SPACE ||
+ code === NEWLINE ||
+ code === TAB ||
+ code === CR ||
+ code === FEED
)
- }
- } else {
- if (opts.start) {
- start = {
- column: opts.start.column,
- line: opts.start.line
- }
- } else if (opts.index) {
- start = this.positionInside(opts.index)
+
+ currentToken = ['space', css.slice(pos, next)]
+ pos = next - 1
+ break
}
- if (opts.end) {
- end = {
- column: opts.end.column,
- line: opts.end.line
- }
- } else if (typeof opts.endIndex === 'number') {
- end = this.positionInside(opts.endIndex)
- } else if (opts.index) {
- end = this.positionInside(opts.index + 1)
+ case OPEN_SQUARE:
+ case CLOSE_SQUARE:
+ case OPEN_CURLY:
+ case CLOSE_CURLY:
+ case COLON:
+ case SEMICOLON:
+ case CLOSE_PARENTHESES: {
+ let controlChar = String.fromCharCode(code)
+ currentToken = [controlChar, controlChar, pos]
+ break
}
- }
- if (
- end.line < start.line ||
- (end.line === start.line && end.column <= start.column)
- ) {
- end = { column: start.column + 1, line: start.line }
- }
+ case OPEN_PARENTHESES: {
+ prev = buffer.length ? buffer.pop()[1] : ''
+ n = css.charCodeAt(pos + 1)
+ if (
+ prev === 'url' &&
+ n !== SINGLE_QUOTE &&
+ n !== DOUBLE_QUOTE &&
+ n !== SPACE &&
+ n !== NEWLINE &&
+ n !== TAB &&
+ n !== FEED &&
+ n !== CR
+ ) {
+ next = pos
+ do {
+ escaped = false
+ next = css.indexOf(')', next + 1)
+ if (next === -1) {
+ if (ignore || ignoreUnclosed) {
+ next = pos
+ break
+ } else {
+ unclosed('bracket')
+ }
+ }
+ escapePos = next
+ while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
+ escapePos -= 1
+ escaped = !escaped
+ }
+ } while (escaped)
- return { end, start }
- }
+ currentToken = ['brackets', css.slice(pos, next + 1), pos, next]
- raw(prop, defaultType) {
- let str = new Stringifier()
- return str.raw(this, prop, defaultType)
- }
-
- remove() {
- if (this.parent) {
- this.parent.removeChild(this)
- }
- this.parent = undefined
- return this
- }
-
- replaceWith(...nodes) {
- if (this.parent) {
- let bookmark = this
- let foundSelf = false
- for (let node of nodes) {
- if (node === this) {
- foundSelf = true
- } else if (foundSelf) {
- this.parent.insertAfter(bookmark, node)
- bookmark = node
+ pos = next
} else {
- this.parent.insertBefore(bookmark, node)
- }
- }
+ next = css.indexOf(')', pos + 1)
+ content = css.slice(pos, next + 1)
- if (!foundSelf) {
- this.remove()
- }
- }
-
- return this
- }
-
- root() {
- let result = this
- while (result.parent && result.parent.type !== 'document') {
- result = result.parent
- }
- return result
- }
-
- toJSON(_, inputs) {
- let fixed = {}
- let emitInputs = inputs == null
- inputs = inputs || new Map()
- let inputsNextIndex = 0
-
- for (let name in this) {
- if (!Object.prototype.hasOwnProperty.call(this, name)) {
- /* c8 ignore next 2 */
- continue
- }
- if (name === 'parent' || name === 'proxyCache') continue
- let value = this[name]
-
- if (Array.isArray(value)) {
- fixed[name] = value.map(i => {
- if (typeof i === 'object' && i.toJSON) {
- return i.toJSON(null, inputs)
+ if (next === -1 || RE_BAD_BRACKET.test(content)) {
+ currentToken = ['(', '(', pos]
} else {
- return i
+ currentToken = ['brackets', content, pos, next]
+ pos = next
}
- })
- } else if (typeof value === 'object' && value.toJSON) {
- fixed[name] = value.toJSON(null, inputs)
- } else if (name === 'source') {
- let inputId = inputs.get(value.input)
- if (inputId == null) {
- inputId = inputsNextIndex
- inputs.set(value.input, inputsNextIndex)
- inputsNextIndex++
}
- fixed[name] = {
- end: value.end,
- inputId,
- start: value.start
+
+ break
+ }
+
+ case SINGLE_QUOTE:
+ case DOUBLE_QUOTE: {
+ quote = code === SINGLE_QUOTE ? "'" : '"'
+ next = pos
+ do {
+ escaped = false
+ next = css.indexOf(quote, next + 1)
+ if (next === -1) {
+ if (ignore || ignoreUnclosed) {
+ next = pos + 1
+ break
+ } else {
+ unclosed('string')
+ }
+ }
+ escapePos = next
+ while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
+ escapePos -= 1
+ escaped = !escaped
+ }
+ } while (escaped)
+
+ currentToken = ['string', css.slice(pos, next + 1), pos, next]
+ pos = next
+ break
+ }
+
+ case AT: {
+ RE_AT_END.lastIndex = pos + 1
+ RE_AT_END.test(css)
+ if (RE_AT_END.lastIndex === 0) {
+ next = css.length - 1
+ } else {
+ next = RE_AT_END.lastIndex - 2
}
- } else {
- fixed[name] = value
+
+ currentToken = ['at-word', css.slice(pos, next + 1), pos, next]
+
+ pos = next
+ break
+ }
+
+ case BACKSLASH: {
+ next = pos
+ escape = true
+ while (css.charCodeAt(next + 1) === BACKSLASH) {
+ next += 1
+ escape = !escape
+ }
+ code = css.charCodeAt(next + 1)
+ if (
+ escape &&
+ code !== SLASH &&
+ code !== SPACE &&
+ code !== NEWLINE &&
+ code !== TAB &&
+ code !== CR &&
+ code !== FEED
+ ) {
+ next += 1
+ if (RE_HEX_ESCAPE.test(css.charAt(next))) {
+ while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
+ next += 1
+ }
+ if (css.charCodeAt(next + 1) === SPACE) {
+ next += 1
+ }
+ }
+ }
+
+ currentToken = ['word', css.slice(pos, next + 1), pos, next]
+
+ pos = next
+ break
+ }
+
+ default: {
+ if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
+ next = css.indexOf('*/', pos + 2) + 1
+ if (next === 0) {
+ if (ignore || ignoreUnclosed) {
+ next = css.length
+ } else {
+ unclosed('comment')
+ }
+ }
+
+ currentToken = ['comment', css.slice(pos, next + 1), pos, next]
+ pos = next
+ } else {
+ RE_WORD_END.lastIndex = pos + 1
+ RE_WORD_END.test(css)
+ if (RE_WORD_END.lastIndex === 0) {
+ next = css.length - 1
+ } else {
+ next = RE_WORD_END.lastIndex - 2
+ }
+
+ currentToken = ['word', css.slice(pos, next + 1), pos, next]
+ buffer.push(currentToken)
+ pos = next
+ }
+
+ break
}
}
- if (emitInputs) {
- fixed.inputs = [...inputs.keys()].map(input => input.toJSON())
- }
-
- return fixed
+ pos++
+ return currentToken
}
- toProxy() {
- if (!this.proxyCache) {
- this.proxyCache = new Proxy(this, this.getProxyProcessor())
- }
- return this.proxyCache
+ function back(token) {
+ returned.push(token)
}
- toString(stringifier = stringify) {
- if (stringifier.stringify) stringifier = stringifier.stringify
- let result = ''
- stringifier(this, i => {
- result += i
- })
- return result
- }
-
- warn(result, text, opts) {
- let data = { node: this }
- for (let i in opts) data[i] = opts[i]
- return result.warn(text, data)
- }
-
- get proxyOf() {
- return this
+ return {
+ back,
+ endOfFile,
+ nextToken,
+ position
}
}
-module.exports = Node
-Node.default = Node
-
/***/ }),
-/***/ 4295:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 2739:
+/***/ (() => {
+
+/* (ignored) */
+
+/***/ }),
+
+/***/ 2775:
+/***/ ((module) => {
+
+var x=String;
+var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
+module.exports=create();
+module.exports.createColors = create;
+
+
+/***/ }),
+
+/***/ 3122:
+/***/ ((module) => {
"use strict";
+/* eslint-disable no-console */
-let Container = __webpack_require__(683)
-let Input = __webpack_require__(5380)
-let Parser = __webpack_require__(3937)
+let printed = {}
-function parse(css, opts) {
- let input = new Input(css, opts)
- let parser = new Parser(input)
- try {
- parser.parse()
- } catch (e) {
- if (false) {}
- throw e
+module.exports = function warnOnce(message) {
+ if (printed[message]) return
+ printed[message] = true
+
+ if (typeof console !== 'undefined' && console.warn) {
+ console.warn(message)
}
-
- return parser.root
}
-module.exports = parse
-parse.default = parse
-Container.registerParse(parse)
+/***/ }),
+
+/***/ 3815:
+/***/ ((module) => {
+
+module.exports = function walk(nodes, cb, bubble) {
+ var i, max, node, result;
+
+ for (i = 0, max = nodes.length; i < max; i += 1) {
+ node = nodes[i];
+ if (!bubble) {
+ result = cb(node, i, nodes);
+ }
+
+ if (
+ result !== false &&
+ node.type === "function" &&
+ Array.isArray(node.nodes)
+ ) {
+ walk(node.nodes, cb, bubble);
+ }
+
+ if (bubble) {
+ cb(node, i, nodes);
+ }
+ }
+};
/***/ }),
@@ -5158,6 +3502,8 @@ class Parser {
if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {
prev.raws.ownSemicolon = this.spaces
this.spaces = ''
+ prev.source.end = this.getPosition(token[2])
+ prev.source.end.offset += prev.raws.ownSemicolon.length
}
}
}
@@ -5402,7 +3748,7 @@ class Parser {
unknownWord(tokens) {
throw this.input.error(
- 'Unknown word',
+ 'Unknown word ' + tokens[0][1],
{ offset: tokens[0][2] },
{ offset: tokens[0][2] + tokens[0][1].length }
)
@@ -5420,6 +3766,1305 @@ class Parser {
module.exports = Parser
+/***/ }),
+
+/***/ 4067:
+/***/ ((module) => {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+
+module.exports = ReactPropTypesSecret;
+
+
+/***/ }),
+
+/***/ 4092:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Container = __webpack_require__(683)
+let list = __webpack_require__(7374)
+
+class Rule extends Container {
+ get selectors() {
+ return list.comma(this.selector)
+ }
+
+ set selectors(values) {
+ let match = this.selector ? this.selector.match(/,\s*/) : null
+ let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
+ this.selector = values.join(sep)
+ }
+
+ constructor(defaults) {
+ super(defaults)
+ this.type = 'rule'
+ if (!this.nodes) this.nodes = []
+ }
+}
+
+module.exports = Rule
+Rule.default = Rule
+
+Container.registerRule(Rule)
+
+
+/***/ }),
+
+/***/ 4132:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+"use strict";
+var __webpack_unused_export__;
+
+__webpack_unused_export__ = true;
+var TextareaAutosize_1 = __webpack_require__(4462);
+exports.A = TextareaAutosize_1.TextareaAutosize;
+
+
+/***/ }),
+
+/***/ 4295:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let Container = __webpack_require__(683)
+let Input = __webpack_require__(5380)
+let Parser = __webpack_require__(3937)
+
+function parse(css, opts) {
+ let input = new Input(css, opts)
+ let parser = new Parser(input)
+ try {
+ parser.parse()
+ } catch (e) {
+ if (false) {}
+ throw e
+ }
+
+ return parser.root
+}
+
+module.exports = parse
+parse.default = parse
+
+Container.registerParse(parse)
+
+
+/***/ }),
+
+/***/ 4306:
+/***/ (function(module, exports) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ autosize 4.0.4
+ license: MIT
+ http://www.jacklmoore.com/autosize
+*/
+(function (global, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else { var mod; }
+})(this, function (module, exports) {
+ 'use strict';
+
+ var map = typeof Map === "function" ? new Map() : function () {
+ var keys = [];
+ var values = [];
+
+ return {
+ has: function has(key) {
+ return keys.indexOf(key) > -1;
+ },
+ get: function get(key) {
+ return values[keys.indexOf(key)];
+ },
+ set: function set(key, value) {
+ if (keys.indexOf(key) === -1) {
+ keys.push(key);
+ values.push(value);
+ }
+ },
+ delete: function _delete(key) {
+ var index = keys.indexOf(key);
+ if (index > -1) {
+ keys.splice(index, 1);
+ values.splice(index, 1);
+ }
+ }
+ };
+ }();
+
+ var createEvent = function createEvent(name) {
+ return new Event(name, { bubbles: true });
+ };
+ try {
+ new Event('test');
+ } catch (e) {
+ // IE does not support `new Event()`
+ createEvent = function createEvent(name) {
+ var evt = document.createEvent('Event');
+ evt.initEvent(name, true, false);
+ return evt;
+ };
+ }
+
+ function assign(ta) {
+ if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
+
+ var heightOffset = null;
+ var clientWidth = null;
+ var cachedHeight = null;
+
+ function init() {
+ var style = window.getComputedStyle(ta, null);
+
+ if (style.resize === 'vertical') {
+ ta.style.resize = 'none';
+ } else if (style.resize === 'both') {
+ ta.style.resize = 'horizontal';
+ }
+
+ if (style.boxSizing === 'content-box') {
+ heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
+ } else {
+ heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
+ }
+ // Fix when a textarea is not on document body and heightOffset is Not a Number
+ if (isNaN(heightOffset)) {
+ heightOffset = 0;
+ }
+
+ update();
+ }
+
+ function changeOverflow(value) {
+ {
+ // Chrome/Safari-specific fix:
+ // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
+ // made available by removing the scrollbar. The following forces the necessary text reflow.
+ var width = ta.style.width;
+ ta.style.width = '0px';
+ // Force reflow:
+ /* jshint ignore:start */
+ ta.offsetWidth;
+ /* jshint ignore:end */
+ ta.style.width = width;
+ }
+
+ ta.style.overflowY = value;
+ }
+
+ function getParentOverflows(el) {
+ var arr = [];
+
+ while (el && el.parentNode && el.parentNode instanceof Element) {
+ if (el.parentNode.scrollTop) {
+ arr.push({
+ node: el.parentNode,
+ scrollTop: el.parentNode.scrollTop
+ });
+ }
+ el = el.parentNode;
+ }
+
+ return arr;
+ }
+
+ function resize() {
+ if (ta.scrollHeight === 0) {
+ // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
+ return;
+ }
+
+ var overflows = getParentOverflows(ta);
+ var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
+
+ ta.style.height = '';
+ ta.style.height = ta.scrollHeight + heightOffset + 'px';
+
+ // used to check if an update is actually necessary on window.resize
+ clientWidth = ta.clientWidth;
+
+ // prevents scroll-position jumping
+ overflows.forEach(function (el) {
+ el.node.scrollTop = el.scrollTop;
+ });
+
+ if (docTop) {
+ document.documentElement.scrollTop = docTop;
+ }
+ }
+
+ function update() {
+ resize();
+
+ var styleHeight = Math.round(parseFloat(ta.style.height));
+ var computed = window.getComputedStyle(ta, null);
+
+ // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
+ var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
+
+ // The actual height not matching the style height (set via the resize method) indicates that
+ // the max-height has been exceeded, in which case the overflow should be allowed.
+ if (actualHeight < styleHeight) {
+ if (computed.overflowY === 'hidden') {
+ changeOverflow('scroll');
+ resize();
+ actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
+ }
+ } else {
+ // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
+ if (computed.overflowY !== 'hidden') {
+ changeOverflow('hidden');
+ resize();
+ actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
+ }
+ }
+
+ if (cachedHeight !== actualHeight) {
+ cachedHeight = actualHeight;
+ var evt = createEvent('autosize:resized');
+ try {
+ ta.dispatchEvent(evt);
+ } catch (err) {
+ // Firefox will throw an error on dispatchEvent for a detached element
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
+ }
+ }
+ }
+
+ var pageResize = function pageResize() {
+ if (ta.clientWidth !== clientWidth) {
+ update();
+ }
+ };
+
+ var destroy = function (style) {
+ window.removeEventListener('resize', pageResize, false);
+ ta.removeEventListener('input', update, false);
+ ta.removeEventListener('keyup', update, false);
+ ta.removeEventListener('autosize:destroy', destroy, false);
+ ta.removeEventListener('autosize:update', update, false);
+
+ Object.keys(style).forEach(function (key) {
+ ta.style[key] = style[key];
+ });
+
+ map.delete(ta);
+ }.bind(ta, {
+ height: ta.style.height,
+ resize: ta.style.resize,
+ overflowY: ta.style.overflowY,
+ overflowX: ta.style.overflowX,
+ wordWrap: ta.style.wordWrap
+ });
+
+ ta.addEventListener('autosize:destroy', destroy, false);
+
+ // IE9 does not fire onpropertychange or oninput for deletions,
+ // so binding to onkeyup to catch most of those events.
+ // There is no way that I know of to detect something like 'cut' in IE9.
+ if ('onpropertychange' in ta && 'oninput' in ta) {
+ ta.addEventListener('keyup', update, false);
+ }
+
+ window.addEventListener('resize', pageResize, false);
+ ta.addEventListener('input', update, false);
+ ta.addEventListener('autosize:update', update, false);
+ ta.style.overflowX = 'hidden';
+ ta.style.wordWrap = 'break-word';
+
+ map.set(ta, {
+ destroy: destroy,
+ update: update
+ });
+
+ init();
+ }
+
+ function destroy(ta) {
+ var methods = map.get(ta);
+ if (methods) {
+ methods.destroy();
+ }
+ }
+
+ function update(ta) {
+ var methods = map.get(ta);
+ if (methods) {
+ methods.update();
+ }
+ }
+
+ var autosize = null;
+
+ // Do nothing in Node.js environment and IE8 (or lower)
+ if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
+ autosize = function autosize(el) {
+ return el;
+ };
+ autosize.destroy = function (el) {
+ return el;
+ };
+ autosize.update = function (el) {
+ return el;
+ };
+ } else {
+ autosize = function autosize(el, options) {
+ if (el) {
+ Array.prototype.forEach.call(el.length ? el : [el], function (x) {
+ return assign(x, options);
+ });
+ }
+ return el;
+ };
+ autosize.destroy = function (el) {
+ if (el) {
+ Array.prototype.forEach.call(el.length ? el : [el], destroy);
+ }
+ return el;
+ };
+ autosize.update = function (el) {
+ if (el) {
+ Array.prototype.forEach.call(el.length ? el : [el], update);
+ }
+ return el;
+ };
+ }
+
+ exports.default = autosize;
+ module.exports = exports['default'];
+});
+
+/***/ }),
+
+/***/ 4462:
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
+
+"use strict";
+
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __assign = (this && this.__assign) || Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+};
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
+ t[p[i]] = s[p[i]];
+ return t;
+};
+exports.__esModule = true;
+var React = __webpack_require__(1609);
+var PropTypes = __webpack_require__(5826);
+var autosize = __webpack_require__(4306);
+var _getLineHeight = __webpack_require__(461);
+var getLineHeight = _getLineHeight;
+var RESIZED = "autosize:resized";
+/**
+ * A light replacement for built-in textarea component
+ * which automaticaly adjusts its height to match the content
+ */
+var TextareaAutosizeClass = /** @class */ (function (_super) {
+ __extends(TextareaAutosizeClass, _super);
+ function TextareaAutosizeClass() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.state = {
+ lineHeight: null
+ };
+ _this.textarea = null;
+ _this.onResize = function (e) {
+ if (_this.props.onResize) {
+ _this.props.onResize(e);
+ }
+ };
+ _this.updateLineHeight = function () {
+ if (_this.textarea) {
+ _this.setState({
+ lineHeight: getLineHeight(_this.textarea)
+ });
+ }
+ };
+ _this.onChange = function (e) {
+ var onChange = _this.props.onChange;
+ _this.currentValue = e.currentTarget.value;
+ onChange && onChange(e);
+ };
+ return _this;
+ }
+ TextareaAutosizeClass.prototype.componentDidMount = function () {
+ var _this = this;
+ var _a = this.props, maxRows = _a.maxRows, async = _a.async;
+ if (typeof maxRows === "number") {
+ this.updateLineHeight();
+ }
+ if (typeof maxRows === "number" || async) {
+ /*
+ the defer is needed to:
+ - force "autosize" to activate the scrollbar when this.props.maxRows is passed
+ - support StyledComponents (see #71)
+ */
+ setTimeout(function () { return _this.textarea && autosize(_this.textarea); });
+ }
+ else {
+ this.textarea && autosize(this.textarea);
+ }
+ if (this.textarea) {
+ this.textarea.addEventListener(RESIZED, this.onResize);
+ }
+ };
+ TextareaAutosizeClass.prototype.componentWillUnmount = function () {
+ if (this.textarea) {
+ this.textarea.removeEventListener(RESIZED, this.onResize);
+ autosize.destroy(this.textarea);
+ }
+ };
+ TextareaAutosizeClass.prototype.render = function () {
+ var _this = this;
+ var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight;
+ var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
+ return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {
+ _this.textarea = element;
+ if (typeof _this.props.innerRef === 'function') {
+ _this.props.innerRef(element);
+ }
+ else if (_this.props.innerRef) {
+ _this.props.innerRef.current = element;
+ }
+ } }), children));
+ };
+ TextareaAutosizeClass.prototype.componentDidUpdate = function () {
+ this.textarea && autosize.update(this.textarea);
+ };
+ TextareaAutosizeClass.defaultProps = {
+ rows: 1,
+ async: false
+ };
+ TextareaAutosizeClass.propTypes = {
+ rows: PropTypes.number,
+ maxRows: PropTypes.number,
+ onResize: PropTypes.func,
+ innerRef: PropTypes.any,
+ async: PropTypes.bool
+ };
+ return TextareaAutosizeClass;
+}(React.Component));
+exports.TextareaAutosize = React.forwardRef(function (props, ref) {
+ return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));
+});
+
+
+/***/ }),
+
+/***/ 4725:
+/***/ ((module) => {
+
+function stringifyNode(node, custom) {
+ var type = node.type;
+ var value = node.value;
+ var buf;
+ var customResult;
+
+ if (custom && (customResult = custom(node)) !== undefined) {
+ return customResult;
+ } else if (type === "word" || type === "space") {
+ return value;
+ } else if (type === "string") {
+ buf = node.quote || "";
+ return buf + value + (node.unclosed ? "" : buf);
+ } else if (type === "comment") {
+ return "/*" + value + (node.unclosed ? "" : "*/");
+ } else if (type === "div") {
+ return (node.before || "") + value + (node.after || "");
+ } else if (Array.isArray(node.nodes)) {
+ buf = stringify(node.nodes, custom);
+ if (type !== "function") {
+ return buf;
+ }
+ return (
+ value +
+ "(" +
+ (node.before || "") +
+ buf +
+ (node.after || "") +
+ (node.unclosed ? "" : ")")
+ );
+ }
+ return value;
+}
+
+function stringify(nodes, custom) {
+ var result, i;
+
+ if (Array.isArray(nodes)) {
+ result = "";
+ for (i = nodes.length - 1; ~i; i -= 1) {
+ result = stringifyNode(nodes[i], custom) + result;
+ }
+ return result;
+ }
+ return stringifyNode(nodes, custom);
+}
+
+module.exports = stringify;
+
+
+/***/ }),
+
+/***/ 5042:
+/***/ ((module) => {
+
+// This alphabet uses `A-Za-z0-9_-` symbols.
+// The order of characters is optimized for better gzip and brotli compression.
+// References to the same file (works both for gzip and brotli):
+// `'use`, `andom`, and `rict'`
+// References to the brotli default dictionary:
+// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
+let urlAlphabet =
+ 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
+
+let customAlphabet = (alphabet, defaultSize = 21) => {
+ return (size = defaultSize) => {
+ let id = ''
+ // A compact alternative for `for (var i = 0; i < step; i++)`.
+ let i = size | 0
+ while (i--) {
+ // `| 0` is more compact and faster than `Math.floor()`.
+ id += alphabet[(Math.random() * alphabet.length) | 0]
+ }
+ return id
+ }
+}
+
+let nanoid = (size = 21) => {
+ let id = ''
+ // A compact alternative for `for (var i = 0; i < step; i++)`.
+ let i = size | 0
+ while (i--) {
+ // `| 0` is more compact and faster than `Math.floor()`.
+ id += urlAlphabet[(Math.random() * 64) | 0]
+ }
+ return id
+}
+
+module.exports = { nanoid, customAlphabet }
+
+
+/***/ }),
+
+/***/ 5215:
+/***/ ((module) => {
+
+"use strict";
+
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
+
+
+/***/ }),
+
+/***/ 5380:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let { nanoid } = __webpack_require__(5042)
+let { isAbsolute, resolve } = __webpack_require__(197)
+let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(1866)
+let { fileURLToPath, pathToFileURL } = __webpack_require__(2739)
+
+let CssSyntaxError = __webpack_require__(356)
+let PreviousMap = __webpack_require__(5696)
+let terminalHighlight = __webpack_require__(9746)
+
+let fromOffsetCache = Symbol('fromOffsetCache')
+
+let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
+let pathAvailable = Boolean(resolve && isAbsolute)
+
+class Input {
+ get from() {
+ return this.file || this.id
+ }
+
+ constructor(css, opts = {}) {
+ if (
+ css === null ||
+ typeof css === 'undefined' ||
+ (typeof css === 'object' && !css.toString)
+ ) {
+ throw new Error(`PostCSS received ${css} instead of CSS string`)
+ }
+
+ this.css = css.toString()
+
+ if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') {
+ this.hasBOM = true
+ this.css = this.css.slice(1)
+ } else {
+ this.hasBOM = false
+ }
+
+ this.document = this.css
+ if (opts.document) this.document = opts.document.toString()
+
+ if (opts.from) {
+ if (
+ !pathAvailable ||
+ /^\w+:\/\//.test(opts.from) ||
+ isAbsolute(opts.from)
+ ) {
+ this.file = opts.from
+ } else {
+ this.file = resolve(opts.from)
+ }
+ }
+
+ if (pathAvailable && sourceMapAvailable) {
+ let map = new PreviousMap(this.css, opts)
+ if (map.text) {
+ this.map = map
+ let file = map.consumer().file
+ if (!this.file && file) this.file = this.mapResolve(file)
+ }
+ }
+
+ if (!this.file) {
+ this.id = ''
+ }
+ if (this.map) this.map.file = this.from
+ }
+
+ error(message, line, column, opts = {}) {
+ let endColumn, endLine, result
+
+ if (line && typeof line === 'object') {
+ let start = line
+ let end = column
+ if (typeof start.offset === 'number') {
+ let pos = this.fromOffset(start.offset)
+ line = pos.line
+ column = pos.col
+ } else {
+ line = start.line
+ column = start.column
+ }
+ if (typeof end.offset === 'number') {
+ let pos = this.fromOffset(end.offset)
+ endLine = pos.line
+ endColumn = pos.col
+ } else {
+ endLine = end.line
+ endColumn = end.column
+ }
+ } else if (!column) {
+ let pos = this.fromOffset(line)
+ line = pos.line
+ column = pos.col
+ }
+
+ let origin = this.origin(line, column, endLine, endColumn)
+ if (origin) {
+ result = new CssSyntaxError(
+ message,
+ origin.endLine === undefined
+ ? origin.line
+ : { column: origin.column, line: origin.line },
+ origin.endLine === undefined
+ ? origin.column
+ : { column: origin.endColumn, line: origin.endLine },
+ origin.source,
+ origin.file,
+ opts.plugin
+ )
+ } else {
+ result = new CssSyntaxError(
+ message,
+ endLine === undefined ? line : { column, line },
+ endLine === undefined ? column : { column: endColumn, line: endLine },
+ this.css,
+ this.file,
+ opts.plugin
+ )
+ }
+
+ result.input = { column, endColumn, endLine, line, source: this.css }
+ if (this.file) {
+ if (pathToFileURL) {
+ result.input.url = pathToFileURL(this.file).toString()
+ }
+ result.input.file = this.file
+ }
+
+ return result
+ }
+
+ fromOffset(offset) {
+ let lastLine, lineToIndex
+ if (!this[fromOffsetCache]) {
+ let lines = this.css.split('\n')
+ lineToIndex = new Array(lines.length)
+ let prevIndex = 0
+
+ for (let i = 0, l = lines.length; i < l; i++) {
+ lineToIndex[i] = prevIndex
+ prevIndex += lines[i].length + 1
+ }
+
+ this[fromOffsetCache] = lineToIndex
+ } else {
+ lineToIndex = this[fromOffsetCache]
+ }
+ lastLine = lineToIndex[lineToIndex.length - 1]
+
+ let min = 0
+ if (offset >= lastLine) {
+ min = lineToIndex.length - 1
+ } else {
+ let max = lineToIndex.length - 2
+ let mid
+ while (min < max) {
+ mid = min + ((max - min) >> 1)
+ if (offset < lineToIndex[mid]) {
+ max = mid - 1
+ } else if (offset >= lineToIndex[mid + 1]) {
+ min = mid + 1
+ } else {
+ min = mid
+ break
+ }
+ }
+ }
+ return {
+ col: offset - lineToIndex[min] + 1,
+ line: min + 1
+ }
+ }
+
+ mapResolve(file) {
+ if (/^\w+:\/\//.test(file)) {
+ return file
+ }
+ return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)
+ }
+
+ origin(line, column, endLine, endColumn) {
+ if (!this.map) return false
+ let consumer = this.map.consumer()
+
+ let from = consumer.originalPositionFor({ column, line })
+ if (!from.source) return false
+
+ let to
+ if (typeof endLine === 'number') {
+ to = consumer.originalPositionFor({ column: endColumn, line: endLine })
+ }
+
+ let fromUrl
+
+ if (isAbsolute(from.source)) {
+ fromUrl = pathToFileURL(from.source)
+ } else {
+ fromUrl = new URL(
+ from.source,
+ this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
+ )
+ }
+
+ let result = {
+ column: from.column,
+ endColumn: to && to.column,
+ endLine: to && to.line,
+ line: from.line,
+ url: fromUrl.toString()
+ }
+
+ if (fromUrl.protocol === 'file:') {
+ if (fileURLToPath) {
+ result.file = fileURLToPath(fromUrl)
+ } else {
+ /* c8 ignore next 2 */
+ throw new Error(`file: protocol is not available in this PostCSS build`)
+ }
+ }
+
+ let source = consumer.sourceContentFor(from.source)
+ if (source) result.source = source
+
+ return result
+ }
+
+ toJSON() {
+ let json = {}
+ for (let name of ['hasBOM', 'css', 'file', 'id']) {
+ if (this[name] != null) {
+ json[name] = this[name]
+ }
+ }
+ if (this.map) {
+ json.map = { ...this.map }
+ if (json.map.consumerCache) {
+ json.map.consumerCache = undefined
+ }
+ }
+ return json
+ }
+}
+
+module.exports = Input
+Input.default = Input
+
+if (terminalHighlight && terminalHighlight.registerInput) {
+ terminalHighlight.registerInput(Input)
+}
+
+
+/***/ }),
+
+/***/ 5404:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+const CSSValueParser = __webpack_require__(1544)
+
+/**
+ * @type {import('postcss').PluginCreator}
+ */
+module.exports = (opts) => {
+
+ const DEFAULTS = {
+ skipHostRelativeUrls: true,
+ }
+ const config = Object.assign(DEFAULTS, opts)
+
+ return {
+ postcssPlugin: 'rebaseUrl',
+
+ Declaration(decl) {
+ // The faster way to find Declaration node
+ const parsedValue = CSSValueParser(decl.value)
+
+ let valueChanged = false
+ parsedValue.walk(node => {
+ if (node.type !== 'function' || node.value !== 'url') {
+ return
+ }
+
+ const urlVal = node.nodes[0].value
+
+ // bases relative URLs with rootUrl
+ const basedUrl = new URL(urlVal, opts.rootUrl)
+
+ // skip host-relative, already normalized URLs (e.g. `/images/image.jpg`, without `..`s)
+ if ((basedUrl.pathname === urlVal) && config.skipHostRelativeUrls) {
+ return false // skip this value
+ }
+
+ node.nodes[0].value = basedUrl.toString()
+ valueChanged = true
+
+ return false // do not walk deeper
+ })
+
+ if (valueChanged) {
+ decl.value = CSSValueParser.stringify(parsedValue)
+ }
+
+ }
+ }
+}
+
+module.exports.postcss = true
+
+
+/***/ }),
+
+/***/ 5417:
+/***/ ((__unused_webpack_module, exports) => {
+
+"use strict";
+/*istanbul ignore start*/
+
+
+Object.defineProperty(exports, "__esModule", ({
+ value: true
+}));
+exports["default"] = Diff;
+
+/*istanbul ignore end*/
+function Diff() {}
+
+Diff.prototype = {
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ diff: function diff(oldString, newString) {
+ /*istanbul ignore start*/
+ var
+ /*istanbul ignore end*/
+ options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var callback = options.callback;
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ this.options = options;
+ var self = this;
+
+ function done(value) {
+ if (callback) {
+ setTimeout(function () {
+ callback(undefined, value);
+ }, 0);
+ return true;
+ } else {
+ return value;
+ }
+ } // Allow subclasses to massage the input prior to running
+
+
+ oldString = this.castInput(oldString);
+ newString = this.castInput(newString);
+ oldString = this.removeEmpty(this.tokenize(oldString));
+ newString = this.removeEmpty(this.tokenize(newString));
+ var newLen = newString.length,
+ oldLen = oldString.length;
+ var editLength = 1;
+ var maxEditLength = newLen + oldLen;
+ var bestPath = [{
+ newPos: -1,
+ components: []
+ }]; // Seed editLength = 0, i.e. the content starts with the same values
+
+ var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+
+ if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
+ // Identity per the equality and tokenizer
+ return done([{
+ value: this.join(newString),
+ count: newString.length
+ }]);
+ } // Main worker method. checks all permutations of a given edit length for acceptance.
+
+
+ function execEditLength() {
+ for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
+ var basePath =
+ /*istanbul ignore start*/
+ void 0
+ /*istanbul ignore end*/
+ ;
+
+ var addPath = bestPath[diagonalPath - 1],
+ removePath = bestPath[diagonalPath + 1],
+ _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
+
+ if (addPath) {
+ // No one else is going to attempt to use this value, clear it
+ bestPath[diagonalPath - 1] = undefined;
+ }
+
+ var canAdd = addPath && addPath.newPos + 1 < newLen,
+ canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
+
+ if (!canAdd && !canRemove) {
+ // If this path is a terminal then prune
+ bestPath[diagonalPath] = undefined;
+ continue;
+ } // Select the diagonal that we want to branch from. We select the prior
+ // path whose position in the new string is the farthest from the origin
+ // and does not pass the bounds of the diff graph
+
+
+ if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
+ basePath = clonePath(removePath);
+ self.pushComponent(basePath.components, undefined, true);
+ } else {
+ basePath = addPath; // No need to clone, we've pulled it from the list
+
+ basePath.newPos++;
+ self.pushComponent(basePath.components, true, undefined);
+ }
+
+ _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
+
+ if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
+ return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
+ } else {
+ // Otherwise track this path as a potential candidate and continue.
+ bestPath[diagonalPath] = basePath;
+ }
+ }
+
+ editLength++;
+ } // Performs the length of edit iteration. Is a bit fugly as this has to support the
+ // sync and async mode which is never fun. Loops over execEditLength until a value
+ // is produced.
+
+
+ if (callback) {
+ (function exec() {
+ setTimeout(function () {
+ // This should not happen, but we want to be safe.
+
+ /* istanbul ignore next */
+ if (editLength > maxEditLength) {
+ return callback();
+ }
+
+ if (!execEditLength()) {
+ exec();
+ }
+ }, 0);
+ })();
+ } else {
+ while (editLength <= maxEditLength) {
+ var ret = execEditLength();
+
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ pushComponent: function pushComponent(components, added, removed) {
+ var last = components[components.length - 1];
+
+ if (last && last.added === added && last.removed === removed) {
+ // We need to clone here as the component clone operation is just
+ // as shallow array clone
+ components[components.length - 1] = {
+ count: last.count + 1,
+ added: added,
+ removed: removed
+ };
+ } else {
+ components.push({
+ count: 1,
+ added: added,
+ removed: removed
+ });
+ }
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
+ var newLen = newString.length,
+ oldLen = oldString.length,
+ newPos = basePath.newPos,
+ oldPos = newPos - diagonalPath,
+ commonCount = 0;
+
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
+ newPos++;
+ oldPos++;
+ commonCount++;
+ }
+
+ if (commonCount) {
+ basePath.components.push({
+ count: commonCount
+ });
+ }
+
+ basePath.newPos = newPos;
+ return oldPos;
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ equals: function equals(left, right) {
+ if (this.options.comparator) {
+ return this.options.comparator(left, right);
+ } else {
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+ }
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ removeEmpty: function removeEmpty(array) {
+ var ret = [];
+
+ for (var i = 0; i < array.length; i++) {
+ if (array[i]) {
+ ret.push(array[i]);
+ }
+ }
+
+ return ret;
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ castInput: function castInput(value) {
+ return value;
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ tokenize: function tokenize(value) {
+ return value.split('');
+ },
+
+ /*istanbul ignore start*/
+
+ /*istanbul ignore end*/
+ join: function join(chars) {
+ return chars.join('');
+ }
+};
+
+function buildValues(diff, components, newString, oldString, useLongestToken) {
+ var componentPos = 0,
+ componentLen = components.length,
+ newPos = 0,
+ oldPos = 0;
+
+ for (; componentPos < componentLen; componentPos++) {
+ var component = components[componentPos];
+
+ if (!component.removed) {
+ if (!component.added && useLongestToken) {
+ var value = newString.slice(newPos, newPos + component.count);
+ value = value.map(function (value, i) {
+ var oldValue = oldString[oldPos + i];
+ return oldValue.length > value.length ? oldValue : value;
+ });
+ component.value = diff.join(value);
+ } else {
+ component.value = diff.join(newString.slice(newPos, newPos + component.count));
+ }
+
+ newPos += component.count; // Common case
+
+ if (!component.added) {
+ oldPos += component.count;
+ }
+ } else {
+ component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
+ oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
+ // The diffing algorithm is tied to add then remove output and this is the simplest
+ // route to get the desired output with minimal overhead.
+
+ if (componentPos && components[componentPos - 1].added) {
+ var tmp = components[componentPos - 1];
+ components[componentPos - 1] = components[componentPos];
+ components[componentPos] = tmp;
+ }
+ }
+ } // Special case handle for when one terminal is ignored (i.e. whitespace).
+ // For this case we merge the terminal into the prior string and drop the change.
+ // This is only available for string mode.
+
+
+ var lastComponent = components[componentLen - 1];
+
+ if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
+ components[componentLen - 2].value += lastComponent.value;
+ components.pop();
+ }
+
+ return components;
+}
+
+function clonePath(path) {
+ return {
+ newPos: path.newPos,
+ components: path.components.slice(0)
+ };
+}
+
+
/***/ }),
/***/ 5696:
@@ -5574,71 +5219,1468 @@ PreviousMap.default = PreviousMap
/***/ }),
-/***/ 9656:
+/***/ 5776:
+/***/ ((module) => {
+
+"use strict";
+
+
+class Warning {
+ constructor(text, opts = {}) {
+ this.type = 'warning'
+ this.text = text
+
+ if (opts.node && opts.node.source) {
+ let range = opts.node.rangeBy(opts)
+ this.line = range.start.line
+ this.column = range.start.column
+ this.endLine = range.end.line
+ this.endColumn = range.end.column
+ }
+
+ for (let opt in opts) this[opt] = opts[opt]
+ }
+
+ toString() {
+ if (this.node) {
+ return this.node.error(this.text, {
+ index: this.index,
+ plugin: this.plugin,
+ word: this.word
+ }).message
+ }
+
+ if (this.plugin) {
+ return this.plugin + ': ' + this.text
+ }
+
+ return this.text
+ }
+}
+
+module.exports = Warning
+Warning.default = Warning
+
+
+/***/ }),
+
+/***/ 5826:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+if (false) { var throwOnDirectAccess, ReactIs; } else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = __webpack_require__(628)();
+}
+
+
+/***/ }),
+
+/***/ 6109:
+/***/ ((module) => {
+
+// This code has been refactored for 140 bytes
+// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
+var computedStyle = function (el, prop, getComputedStyle) {
+ getComputedStyle = window.getComputedStyle;
+
+ // In one fell swoop
+ return (
+ // If we have getComputedStyle
+ getComputedStyle ?
+ // Query it
+ // TODO: From CSS-Query notes, we might need (node, null) for FF
+ getComputedStyle(el) :
+
+ // Otherwise, we are in IE and use currentStyle
+ el.currentStyle
+ )[
+ // Switch to camelCase for CSSOM
+ // DEV: Grabbed from jQuery
+ // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
+ // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
+ prop.replace(/-(\w)/gi, function (word, letter) {
+ return letter.toUpperCase();
+ })
+ ];
+};
+
+module.exports = computedStyle;
+
+
+/***/ }),
+
+/***/ 6589:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-let Document = __webpack_require__(271)
-let LazyResult = __webpack_require__(448)
-let NoWorkResult = __webpack_require__(7661)
-let Root = __webpack_require__(9434)
+let Node = __webpack_require__(7490)
-class Processor {
- constructor(plugins = []) {
- this.version = '8.4.49'
- this.plugins = this.normalize(plugins)
- }
-
- normalize(plugins) {
- let normalized = []
- for (let i of plugins) {
- if (i.postcss === true) {
- i = i()
- } else if (i.postcss) {
- i = i.postcss
- }
-
- if (typeof i === 'object' && Array.isArray(i.plugins)) {
- normalized = normalized.concat(i.plugins)
- } else if (typeof i === 'object' && i.postcssPlugin) {
- normalized.push(i)
- } else if (typeof i === 'function') {
- normalized.push(i)
- } else if (typeof i === 'object' && (i.parse || i.stringify)) {
- if (false) {}
- } else {
- throw new Error(i + ' is not a PostCSS plugin')
- }
- }
- return normalized
- }
-
- process(css, opts = {}) {
- if (
- !this.plugins.length &&
- !opts.parser &&
- !opts.stringifier &&
- !opts.syntax
- ) {
- return new NoWorkResult(this, css, opts)
- } else {
- return new LazyResult(this, css, opts)
- }
- }
-
- use(plugin) {
- this.plugins = this.plugins.concat(this.normalize([plugin]))
- return this
+class Comment extends Node {
+ constructor(defaults) {
+ super(defaults)
+ this.type = 'comment'
}
}
-module.exports = Processor
-Processor.default = Processor
+module.exports = Comment
+Comment.default = Comment
-Root.registerProcessor(Processor)
-Document.registerProcessor(Processor)
+
+/***/ }),
+
+/***/ 7191:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+/**
+ * Copyright (c) 2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule normalizeWheel
+ * @typechecks
+ */
+
+
+
+var UserAgent_DEPRECATED = __webpack_require__(2213);
+
+var isEventSupported = __webpack_require__(1087);
+
+
+// Reasonable defaults
+var PIXEL_STEP = 10;
+var LINE_HEIGHT = 40;
+var PAGE_HEIGHT = 800;
+
+/**
+ * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
+ * complicated, thus this doc is long and (hopefully) detailed enough to answer
+ * your questions.
+ *
+ * If you need to react to the mouse wheel in a predictable way, this code is
+ * like your bestest friend. * hugs *
+ *
+ * As of today, there are 4 DOM event types you can listen to:
+ *
+ * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
+ * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
+ * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
+ * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
+ *
+ * So what to do? The is the best:
+ *
+ * normalizeWheel.getEventType();
+ *
+ * In your event callback, use this code to get sane interpretation of the
+ * deltas. This code will return an object with properties:
+ *
+ * spinX -- normalized spin speed (use for zoom) - x plane
+ * spinY -- " - y plane
+ * pixelX -- normalized distance (to pixels) - x plane
+ * pixelY -- " - y plane
+ *
+ * Wheel values are provided by the browser assuming you are using the wheel to
+ * scroll a web page by a number of lines or pixels (or pages). Values can vary
+ * significantly on different platforms and browsers, forgetting that you can
+ * scroll at different speeds. Some devices (like trackpads) emit more events
+ * at smaller increments with fine granularity, and some emit massive jumps with
+ * linear speed or acceleration.
+ *
+ * This code does its best to normalize the deltas for you:
+ *
+ * - spin is trying to normalize how far the wheel was spun (or trackpad
+ * dragged). This is super useful for zoom support where you want to
+ * throw away the chunky scroll steps on the PC and make those equal to
+ * the slow and smooth tiny steps on the Mac. Key data: This code tries to
+ * resolve a single slow step on a wheel to 1.
+ *
+ * - pixel is normalizing the desired scroll delta in pixel units. You'll
+ * get the crazy differences between browsers, but at least it'll be in
+ * pixels!
+ *
+ * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
+ * should translate to positive value zooming IN, negative zooming OUT.
+ * This matches the newer 'wheel' event.
+ *
+ * Why are there spinX, spinY (or pixels)?
+ *
+ * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
+ * with a mouse. It results in side-scrolling in the browser by default.
+ *
+ * - spinY is what you expect -- it's the classic axis of a mouse wheel.
+ *
+ * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
+ * probably is by browsers in conjunction with fancy 3D controllers .. but
+ * you know.
+ *
+ * Implementation info:
+ *
+ * Examples of 'wheel' event if you scroll slowly (down) by one step with an
+ * average mouse:
+ *
+ * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
+ * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
+ * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
+ * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
+ * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
+ *
+ * On the trackpad:
+ *
+ * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
+ * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
+ *
+ * On other/older browsers.. it's more complicated as there can be multiple and
+ * also missing delta values.
+ *
+ * The 'wheel' event is more standard:
+ *
+ * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
+ *
+ * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
+ * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
+ * backward compatibility with older events. Those other values help us
+ * better normalize spin speed. Example of what the browsers provide:
+ *
+ * | event.wheelDelta | event.detail
+ * ------------------+------------------+--------------
+ * Safari v5/OS X | -120 | 0
+ * Safari v5/Win7 | -120 | 0
+ * Chrome v17/OS X | -120 | 0
+ * Chrome v17/Win7 | -120 | 0
+ * IE9/Win7 | -120 | undefined
+ * Firefox v4/OS X | undefined | 1
+ * Firefox v4/Win7 | undefined | 3
+ *
+ */
+function normalizeWheel(/*object*/ event) /*object*/ {
+ var sX = 0, sY = 0, // spinX, spinY
+ pX = 0, pY = 0; // pixelX, pixelY
+
+ // Legacy
+ if ('detail' in event) { sY = event.detail; }
+ if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
+ if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
+ if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
+
+ // side scrolling on FF with DOMMouseScroll
+ if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
+ sX = sY;
+ sY = 0;
+ }
+
+ pX = sX * PIXEL_STEP;
+ pY = sY * PIXEL_STEP;
+
+ if ('deltaY' in event) { pY = event.deltaY; }
+ if ('deltaX' in event) { pX = event.deltaX; }
+
+ if ((pX || pY) && event.deltaMode) {
+ if (event.deltaMode == 1) { // delta in LINE units
+ pX *= LINE_HEIGHT;
+ pY *= LINE_HEIGHT;
+ } else { // delta in PAGE units
+ pX *= PAGE_HEIGHT;
+ pY *= PAGE_HEIGHT;
+ }
+ }
+
+ // Fall-back if spin cannot be determined
+ if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
+ if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
+
+ return { spinX : sX,
+ spinY : sY,
+ pixelX : pX,
+ pixelY : pY };
+}
+
+
+/**
+ * The best combination if you prefer spinX + spinY normalization. It favors
+ * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
+ * 'wheel' event, making spin speed determination impossible.
+ */
+normalizeWheel.getEventType = function() /*string*/ {
+ return (UserAgent_DEPRECATED.firefox())
+ ? 'DOMMouseScroll'
+ : (isEventSupported('wheel'))
+ ? 'wheel'
+ : 'mousewheel';
+};
+
+module.exports = normalizeWheel;
+
+
+/***/ }),
+
+/***/ 7374:
+/***/ ((module) => {
+
+"use strict";
+
+
+let list = {
+ comma(string) {
+ return list.split(string, [','], true)
+ },
+
+ space(string) {
+ let spaces = [' ', '\n', '\t']
+ return list.split(string, spaces)
+ },
+
+ split(string, separators, last) {
+ let array = []
+ let current = ''
+ let split = false
+
+ let func = 0
+ let inQuote = false
+ let prevQuote = ''
+ let escape = false
+
+ for (let letter of string) {
+ if (escape) {
+ escape = false
+ } else if (letter === '\\') {
+ escape = true
+ } else if (inQuote) {
+ if (letter === prevQuote) {
+ inQuote = false
+ }
+ } else if (letter === '"' || letter === "'") {
+ inQuote = true
+ prevQuote = letter
+ } else if (letter === '(') {
+ func += 1
+ } else if (letter === ')') {
+ if (func > 0) func -= 1
+ } else if (func === 0) {
+ if (separators.includes(letter)) split = true
+ }
+
+ if (split) {
+ if (current !== '') array.push(current.trim())
+ current = ''
+ split = false
+ } else {
+ current += letter
+ }
+ }
+
+ if (last || current !== '') array.push(current.trim())
+ return array
+ }
+}
+
+module.exports = list
+list.default = list
+
+
+/***/ }),
+
+/***/ 7490:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let CssSyntaxError = __webpack_require__(356)
+let Stringifier = __webpack_require__(346)
+let stringify = __webpack_require__(633)
+let { isClean, my } = __webpack_require__(1381)
+
+function cloneNode(obj, parent) {
+ let cloned = new obj.constructor()
+
+ for (let i in obj) {
+ if (!Object.prototype.hasOwnProperty.call(obj, i)) {
+ /* c8 ignore next 2 */
+ continue
+ }
+ if (i === 'proxyCache') continue
+ let value = obj[i]
+ let type = typeof value
+
+ if (i === 'parent' && type === 'object') {
+ if (parent) cloned[i] = parent
+ } else if (i === 'source') {
+ cloned[i] = value
+ } else if (Array.isArray(value)) {
+ cloned[i] = value.map(j => cloneNode(j, cloned))
+ } else {
+ if (type === 'object' && value !== null) value = cloneNode(value)
+ cloned[i] = value
+ }
+ }
+
+ return cloned
+}
+
+function sourceOffset(inputCSS, position) {
+ // Not all custom syntaxes support `offset` in `source.start` and `source.end`
+ if (
+ position &&
+ typeof position.offset !== 'undefined'
+ ) {
+ return position.offset;
+ }
+
+ let column = 1
+ let line = 1
+ let offset = 0
+
+ for (let i = 0; i < inputCSS.length; i++) {
+ if (line === position.line && column === position.column) {
+ offset = i
+ break
+ }
+
+ if (inputCSS[i] === '\n') {
+ column = 1
+ line += 1
+ } else {
+ column += 1
+ }
+ }
+
+ return offset
+}
+
+class Node {
+ get proxyOf() {
+ return this
+ }
+
+ constructor(defaults = {}) {
+ this.raws = {}
+ this[isClean] = false
+ this[my] = true
+
+ for (let name in defaults) {
+ if (name === 'nodes') {
+ this.nodes = []
+ for (let node of defaults[name]) {
+ if (typeof node.clone === 'function') {
+ this.append(node.clone())
+ } else {
+ this.append(node)
+ }
+ }
+ } else {
+ this[name] = defaults[name]
+ }
+ }
+ }
+
+ addToError(error) {
+ error.postcssNode = this
+ if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
+ let s = this.source
+ error.stack = error.stack.replace(
+ /\n\s{4}at /,
+ `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
+ )
+ }
+ return error
+ }
+
+ after(add) {
+ this.parent.insertAfter(this, add)
+ return this
+ }
+
+ assign(overrides = {}) {
+ for (let name in overrides) {
+ this[name] = overrides[name]
+ }
+ return this
+ }
+
+ before(add) {
+ this.parent.insertBefore(this, add)
+ return this
+ }
+
+ cleanRaws(keepBetween) {
+ delete this.raws.before
+ delete this.raws.after
+ if (!keepBetween) delete this.raws.between
+ }
+
+ clone(overrides = {}) {
+ let cloned = cloneNode(this)
+ for (let name in overrides) {
+ cloned[name] = overrides[name]
+ }
+ return cloned
+ }
+
+ cloneAfter(overrides = {}) {
+ let cloned = this.clone(overrides)
+ this.parent.insertAfter(this, cloned)
+ return cloned
+ }
+
+ cloneBefore(overrides = {}) {
+ let cloned = this.clone(overrides)
+ this.parent.insertBefore(this, cloned)
+ return cloned
+ }
+
+ error(message, opts = {}) {
+ if (this.source) {
+ let { end, start } = this.rangeBy(opts)
+ return this.source.input.error(
+ message,
+ { column: start.column, line: start.line },
+ { column: end.column, line: end.line },
+ opts
+ )
+ }
+ return new CssSyntaxError(message)
+ }
+
+ getProxyProcessor() {
+ return {
+ get(node, prop) {
+ if (prop === 'proxyOf') {
+ return node
+ } else if (prop === 'root') {
+ return () => node.root().toProxy()
+ } else {
+ return node[prop]
+ }
+ },
+
+ set(node, prop, value) {
+ if (node[prop] === value) return true
+ node[prop] = value
+ if (
+ prop === 'prop' ||
+ prop === 'value' ||
+ prop === 'name' ||
+ prop === 'params' ||
+ prop === 'important' ||
+ /* c8 ignore next */
+ prop === 'text'
+ ) {
+ node.markDirty()
+ }
+ return true
+ }
+ }
+ }
+
+ /* c8 ignore next 3 */
+ markClean() {
+ this[isClean] = true
+ }
+
+ markDirty() {
+ if (this[isClean]) {
+ this[isClean] = false
+ let next = this
+ while ((next = next.parent)) {
+ next[isClean] = false
+ }
+ }
+ }
+
+ next() {
+ if (!this.parent) return undefined
+ let index = this.parent.index(this)
+ return this.parent.nodes[index + 1]
+ }
+
+ positionBy(opts) {
+ let pos = this.source.start
+ if (opts.index) {
+ pos = this.positionInside(opts.index)
+ } else if (opts.word) {
+ let inputString = ('document' in this.source.input)
+ ? this.source.input.document
+ : this.source.input.css
+ let stringRepresentation = inputString.slice(
+ sourceOffset(inputString, this.source.start),
+ sourceOffset(inputString, this.source.end)
+ )
+ let index = stringRepresentation.indexOf(opts.word)
+ if (index !== -1) pos = this.positionInside(index)
+ }
+ return pos
+ }
+
+ positionInside(index) {
+ let column = this.source.start.column
+ let line = this.source.start.line
+ let inputString = ('document' in this.source.input)
+ ? this.source.input.document
+ : this.source.input.css
+ let offset = sourceOffset(inputString, this.source.start)
+ let end = offset + index
+
+ for (let i = offset; i < end; i++) {
+ if (inputString[i] === '\n') {
+ column = 1
+ line += 1
+ } else {
+ column += 1
+ }
+ }
+
+ return { column, line }
+ }
+
+ prev() {
+ if (!this.parent) return undefined
+ let index = this.parent.index(this)
+ return this.parent.nodes[index - 1]
+ }
+
+ rangeBy(opts) {
+ let start = {
+ column: this.source.start.column,
+ line: this.source.start.line
+ }
+ let end = this.source.end
+ ? {
+ column: this.source.end.column + 1,
+ line: this.source.end.line
+ }
+ : {
+ column: start.column + 1,
+ line: start.line
+ }
+
+ if (opts.word) {
+ let inputString = ('document' in this.source.input)
+ ? this.source.input.document
+ : this.source.input.css
+ let stringRepresentation = inputString.slice(
+ sourceOffset(inputString, this.source.start),
+ sourceOffset(inputString, this.source.end)
+ )
+ let index = stringRepresentation.indexOf(opts.word)
+ if (index !== -1) {
+ start = this.positionInside(index)
+ end = this.positionInside(
+ index + opts.word.length,
+ )
+ }
+ } else {
+ if (opts.start) {
+ start = {
+ column: opts.start.column,
+ line: opts.start.line
+ }
+ } else if (opts.index) {
+ start = this.positionInside(opts.index)
+ }
+
+ if (opts.end) {
+ end = {
+ column: opts.end.column,
+ line: opts.end.line
+ }
+ } else if (typeof opts.endIndex === 'number') {
+ end = this.positionInside(opts.endIndex)
+ } else if (opts.index) {
+ end = this.positionInside(opts.index + 1)
+ }
+ }
+
+ if (
+ end.line < start.line ||
+ (end.line === start.line && end.column <= start.column)
+ ) {
+ end = { column: start.column + 1, line: start.line }
+ }
+
+ return { end, start }
+ }
+
+ raw(prop, defaultType) {
+ let str = new Stringifier()
+ return str.raw(this, prop, defaultType)
+ }
+
+ remove() {
+ if (this.parent) {
+ this.parent.removeChild(this)
+ }
+ this.parent = undefined
+ return this
+ }
+
+ replaceWith(...nodes) {
+ if (this.parent) {
+ let bookmark = this
+ let foundSelf = false
+ for (let node of nodes) {
+ if (node === this) {
+ foundSelf = true
+ } else if (foundSelf) {
+ this.parent.insertAfter(bookmark, node)
+ bookmark = node
+ } else {
+ this.parent.insertBefore(bookmark, node)
+ }
+ }
+
+ if (!foundSelf) {
+ this.remove()
+ }
+ }
+
+ return this
+ }
+
+ root() {
+ let result = this
+ while (result.parent && result.parent.type !== 'document') {
+ result = result.parent
+ }
+ return result
+ }
+
+ toJSON(_, inputs) {
+ let fixed = {}
+ let emitInputs = inputs == null
+ inputs = inputs || new Map()
+ let inputsNextIndex = 0
+
+ for (let name in this) {
+ if (!Object.prototype.hasOwnProperty.call(this, name)) {
+ /* c8 ignore next 2 */
+ continue
+ }
+ if (name === 'parent' || name === 'proxyCache') continue
+ let value = this[name]
+
+ if (Array.isArray(value)) {
+ fixed[name] = value.map(i => {
+ if (typeof i === 'object' && i.toJSON) {
+ return i.toJSON(null, inputs)
+ } else {
+ return i
+ }
+ })
+ } else if (typeof value === 'object' && value.toJSON) {
+ fixed[name] = value.toJSON(null, inputs)
+ } else if (name === 'source') {
+ let inputId = inputs.get(value.input)
+ if (inputId == null) {
+ inputId = inputsNextIndex
+ inputs.set(value.input, inputsNextIndex)
+ inputsNextIndex++
+ }
+ fixed[name] = {
+ end: value.end,
+ inputId,
+ start: value.start
+ }
+ } else {
+ fixed[name] = value
+ }
+ }
+
+ if (emitInputs) {
+ fixed.inputs = [...inputs.keys()].map(input => input.toJSON())
+ }
+
+ return fixed
+ }
+
+ toProxy() {
+ if (!this.proxyCache) {
+ this.proxyCache = new Proxy(this, this.getProxyProcessor())
+ }
+ return this.proxyCache
+ }
+
+ toString(stringifier = stringify) {
+ if (stringifier.stringify) stringifier = stringifier.stringify
+ let result = ''
+ stringifier(this, i => {
+ result += i
+ })
+ return result
+ }
+
+ warn(result, text, opts) {
+ let data = { node: this }
+ for (let i in opts) data[i] = opts[i]
+ return result.warn(text, data)
+ }
+}
+
+module.exports = Node
+Node.default = Node
+
+
+/***/ }),
+
+/***/ 7520:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = __webpack_require__(7191);
+
+
+/***/ }),
+
+/***/ 7661:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+let MapGenerator = __webpack_require__(1670)
+let parse = __webpack_require__(4295)
+const Result = __webpack_require__(9055)
+let stringify = __webpack_require__(633)
+let warnOnce = __webpack_require__(3122)
+
+class NoWorkResult {
+ get content() {
+ return this.result.css
+ }
+
+ get css() {
+ return this.result.css
+ }
+
+ get map() {
+ return this.result.map
+ }
+
+ get messages() {
+ return []
+ }
+
+ get opts() {
+ return this.result.opts
+ }
+
+ get processor() {
+ return this.result.processor
+ }
+
+ get root() {
+ if (this._root) {
+ return this._root
+ }
+
+ let root
+ let parser = parse
+
+ try {
+ root = parser(this._css, this._opts)
+ } catch (error) {
+ this.error = error
+ }
+
+ if (this.error) {
+ throw this.error
+ } else {
+ this._root = root
+ return root
+ }
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'NoWorkResult'
+ }
+
+ constructor(processor, css, opts) {
+ css = css.toString()
+ this.stringified = false
+
+ this._processor = processor
+ this._css = css
+ this._opts = opts
+ this._map = undefined
+ let root
+
+ let str = stringify
+ this.result = new Result(this._processor, root, this._opts)
+ this.result.css = css
+
+ let self = this
+ Object.defineProperty(this.result, 'root', {
+ get() {
+ return self.root
+ }
+ })
+
+ let map = new MapGenerator(str, root, this._opts, css)
+ if (map.isMap()) {
+ let [generatedCSS, generatedMap] = map.generate()
+ if (generatedCSS) {
+ this.result.css = generatedCSS
+ }
+ if (generatedMap) {
+ this.result.map = generatedMap
+ }
+ } else {
+ map.clearAnnotation()
+ this.result.css = map.css
+ }
+ }
+
+ async() {
+ if (this.error) return Promise.reject(this.error)
+ return Promise.resolve(this.result)
+ }
+
+ catch(onRejected) {
+ return this.async().catch(onRejected)
+ }
+
+ finally(onFinally) {
+ return this.async().then(onFinally, onFinally)
+ }
+
+ sync() {
+ if (this.error) throw this.error
+ return this.result
+ }
+
+ then(onFulfilled, onRejected) {
+ if (false) {}
+
+ return this.async().then(onFulfilled, onRejected)
+ }
+
+ toString() {
+ return this._css
+ }
+
+ warnings() {
+ return []
+ }
+}
+
+module.exports = NoWorkResult
+NoWorkResult.default = NoWorkResult
+
+
+/***/ }),
+
+/***/ 7734:
+/***/ ((module) => {
+
+"use strict";
+
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
+
+
+/***/ }),
+
+/***/ 8021:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+"use strict";
+var __webpack_unused_export__;
+/*istanbul ignore start*/
+
+
+__webpack_unused_export__ = ({
+ value: true
+});
+exports.JJ = diffChars;
+__webpack_unused_export__ = void 0;
+
+/*istanbul ignore end*/
+var
+/*istanbul ignore start*/
+_base = _interopRequireDefault(__webpack_require__(5417))
+/*istanbul ignore end*/
+;
+
+/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/*istanbul ignore end*/
+var characterDiff = new
+/*istanbul ignore start*/
+_base
+/*istanbul ignore end*/
+.
+/*istanbul ignore start*/
+default
+/*istanbul ignore end*/
+();
+
+/*istanbul ignore start*/
+__webpack_unused_export__ = characterDiff;
+
+/*istanbul ignore end*/
+function diffChars(oldStr, newStr, options) {
+ return characterDiff.diff(oldStr, newStr, options);
+}
+
+
+/***/ }),
+
+/***/ 8202:
+/***/ ((module) => {
+
+"use strict";
+/**
+ * Copyright (c) 2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ExecutionEnvironment
+ */
+
+/*jslint evil: true */
+
+
+
+var canUseDOM = !!(
+ typeof window !== 'undefined' &&
+ window.document &&
+ window.document.createElement
+);
+
+/**
+ * Simple, lightweight module assisting with the detection and context of
+ * Worker. Helps avoid circular dependencies and allows code to reason about
+ * whether or not they are in a Worker, even if they never include the main
+ * `ReactWorker` dependency.
+ */
+var ExecutionEnvironment = {
+
+ canUseDOM: canUseDOM,
+
+ canUseWorkers: typeof Worker !== 'undefined',
+
+ canUseEventListeners:
+ canUseDOM && !!(window.addEventListener || window.attachEvent),
+
+ canUseViewport: canUseDOM && !!window.screen,
+
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
+
+};
+
+module.exports = ExecutionEnvironment;
+
+
+/***/ }),
+
+/***/ 8491:
+/***/ ((module) => {
+
+var openParentheses = "(".charCodeAt(0);
+var closeParentheses = ")".charCodeAt(0);
+var singleQuote = "'".charCodeAt(0);
+var doubleQuote = '"'.charCodeAt(0);
+var backslash = "\\".charCodeAt(0);
+var slash = "/".charCodeAt(0);
+var comma = ",".charCodeAt(0);
+var colon = ":".charCodeAt(0);
+var star = "*".charCodeAt(0);
+var uLower = "u".charCodeAt(0);
+var uUpper = "U".charCodeAt(0);
+var plus = "+".charCodeAt(0);
+var isUnicodeRange = /^[a-f0-9?-]+$/i;
+
+module.exports = function(input) {
+ var tokens = [];
+ var value = input;
+
+ var next,
+ quote,
+ prev,
+ token,
+ escape,
+ escapePos,
+ whitespacePos,
+ parenthesesOpenPos;
+ var pos = 0;
+ var code = value.charCodeAt(pos);
+ var max = value.length;
+ var stack = [{ nodes: tokens }];
+ var balanced = 0;
+ var parent;
+
+ var name = "";
+ var before = "";
+ var after = "";
+
+ while (pos < max) {
+ // Whitespaces
+ if (code <= 32) {
+ next = pos;
+ do {
+ next += 1;
+ code = value.charCodeAt(next);
+ } while (code <= 32);
+ token = value.slice(pos, next);
+
+ prev = tokens[tokens.length - 1];
+ if (code === closeParentheses && balanced) {
+ after = token;
+ } else if (prev && prev.type === "div") {
+ prev.after = token;
+ prev.sourceEndIndex += token.length;
+ } else if (
+ code === comma ||
+ code === colon ||
+ (code === slash &&
+ value.charCodeAt(next + 1) !== star &&
+ (!parent ||
+ (parent && parent.type === "function" && parent.value !== "calc")))
+ ) {
+ before = token;
+ } else {
+ tokens.push({
+ type: "space",
+ sourceIndex: pos,
+ sourceEndIndex: next,
+ value: token
+ });
+ }
+
+ pos = next;
+
+ // Quotes
+ } else if (code === singleQuote || code === doubleQuote) {
+ next = pos;
+ quote = code === singleQuote ? "'" : '"';
+ token = {
+ type: "string",
+ sourceIndex: pos,
+ quote: quote
+ };
+ do {
+ escape = false;
+ next = value.indexOf(quote, next + 1);
+ if (~next) {
+ escapePos = next;
+ while (value.charCodeAt(escapePos - 1) === backslash) {
+ escapePos -= 1;
+ escape = !escape;
+ }
+ } else {
+ value += quote;
+ next = value.length - 1;
+ token.unclosed = true;
+ }
+ } while (escape);
+ token.value = value.slice(pos + 1, next);
+ token.sourceEndIndex = token.unclosed ? next : next + 1;
+ tokens.push(token);
+ pos = next + 1;
+ code = value.charCodeAt(pos);
+
+ // Comments
+ } else if (code === slash && value.charCodeAt(pos + 1) === star) {
+ next = value.indexOf("*/", pos);
+
+ token = {
+ type: "comment",
+ sourceIndex: pos,
+ sourceEndIndex: next + 2
+ };
+
+ if (next === -1) {
+ token.unclosed = true;
+ next = value.length;
+ token.sourceEndIndex = next;
+ }
+
+ token.value = value.slice(pos + 2, next);
+ tokens.push(token);
+
+ pos = next + 2;
+ code = value.charCodeAt(pos);
+
+ // Operation within calc
+ } else if (
+ (code === slash || code === star) &&
+ parent &&
+ parent.type === "function" &&
+ parent.value === "calc"
+ ) {
+ token = value[pos];
+ tokens.push({
+ type: "word",
+ sourceIndex: pos - before.length,
+ sourceEndIndex: pos + token.length,
+ value: token
+ });
+ pos += 1;
+ code = value.charCodeAt(pos);
+
+ // Dividers
+ } else if (code === slash || code === comma || code === colon) {
+ token = value[pos];
+
+ tokens.push({
+ type: "div",
+ sourceIndex: pos - before.length,
+ sourceEndIndex: pos + token.length,
+ value: token,
+ before: before,
+ after: ""
+ });
+ before = "";
+
+ pos += 1;
+ code = value.charCodeAt(pos);
+
+ // Open parentheses
+ } else if (openParentheses === code) {
+ // Whitespaces after open parentheses
+ next = pos;
+ do {
+ next += 1;
+ code = value.charCodeAt(next);
+ } while (code <= 32);
+ parenthesesOpenPos = pos;
+ token = {
+ type: "function",
+ sourceIndex: pos - name.length,
+ value: name,
+ before: value.slice(parenthesesOpenPos + 1, next)
+ };
+ pos = next;
+
+ if (name === "url" && code !== singleQuote && code !== doubleQuote) {
+ next -= 1;
+ do {
+ escape = false;
+ next = value.indexOf(")", next + 1);
+ if (~next) {
+ escapePos = next;
+ while (value.charCodeAt(escapePos - 1) === backslash) {
+ escapePos -= 1;
+ escape = !escape;
+ }
+ } else {
+ value += ")";
+ next = value.length - 1;
+ token.unclosed = true;
+ }
+ } while (escape);
+ // Whitespaces before closed
+ whitespacePos = next;
+ do {
+ whitespacePos -= 1;
+ code = value.charCodeAt(whitespacePos);
+ } while (code <= 32);
+ if (parenthesesOpenPos < whitespacePos) {
+ if (pos !== whitespacePos + 1) {
+ token.nodes = [
+ {
+ type: "word",
+ sourceIndex: pos,
+ sourceEndIndex: whitespacePos + 1,
+ value: value.slice(pos, whitespacePos + 1)
+ }
+ ];
+ } else {
+ token.nodes = [];
+ }
+ if (token.unclosed && whitespacePos + 1 !== next) {
+ token.after = "";
+ token.nodes.push({
+ type: "space",
+ sourceIndex: whitespacePos + 1,
+ sourceEndIndex: next,
+ value: value.slice(whitespacePos + 1, next)
+ });
+ } else {
+ token.after = value.slice(whitespacePos + 1, next);
+ token.sourceEndIndex = next;
+ }
+ } else {
+ token.after = "";
+ token.nodes = [];
+ }
+ pos = next + 1;
+ token.sourceEndIndex = token.unclosed ? next : pos;
+ code = value.charCodeAt(pos);
+ tokens.push(token);
+ } else {
+ balanced += 1;
+ token.after = "";
+ token.sourceEndIndex = pos + 1;
+ tokens.push(token);
+ stack.push(token);
+ tokens = token.nodes = [];
+ parent = token;
+ }
+ name = "";
+
+ // Close parentheses
+ } else if (closeParentheses === code && balanced) {
+ pos += 1;
+ code = value.charCodeAt(pos);
+
+ parent.after = after;
+ parent.sourceEndIndex += after.length;
+ after = "";
+ balanced -= 1;
+ stack[stack.length - 1].sourceEndIndex = pos;
+ stack.pop();
+ parent = stack[balanced];
+ tokens = parent.nodes;
+
+ // Words
+ } else {
+ next = pos;
+ do {
+ if (code === backslash) {
+ next += 1;
+ }
+ next += 1;
+ code = value.charCodeAt(next);
+ } while (
+ next < max &&
+ !(
+ code <= 32 ||
+ code === singleQuote ||
+ code === doubleQuote ||
+ code === comma ||
+ code === colon ||
+ code === slash ||
+ code === openParentheses ||
+ (code === star &&
+ parent &&
+ parent.type === "function" &&
+ parent.value === "calc") ||
+ (code === slash &&
+ parent.type === "function" &&
+ parent.value === "calc") ||
+ (code === closeParentheses && balanced)
+ )
+ );
+ token = value.slice(pos, next);
+
+ if (openParentheses === code) {
+ name = token;
+ } else if (
+ (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&
+ plus === token.charCodeAt(1) &&
+ isUnicodeRange.test(token.slice(2))
+ ) {
+ tokens.push({
+ type: "unicode-range",
+ sourceIndex: pos,
+ sourceEndIndex: next,
+ value: token
+ });
+ } else {
+ tokens.push({
+ type: "word",
+ sourceIndex: pos,
+ sourceEndIndex: next,
+ value: token
+ });
+ }
+
+ pos = next;
+ }
+ }
+
+ for (pos = stack.length - 1; pos; pos -= 1) {
+ stack[pos].unclosed = true;
+ stack[pos].sourceEndIndex = value.length;
+ }
+
+ return stack[0].nodes;
+};
/***/ }),
@@ -5652,6 +6694,10 @@ Document.registerProcessor(Processor)
let Warning = __webpack_require__(5776)
class Result {
+ get content() {
+ return this.css
+ }
+
constructor(processor, root, opts) {
this.processor = processor
this.messages = []
@@ -5681,10 +6727,6 @@ class Result {
warnings() {
return this.messages.filter(i => i.type === 'warning')
}
-
- get content() {
- return this.css
- }
}
module.exports = Result
@@ -5762,1029 +6804,71 @@ Container.registerRoot(Root)
/***/ }),
-/***/ 4092:
+/***/ 9656:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-let Container = __webpack_require__(683)
-let list = __webpack_require__(7374)
+let Document = __webpack_require__(271)
+let LazyResult = __webpack_require__(448)
+let NoWorkResult = __webpack_require__(7661)
+let Root = __webpack_require__(9434)
-class Rule extends Container {
- constructor(defaults) {
- super(defaults)
- this.type = 'rule'
- if (!this.nodes) this.nodes = []
+class Processor {
+ constructor(plugins = []) {
+ this.version = '8.5.3'
+ this.plugins = this.normalize(plugins)
}
- get selectors() {
- return list.comma(this.selector)
- }
-
- set selectors(values) {
- let match = this.selector ? this.selector.match(/,\s*/) : null
- let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
- this.selector = values.join(sep)
- }
-}
-
-module.exports = Rule
-Rule.default = Rule
-
-Container.registerRule(Rule)
-
-
-/***/ }),
-
-/***/ 346:
-/***/ ((module) => {
-
-"use strict";
-
-
-const DEFAULT_RAW = {
- after: '\n',
- beforeClose: '\n',
- beforeComment: '\n',
- beforeDecl: '\n',
- beforeOpen: ' ',
- beforeRule: '\n',
- colon: ': ',
- commentLeft: ' ',
- commentRight: ' ',
- emptyBody: '',
- indent: ' ',
- semicolon: false
-}
-
-function capitalize(str) {
- return str[0].toUpperCase() + str.slice(1)
-}
-
-class Stringifier {
- constructor(builder) {
- this.builder = builder
- }
-
- atrule(node, semicolon) {
- let name = '@' + node.name
- let params = node.params ? this.rawValue(node, 'params') : ''
-
- if (typeof node.raws.afterName !== 'undefined') {
- name += node.raws.afterName
- } else if (params) {
- name += ' '
- }
-
- if (node.nodes) {
- this.block(node, name + params)
- } else {
- let end = (node.raws.between || '') + (semicolon ? ';' : '')
- this.builder(name + params + end, node)
- }
- }
-
- beforeAfter(node, detect) {
- let value
- if (node.type === 'decl') {
- value = this.raw(node, null, 'beforeDecl')
- } else if (node.type === 'comment') {
- value = this.raw(node, null, 'beforeComment')
- } else if (detect === 'before') {
- value = this.raw(node, null, 'beforeRule')
- } else {
- value = this.raw(node, null, 'beforeClose')
- }
-
- let buf = node.parent
- let depth = 0
- while (buf && buf.type !== 'root') {
- depth += 1
- buf = buf.parent
- }
-
- if (value.includes('\n')) {
- let indent = this.raw(node, null, 'indent')
- if (indent.length) {
- for (let step = 0; step < depth; step++) value += indent
- }
- }
-
- return value
- }
-
- block(node, start) {
- let between = this.raw(node, 'between', 'beforeOpen')
- this.builder(start + between + '{', node, 'start')
-
- let after
- if (node.nodes && node.nodes.length) {
- this.body(node)
- after = this.raw(node, 'after')
- } else {
- after = this.raw(node, 'after', 'emptyBody')
- }
-
- if (after) this.builder(after)
- this.builder('}', node, 'end')
- }
-
- body(node) {
- let last = node.nodes.length - 1
- while (last > 0) {
- if (node.nodes[last].type !== 'comment') break
- last -= 1
- }
-
- let semicolon = this.raw(node, 'semicolon')
- for (let i = 0; i < node.nodes.length; i++) {
- let child = node.nodes[i]
- let before = this.raw(child, 'before')
- if (before) this.builder(before)
- this.stringify(child, last !== i || semicolon)
- }
- }
-
- comment(node) {
- let left = this.raw(node, 'left', 'commentLeft')
- let right = this.raw(node, 'right', 'commentRight')
- this.builder('/*' + left + node.text + right + '*/', node)
- }
-
- decl(node, semicolon) {
- let between = this.raw(node, 'between', 'colon')
- let string = node.prop + between + this.rawValue(node, 'value')
-
- if (node.important) {
- string += node.raws.important || ' !important'
- }
-
- if (semicolon) string += ';'
- this.builder(string, node)
- }
-
- document(node) {
- this.body(node)
- }
-
- raw(node, own, detect) {
- let value
- if (!detect) detect = own
-
- // Already had
- if (own) {
- value = node.raws[own]
- if (typeof value !== 'undefined') return value
- }
-
- let parent = node.parent
-
- if (detect === 'before') {
- // Hack for first rule in CSS
- if (!parent || (parent.type === 'root' && parent.first === node)) {
- return ''
+ normalize(plugins) {
+ let normalized = []
+ for (let i of plugins) {
+ if (i.postcss === true) {
+ i = i()
+ } else if (i.postcss) {
+ i = i.postcss
}
- // `root` nodes in `document` should use only their own raws
- if (parent && parent.type === 'document') {
- return ''
- }
- }
-
- // Floating child without parent
- if (!parent) return DEFAULT_RAW[detect]
-
- // Detect style by other nodes
- let root = node.root()
- if (!root.rawCache) root.rawCache = {}
- if (typeof root.rawCache[detect] !== 'undefined') {
- return root.rawCache[detect]
- }
-
- if (detect === 'before' || detect === 'after') {
- return this.beforeAfter(node, detect)
- } else {
- let method = 'raw' + capitalize(detect)
- if (this[method]) {
- value = this[method](root, node)
+ if (typeof i === 'object' && Array.isArray(i.plugins)) {
+ normalized = normalized.concat(i.plugins)
+ } else if (typeof i === 'object' && i.postcssPlugin) {
+ normalized.push(i)
+ } else if (typeof i === 'function') {
+ normalized.push(i)
+ } else if (typeof i === 'object' && (i.parse || i.stringify)) {
+ if (false) {}
} else {
- root.walk(i => {
- value = i.raws[own]
- if (typeof value !== 'undefined') return false
- })
+ throw new Error(i + ' is not a PostCSS plugin')
}
}
-
- if (typeof value === 'undefined') value = DEFAULT_RAW[detect]
-
- root.rawCache[detect] = value
- return value
+ return normalized
}
- rawBeforeClose(root) {
- let value
- root.walk(i => {
- if (i.nodes && i.nodes.length > 0) {
- if (typeof i.raws.after !== 'undefined') {
- value = i.raws.after
- if (value.includes('\n')) {
- value = value.replace(/[^\n]+$/, '')
- }
- return false
- }
- }
- })
- if (value) value = value.replace(/\S/g, '')
- return value
- }
-
- rawBeforeComment(root, node) {
- let value
- root.walkComments(i => {
- if (typeof i.raws.before !== 'undefined') {
- value = i.raws.before
- if (value.includes('\n')) {
- value = value.replace(/[^\n]+$/, '')
- }
- return false
- }
- })
- if (typeof value === 'undefined') {
- value = this.raw(node, null, 'beforeDecl')
- } else if (value) {
- value = value.replace(/\S/g, '')
- }
- return value
- }
-
- rawBeforeDecl(root, node) {
- let value
- root.walkDecls(i => {
- if (typeof i.raws.before !== 'undefined') {
- value = i.raws.before
- if (value.includes('\n')) {
- value = value.replace(/[^\n]+$/, '')
- }
- return false
- }
- })
- if (typeof value === 'undefined') {
- value = this.raw(node, null, 'beforeRule')
- } else if (value) {
- value = value.replace(/\S/g, '')
- }
- return value
- }
-
- rawBeforeOpen(root) {
- let value
- root.walk(i => {
- if (i.type !== 'decl') {
- value = i.raws.between
- if (typeof value !== 'undefined') return false
- }
- })
- return value
- }
-
- rawBeforeRule(root) {
- let value
- root.walk(i => {
- if (i.nodes && (i.parent !== root || root.first !== i)) {
- if (typeof i.raws.before !== 'undefined') {
- value = i.raws.before
- if (value.includes('\n')) {
- value = value.replace(/[^\n]+$/, '')
- }
- return false
- }
- }
- })
- if (value) value = value.replace(/\S/g, '')
- return value
- }
-
- rawColon(root) {
- let value
- root.walkDecls(i => {
- if (typeof i.raws.between !== 'undefined') {
- value = i.raws.between.replace(/[^\s:]/g, '')
- return false
- }
- })
- return value
- }
-
- rawEmptyBody(root) {
- let value
- root.walk(i => {
- if (i.nodes && i.nodes.length === 0) {
- value = i.raws.after
- if (typeof value !== 'undefined') return false
- }
- })
- return value
- }
-
- rawIndent(root) {
- if (root.raws.indent) return root.raws.indent
- let value
- root.walk(i => {
- let p = i.parent
- if (p && p !== root && p.parent && p.parent === root) {
- if (typeof i.raws.before !== 'undefined') {
- let parts = i.raws.before.split('\n')
- value = parts[parts.length - 1]
- value = value.replace(/\S/g, '')
- return false
- }
- }
- })
- return value
- }
-
- rawSemicolon(root) {
- let value
- root.walk(i => {
- if (i.nodes && i.nodes.length && i.last.type === 'decl') {
- value = i.raws.semicolon
- if (typeof value !== 'undefined') return false
- }
- })
- return value
- }
-
- rawValue(node, prop) {
- let value = node[prop]
- let raw = node.raws[prop]
- if (raw && raw.value === value) {
- return raw.raw
- }
-
- return value
- }
-
- root(node) {
- this.body(node)
- if (node.raws.after) this.builder(node.raws.after)
- }
-
- rule(node) {
- this.block(node, this.rawValue(node, 'selector'))
- if (node.raws.ownSemicolon) {
- this.builder(node.raws.ownSemicolon, node, 'end')
+ process(css, opts = {}) {
+ if (
+ !this.plugins.length &&
+ !opts.parser &&
+ !opts.stringifier &&
+ !opts.syntax
+ ) {
+ return new NoWorkResult(this, css, opts)
+ } else {
+ return new LazyResult(this, css, opts)
}
}
- stringify(node, semicolon) {
- /* c8 ignore start */
- if (!this[node.type]) {
- throw new Error(
- 'Unknown AST node type ' +
- node.type +
- '. ' +
- 'Maybe you need to change PostCSS stringifier.'
- )
- }
- /* c8 ignore stop */
- this[node.type](node, semicolon)
+ use(plugin) {
+ this.plugins = this.plugins.concat(this.normalize([plugin]))
+ return this
}
}
-module.exports = Stringifier
-Stringifier.default = Stringifier
+module.exports = Processor
+Processor.default = Processor
-
-/***/ }),
-
-/***/ 633:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-
-
-let Stringifier = __webpack_require__(346)
-
-function stringify(node, builder) {
- let str = new Stringifier(builder)
- str.stringify(node)
-}
-
-module.exports = stringify
-stringify.default = stringify
-
-
-/***/ }),
-
-/***/ 1381:
-/***/ ((module) => {
-
-"use strict";
-
-
-module.exports.isClean = Symbol('isClean')
-
-module.exports.my = Symbol('my')
-
-
-/***/ }),
-
-/***/ 2327:
-/***/ ((module) => {
-
-"use strict";
-
-
-const SINGLE_QUOTE = "'".charCodeAt(0)
-const DOUBLE_QUOTE = '"'.charCodeAt(0)
-const BACKSLASH = '\\'.charCodeAt(0)
-const SLASH = '/'.charCodeAt(0)
-const NEWLINE = '\n'.charCodeAt(0)
-const SPACE = ' '.charCodeAt(0)
-const FEED = '\f'.charCodeAt(0)
-const TAB = '\t'.charCodeAt(0)
-const CR = '\r'.charCodeAt(0)
-const OPEN_SQUARE = '['.charCodeAt(0)
-const CLOSE_SQUARE = ']'.charCodeAt(0)
-const OPEN_PARENTHESES = '('.charCodeAt(0)
-const CLOSE_PARENTHESES = ')'.charCodeAt(0)
-const OPEN_CURLY = '{'.charCodeAt(0)
-const CLOSE_CURLY = '}'.charCodeAt(0)
-const SEMICOLON = ';'.charCodeAt(0)
-const ASTERISK = '*'.charCodeAt(0)
-const COLON = ':'.charCodeAt(0)
-const AT = '@'.charCodeAt(0)
-
-const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g
-const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g
-const RE_BAD_BRACKET = /.[\r\n"'(/\\]/
-const RE_HEX_ESCAPE = /[\da-f]/i
-
-module.exports = function tokenizer(input, options = {}) {
- let css = input.css.valueOf()
- let ignore = options.ignoreErrors
-
- let code, content, escape, next, quote
- let currentToken, escaped, escapePos, n, prev
-
- let length = css.length
- let pos = 0
- let buffer = []
- let returned = []
-
- function position() {
- return pos
- }
-
- function unclosed(what) {
- throw input.error('Unclosed ' + what, pos)
- }
-
- function endOfFile() {
- return returned.length === 0 && pos >= length
- }
-
- function nextToken(opts) {
- if (returned.length) return returned.pop()
- if (pos >= length) return
-
- let ignoreUnclosed = opts ? opts.ignoreUnclosed : false
-
- code = css.charCodeAt(pos)
-
- switch (code) {
- case NEWLINE:
- case SPACE:
- case TAB:
- case CR:
- case FEED: {
- next = pos
- do {
- next += 1
- code = css.charCodeAt(next)
- } while (
- code === SPACE ||
- code === NEWLINE ||
- code === TAB ||
- code === CR ||
- code === FEED
- )
-
- currentToken = ['space', css.slice(pos, next)]
- pos = next - 1
- break
- }
-
- case OPEN_SQUARE:
- case CLOSE_SQUARE:
- case OPEN_CURLY:
- case CLOSE_CURLY:
- case COLON:
- case SEMICOLON:
- case CLOSE_PARENTHESES: {
- let controlChar = String.fromCharCode(code)
- currentToken = [controlChar, controlChar, pos]
- break
- }
-
- case OPEN_PARENTHESES: {
- prev = buffer.length ? buffer.pop()[1] : ''
- n = css.charCodeAt(pos + 1)
- if (
- prev === 'url' &&
- n !== SINGLE_QUOTE &&
- n !== DOUBLE_QUOTE &&
- n !== SPACE &&
- n !== NEWLINE &&
- n !== TAB &&
- n !== FEED &&
- n !== CR
- ) {
- next = pos
- do {
- escaped = false
- next = css.indexOf(')', next + 1)
- if (next === -1) {
- if (ignore || ignoreUnclosed) {
- next = pos
- break
- } else {
- unclosed('bracket')
- }
- }
- escapePos = next
- while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
- escapePos -= 1
- escaped = !escaped
- }
- } while (escaped)
-
- currentToken = ['brackets', css.slice(pos, next + 1), pos, next]
-
- pos = next
- } else {
- next = css.indexOf(')', pos + 1)
- content = css.slice(pos, next + 1)
-
- if (next === -1 || RE_BAD_BRACKET.test(content)) {
- currentToken = ['(', '(', pos]
- } else {
- currentToken = ['brackets', content, pos, next]
- pos = next
- }
- }
-
- break
- }
-
- case SINGLE_QUOTE:
- case DOUBLE_QUOTE: {
- quote = code === SINGLE_QUOTE ? "'" : '"'
- next = pos
- do {
- escaped = false
- next = css.indexOf(quote, next + 1)
- if (next === -1) {
- if (ignore || ignoreUnclosed) {
- next = pos + 1
- break
- } else {
- unclosed('string')
- }
- }
- escapePos = next
- while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
- escapePos -= 1
- escaped = !escaped
- }
- } while (escaped)
-
- currentToken = ['string', css.slice(pos, next + 1), pos, next]
- pos = next
- break
- }
-
- case AT: {
- RE_AT_END.lastIndex = pos + 1
- RE_AT_END.test(css)
- if (RE_AT_END.lastIndex === 0) {
- next = css.length - 1
- } else {
- next = RE_AT_END.lastIndex - 2
- }
-
- currentToken = ['at-word', css.slice(pos, next + 1), pos, next]
-
- pos = next
- break
- }
-
- case BACKSLASH: {
- next = pos
- escape = true
- while (css.charCodeAt(next + 1) === BACKSLASH) {
- next += 1
- escape = !escape
- }
- code = css.charCodeAt(next + 1)
- if (
- escape &&
- code !== SLASH &&
- code !== SPACE &&
- code !== NEWLINE &&
- code !== TAB &&
- code !== CR &&
- code !== FEED
- ) {
- next += 1
- if (RE_HEX_ESCAPE.test(css.charAt(next))) {
- while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
- next += 1
- }
- if (css.charCodeAt(next + 1) === SPACE) {
- next += 1
- }
- }
- }
-
- currentToken = ['word', css.slice(pos, next + 1), pos, next]
-
- pos = next
- break
- }
-
- default: {
- if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
- next = css.indexOf('*/', pos + 2) + 1
- if (next === 0) {
- if (ignore || ignoreUnclosed) {
- next = css.length
- } else {
- unclosed('comment')
- }
- }
-
- currentToken = ['comment', css.slice(pos, next + 1), pos, next]
- pos = next
- } else {
- RE_WORD_END.lastIndex = pos + 1
- RE_WORD_END.test(css)
- if (RE_WORD_END.lastIndex === 0) {
- next = css.length - 1
- } else {
- next = RE_WORD_END.lastIndex - 2
- }
-
- currentToken = ['word', css.slice(pos, next + 1), pos, next]
- buffer.push(currentToken)
- pos = next
- }
-
- break
- }
- }
-
- pos++
- return currentToken
- }
-
- function back(token) {
- returned.push(token)
- }
-
- return {
- back,
- endOfFile,
- nextToken,
- position
- }
-}
-
-
-/***/ }),
-
-/***/ 3122:
-/***/ ((module) => {
-
-"use strict";
-/* eslint-disable no-console */
-
-
-let printed = {}
-
-module.exports = function warnOnce(message) {
- if (printed[message]) return
- printed[message] = true
-
- if (typeof console !== 'undefined' && console.warn) {
- console.warn(message)
- }
-}
-
-
-/***/ }),
-
-/***/ 5776:
-/***/ ((module) => {
-
-"use strict";
-
-
-class Warning {
- constructor(text, opts = {}) {
- this.type = 'warning'
- this.text = text
-
- if (opts.node && opts.node.source) {
- let range = opts.node.rangeBy(opts)
- this.line = range.start.line
- this.column = range.start.column
- this.endLine = range.end.line
- this.endColumn = range.end.column
- }
-
- for (let opt in opts) this[opt] = opts[opt]
- }
-
- toString() {
- if (this.node) {
- return this.node.error(this.text, {
- index: this.index,
- plugin: this.plugin,
- word: this.word
- }).message
- }
-
- if (this.plugin) {
- return this.plugin + ': ' + this.text
- }
-
- return this.text
- }
-}
-
-module.exports = Warning
-Warning.default = Warning
-
-
-/***/ }),
-
-/***/ 628:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-
-
-var ReactPropTypesSecret = __webpack_require__(4067);
-
-function emptyFunction() {}
-function emptyFunctionWithReset() {}
-emptyFunctionWithReset.resetWarningCache = emptyFunction;
-
-module.exports = function() {
- function shim(props, propName, componentName, location, propFullName, secret) {
- if (secret === ReactPropTypesSecret) {
- // It is still safe when called from React.
- return;
- }
- var err = 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'
- );
- err.name = 'Invariant Violation';
- throw err;
- };
- shim.isRequired = shim;
- function getShim() {
- return shim;
- };
- // Important!
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
- var ReactPropTypes = {
- array: shim,
- bigint: shim,
- bool: shim,
- func: shim,
- number: shim,
- object: shim,
- string: shim,
- symbol: shim,
-
- any: shim,
- arrayOf: getShim,
- element: shim,
- elementType: shim,
- instanceOf: getShim,
- node: shim,
- objectOf: getShim,
- oneOf: getShim,
- oneOfType: getShim,
- shape: getShim,
- exact: getShim,
-
- checkPropTypes: emptyFunctionWithReset,
- resetWarningCache: emptyFunction
- };
-
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
-
-
-/***/ }),
-
-/***/ 5826:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-if (false) { var throwOnDirectAccess, ReactIs; } else {
- // By explicitly using `prop-types` you are opting into new production behavior.
- // http://fb.me/prop-types-in-prod
- module.exports = __webpack_require__(628)();
-}
-
-
-/***/ }),
-
-/***/ 4067:
-/***/ ((module) => {
-
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-
-
-var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-
-module.exports = ReactPropTypesSecret;
-
-
-/***/ }),
-
-/***/ 4462:
-/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
-
-"use strict";
-
-var __extends = (this && this.__extends) || (function () {
- var extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
- return function (d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- };
-})();
-var __assign = (this && this.__assign) || Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
-};
-var __rest = (this && this.__rest) || function (s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
- t[p[i]] = s[p[i]];
- return t;
-};
-exports.__esModule = true;
-var React = __webpack_require__(1609);
-var PropTypes = __webpack_require__(5826);
-var autosize = __webpack_require__(4306);
-var _getLineHeight = __webpack_require__(461);
-var getLineHeight = _getLineHeight;
-var RESIZED = "autosize:resized";
-/**
- * A light replacement for built-in textarea component
- * which automaticaly adjusts its height to match the content
- */
-var TextareaAutosizeClass = /** @class */ (function (_super) {
- __extends(TextareaAutosizeClass, _super);
- function TextareaAutosizeClass() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.state = {
- lineHeight: null
- };
- _this.textarea = null;
- _this.onResize = function (e) {
- if (_this.props.onResize) {
- _this.props.onResize(e);
- }
- };
- _this.updateLineHeight = function () {
- if (_this.textarea) {
- _this.setState({
- lineHeight: getLineHeight(_this.textarea)
- });
- }
- };
- _this.onChange = function (e) {
- var onChange = _this.props.onChange;
- _this.currentValue = e.currentTarget.value;
- onChange && onChange(e);
- };
- return _this;
- }
- TextareaAutosizeClass.prototype.componentDidMount = function () {
- var _this = this;
- var _a = this.props, maxRows = _a.maxRows, async = _a.async;
- if (typeof maxRows === "number") {
- this.updateLineHeight();
- }
- if (typeof maxRows === "number" || async) {
- /*
- the defer is needed to:
- - force "autosize" to activate the scrollbar when this.props.maxRows is passed
- - support StyledComponents (see #71)
- */
- setTimeout(function () { return _this.textarea && autosize(_this.textarea); });
- }
- else {
- this.textarea && autosize(this.textarea);
- }
- if (this.textarea) {
- this.textarea.addEventListener(RESIZED, this.onResize);
- }
- };
- TextareaAutosizeClass.prototype.componentWillUnmount = function () {
- if (this.textarea) {
- this.textarea.removeEventListener(RESIZED, this.onResize);
- autosize.destroy(this.textarea);
- }
- };
- TextareaAutosizeClass.prototype.render = function () {
- var _this = this;
- var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight;
- var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
- return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {
- _this.textarea = element;
- if (typeof _this.props.innerRef === 'function') {
- _this.props.innerRef(element);
- }
- else if (_this.props.innerRef) {
- _this.props.innerRef.current = element;
- }
- } }), children));
- };
- TextareaAutosizeClass.prototype.componentDidUpdate = function () {
- this.textarea && autosize.update(this.textarea);
- };
- TextareaAutosizeClass.defaultProps = {
- rows: 1,
- async: false
- };
- TextareaAutosizeClass.propTypes = {
- rows: PropTypes.number,
- maxRows: PropTypes.number,
- onResize: PropTypes.func,
- innerRef: PropTypes.any,
- async: PropTypes.bool
- };
- return TextareaAutosizeClass;
-}(React.Component));
-exports.TextareaAutosize = React.forwardRef(function (props, ref) {
- return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));
-});
-
-
-/***/ }),
-
-/***/ 4132:
-/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-
-"use strict";
-var __webpack_unused_export__;
-
-__webpack_unused_export__ = true;
-var TextareaAutosize_1 = __webpack_require__(4462);
-exports.A = TextareaAutosize_1.TextareaAutosize;
+Root.registerProcessor(Processor)
+Document.registerProcessor(Processor)
/***/ }),
@@ -7275,14 +7359,6 @@ module.exports.has = hasAccents;
module.exports.remove = removeAccents;
-/***/ }),
-
-/***/ 1609:
-/***/ ((module) => {
-
-"use strict";
-module.exports = window["React"];
-
/***/ }),
/***/ 9746:
@@ -7297,68 +7373,6 @@ module.exports = window["React"];
/* (ignored) */
-/***/ }),
-
-/***/ 197:
-/***/ (() => {
-
-/* (ignored) */
-
-/***/ }),
-
-/***/ 1866:
-/***/ (() => {
-
-/* (ignored) */
-
-/***/ }),
-
-/***/ 2739:
-/***/ (() => {
-
-/* (ignored) */
-
-/***/ }),
-
-/***/ 5042:
-/***/ ((module) => {
-
-// This alphabet uses `A-Za-z0-9_-` symbols.
-// The order of characters is optimized for better gzip and brotli compression.
-// References to the same file (works both for gzip and brotli):
-// `'use`, `andom`, and `rict'`
-// References to the brotli default dictionary:
-// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
-let urlAlphabet =
- 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
-
-let customAlphabet = (alphabet, defaultSize = 21) => {
- return (size = defaultSize) => {
- let id = ''
- // A compact alternative for `for (var i = 0; i < step; i++)`.
- let i = size | 0
- while (i--) {
- // `| 0` is more compact and faster than `Math.floor()`.
- id += alphabet[(Math.random() * alphabet.length) | 0]
- }
- return id
- }
-}
-
-let nanoid = (size = 21) => {
- let id = ''
- // A compact alternative for `for (var i = 0; i < step; i++)`.
- let i = size | 0
- while (i--) {
- // `| 0` is more compact and faster than `Math.floor()`.
- id += urlAlphabet[(Math.random() * 64) | 0]
- }
- return id
-}
-
-module.exports = { nanoid, customAlphabet }
-
-
/***/ })
/******/ });
diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js
index dc4f4fff64..fe0e5371f4 100644
--- a/wp-includes/js/dist/block-editor.min.js
+++ b/wp-includes/js/dist/block-editor.min.js
@@ -1,10 +1,5 @@
/*! This file is auto-generated */
-(()=>{var e={4306:function(e,t){var n,o,r;
-/*!
- autosize 4.0.4
- license: MIT
- http://www.jacklmoore.com/autosize
-*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&p()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:l,update:p}),a()}function a(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5417:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,s=t.length,l=0,a=0;ie.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(a+=c.count)}}var p=t[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[s-2].value+=p.value,t.pop()),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=l+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=l&&p+1>=a)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],h=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var g=u&&u.newPos+1=l&&h+1>=a)return s(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();h()||e()}),0)}();else for(;c<=u;){var g=h();if(g)return g}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,s=e.newPos,l=s-o,a=0;s+1{"use strict";var o;t.JJ=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5417))&&o.__esModule?o:{default:o}).default)},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},5215:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},461:(e,t,n)=>{var o=n(6109);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r: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,s=document.createElement(i);s.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var l=o(e,"font-size");s.style.fontSize=l,s.style.padding="0px",s.style.border="0px";var a=document.body;a.appendChild(s),n=s.offsetHeight,a.removeChild(s)}return n}},7520:(e,t,n)=>{e.exports=n(7191)},8202:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},2213:e=>{var t,n,o,r,i,s,l,a,c,u,d,p,h,g,m,f=!1;function b(){if(!f){f=!0;var e=navigator.userAgent,b=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),k=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),d=!!/Win64/.exec(e),b){(t=b[1]?parseFloat(b[1]):b[5]?parseFloat(b[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);s=v?parseFloat(v[1])+4:t,n=b[2]?parseFloat(b[2]):NaN,o=b[3]?parseFloat(b[3]):NaN,(r=b[4]?parseFloat(b[4]):NaN)?(b=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=b&&b[1]?parseFloat(b[1]):NaN):i=NaN}else t=n=o=i=r=NaN;if(k){if(k[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=!_||parseFloat(_[1].replace("_","."))}else l=!1;a=!!k[2],c=!!k[3]}else l=a=c=!1}}var k={ie:function(){return b()||t},ieCompatibilityMode:function(){return b()||s>t},ie64:function(){return k.ie()&&d},firefox:function(){return b()||n},opera:function(){return b()||o},webkit:function(){return b()||r},safari:function(){return k.webkit()},chrome:function(){return b()||i},windows:function(){return b()||a},osx:function(){return b()||l},linux:function(){return b()||c},iphone:function(){return b()||p},mobile:function(){return b()||p||h||u||m},nativeApp:function(){return b()||g},android:function(){return b()||u},ipad:function(){return b()||h}};e.exports=k},1087:(e,t,n)=>{"use strict";var o,r=n(8202);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
+(()=>{var e={197:()=>{},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o{if(r=e.raws[n],void 0!==r)return!1}))}var l;return void 0===r&&(r=t[o]),s.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,i=e=>e,s=e=>e;if(e){let{bold:e,gray:t,red:l}=o.createColors(!0);i=t=>e(l(t)),n=e=>t(e),r&&(s=e=>r(e))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map(((e,t)=>{let o=a+1+t,r=" "+(" "+o).slice(-u)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(o,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return i(">")+n(r)+s(a)+"\n "+c+i("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(r)+s(e)+"\n "+t+i("^")}return" "+n(r)+s(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},448:(e,t,n)=>{"use strict";let o=n(683),r=n(271),i=n(1670),s=n(4295),l=n(9055),a=n(9434),c=n(633),{isClean:u,my:d}=n(1381);n(3122);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},g={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let v={};class _{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof _||t instanceof l)r=k(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=s;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[d]&&o.rebuild(r)}else r=k(t);this.result=new l(e,r,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex{e[u]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}_.registerPostcss=e=>{v=e},e.exports=_,_.default=_,a.registerLazyResult(_),r.registerLazyResult(_)},461:(e,t,n)=>{var o=n(6109);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r: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,s=document.createElement(i);s.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var l=o(e,"font-size");s.style.fontSize=l,s.style.padding="0px",s.style.border="0px";var a=document.body;a.appendChild(s),n=s.offsetHeight,a.removeChild(s)}return n}},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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:r};return n.PropTypes=n,n}},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,l=n(6589),a=n(1516),c=n(7490),{isClean:u,my:d}=n(1381);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends c{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o(e[d]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&h(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}}g.registerParse=e=>{r=e},g.registerRule=e=>{s=e},g.registerAtRule=e=>{o=e},g.registerRoot=e=>{i=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[d]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},1087:(e,t,n)=>{"use strict";var o,r=n(8202);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
/**
* Checks if an event is supported in the current execution environment.
*
@@ -18,4 +13,9 @@
* @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,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},1443:e=>{function t(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e.includes(t)))}e.exports=function(e){const n=e.prefix,o=/\s+$/.test(n)?n:`${n} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],i=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&t(s.source.input.file,r)||i.length&&s.source.input.file&&!t(s.source.input.file,i)||s.walkRules((t=>{t.parent&&["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"].includes(t.parent.name)||(t.selectors=t.selectors.map((r=>e.exclude&&function(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e===t))}(r,e.exclude)?r:e.transform?e.transform(n,r,o+r,s.source.input.file,t):o+r)))}))}}},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},1544:(e,t,n)=>{var o=n(8491),r=n(3815),i=n(4725);function s(e){return this instanceof s?(this.nodes=o(e),this):new s(e)}s.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):""},s.prototype.walk=function(e,t){return r(this.nodes,e,t),this},s.unit=n(1524),s.walk=r,s.stringify=i,e.exports=s},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,x,y,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),i="E".charCodeAt(0);e.exports=function(e){var s,l,a,c=0,u=e.length;if(0===u||!function(e){var r,i=e.charCodeAt(0);if(i===n||i===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var s=e.charCodeAt(2);return r===o&&s>=48&&s<=57}return i===o?(r=e.charCodeAt(1))>=48&&r<=57:i>=48&&i<=57}(e))return!1;for((s=e.charCodeAt(c))!==n&&s!==t||c++;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),s===o&&l>=48&&l<=57)for(c+=2;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(s===r||s===i)&&(l>=48&&l<=57||(l===n||l===t)&&a>=48&&a<=57))for(c+=l===n||l===t?3:2;c57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},3815:e=>{e.exports=function e(t,n,o){var r,i,s,l;for(r=0,i=t.length;r{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,l=n(6589),a=n(1516),c=n(7490),{isClean:u,my:d}=n(1381);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends c{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o(e[d]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&h(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}g.registerParse=e=>{r=e},g.registerRule=e=>{s=e},g.registerAtRule=e=>{o=e},g.registerRoot=e=>{i=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[d]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported);let n=e=>e,i=e=>e,s=e=>e;if(e){let{bold:e,gray:t,red:l}=o.createColors(!0);i=t=>e(l(t)),n=e=>t(e),r&&(s=e=>r(e))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map(((e,t)=>{let o=a+1+t,r=" "+(" "+o).slice(-u)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(o,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return i(">")+n(r)+s(a)+"\n "+c+i("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(r)+s(e)+"\n "+t+i("^")}return" "+n(r)+s(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("fromOffsetCache"),g=Boolean(s&&l),m=Boolean(i&&r);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&g){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,r=e.col}else i=o.line,r=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,r);return s=l?new u(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),s.input={column:n,endColumn:r,endLine:i,line:t,source:this.css},this.file&&(c&&(s.input.url=c(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o=t)o=n.length-1;else{let t,r=n.length-2;for(;o>1),e=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,p&&p.registerInput&&p.registerInput(f)},448:(e,t,n)=>{"use strict";let o=n(683),r=n(271),i=n(1670),s=n(4295),l=n(9055),a=n(9434),c=n(633),{isClean:u,my:d}=n(1381);n(3122);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},g={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let v={};class _{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof _||t instanceof l)r=k(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=s;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[d]&&o.rebuild(r)}else r=k(t);this.result=new l(e,r,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex{e[u]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}_.registerPostcss=e=>{v=e},e.exports=_,_.default=_,a.registerLazyResult(_),r.registerLazyResult(_)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{dirname:o,relative:r,resolve:i,sep:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(l&&a),p=Boolean(o&&i&&r&&s);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new l(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=a.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,r="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,l,a)=>{if(this.css+=s,l&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),o=s.length-e):o+=s.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(i(n,this.mapOpts.annotation)));let s=r(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===s&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=l,l.default=l},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,r=0;for(let i=0;i"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.source.input.css.slice(c(this.source.input.css,this.source.start),c(this.source.input.css,this.source.end)).indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o=c(this.source.input.css,this.source.start),r=o+e;for(let e=o;e"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=u,u.default=u},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(5380),i=n(3937);function s(e,t){let n=new r(e,t),o=new i(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=s,s.default=s,o.registerParse(s)},3937:(e,t,n)=>{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(9434),l=n(4092),a=n(2327);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,i=new o;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[i,s]of e.entries()){if(n=s,o=n[0],"("===o&&(r+=1),")"===o&&(r-=1),0===r&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let o,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,l=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===o[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(r.trim().startsWith("!")&&"space"!==t)break;r=o.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=l.map((e=>e[1])).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,i=[],s=e[1].startsWith("--"),l=[],a=e;for(;a;){if(n=a[0],l.push(a),"("===n||"["===n)r||(r=a),i.push("("===n?")":"]");else if(s&&o&&"{"===n)r||(r=a),i.push("}");else if(0===i.length){if(";"===n){if(o)return void this.decl(l,s);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(o=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(r),t&&o){if(!s)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,i,s,l,a=n.length,u="",d=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=i(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof l)return a.fromSourceMap(t).toString();if(t instanceof a)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=s(i(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.4.49",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class i extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=i,i.default=i,o.registerRule(i)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o{if(r=e.raws[n],void 0!==r)return!1}))}var l;return void 0===r&&(r=t[o]),s.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),s=" ".charCodeAt(0),l="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),k=":".charCodeAt(0),v="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,w={}){let C,B,I,j,E,T,M,P,R,N,A=e.css.valueOf(),L=w.ignoreErrors,D=A.length,O=0,z=[],F=[];function V(t){throw e.error("Unclosed "+t,O)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&O>=D},nextToken:function(e){if(F.length)return F.pop();if(O>=D)return;let w=!!e&&e.ignoreUnclosed;switch(C=A.charCodeAt(O),C){case i:case s:case a:case c:case l:j=O;do{j+=1,C=A.charCodeAt(j)}while(C===s||C===i||C===a||C===c||C===l);T=["space",A.slice(O,j)],O=j-1;break;case u:case d:case g:case m:case k:case f:case h:{let e=String.fromCharCode(C);T=[e,e,O];break}case p:if(N=z.length?z.pop()[1]:"",R=A.charCodeAt(O+1),"url"===N&&R!==t&&R!==n&&R!==s&&R!==i&&R!==a&&R!==l&&R!==c){j=O;do{if(M=!1,j=A.indexOf(")",j+1),-1===j){if(L||w){j=O;break}V("bracket")}for(P=j;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["brackets",A.slice(O,j+1),O,j],O=j}else j=A.indexOf(")",O+1),B=A.slice(O,j+1),-1===j||y.test(B)?T=["(","(",O]:(T=["brackets",B,O,j],O=j);break;case t:case n:E=C===t?"'":'"',j=O;do{if(M=!1,j=A.indexOf(E,j+1),-1===j){if(L||w){j=O+1;break}V("string")}for(P=j;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["string",A.slice(O,j+1),O,j],O=j;break;case v:_.lastIndex=O+1,_.test(A),j=0===_.lastIndex?A.length-1:_.lastIndex-2,T=["at-word",A.slice(O,j+1),O,j],O=j;break;case o:for(j=O,I=!0;A.charCodeAt(j+1)===o;)j+=1,I=!I;if(C=A.charCodeAt(j+1),I&&C!==r&&C!==s&&C!==i&&C!==a&&C!==c&&C!==l&&(j+=1,S.test(A.charAt(j)))){for(;S.test(A.charAt(j+1));)j+=1;A.charCodeAt(j+1)===s&&(j+=1)}T=["word",A.slice(O,j+1),O,j],O=j;break;default:C===r&&A.charCodeAt(O+1)===b?(j=A.indexOf("*/",O+2)+1,0===j&&(L||w?j=A.length:V("comment")),T=["comment",A.slice(O,j+1),O,j],O=j):(x.lastIndex=O+1,x.test(A),j=0===x.lastIndex?A.length-1:x.lastIndex-2,T=["word",A.slice(O,j+1),O,j],z.push(T),O=j)}return O++,T},position:function(){return O}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},1609:e=>{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=0|n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>gg,AlignmentToolbar:()=>mg,Autocomplete:()=>GI,BlockAlignmentControl:()=>sa,BlockAlignmentToolbar:()=>la,BlockBreadcrumb:()=>XI,BlockCanvas:()=>kT,BlockColorsStyleSelector:()=>yT,BlockContextProvider:()=>Pk,BlockControls:()=>Es,BlockEdit:()=>qk,BlockEditorKeyboardShortcuts:()=>Ck,BlockEditorProvider:()=>Tk,BlockFormatControls:()=>js,BlockIcon:()=>yb,BlockInspector:()=>lN,BlockList:()=>VS,BlockMover:()=>gj,BlockNavigationDropdown:()=>rM,BlockPopover:()=>Bm,BlockPreview:()=>Zw,BlockSelectionClearer:()=>uS,BlockSettingsMenu:()=>DE,BlockSettingsMenuControls:()=>TE,BlockStyles:()=>lM,BlockTitle:()=>YI,BlockToolbar:()=>iT,BlockTools:()=>uT,BlockVerticalAlignmentControl:()=>ml,BlockVerticalAlignmentToolbar:()=>fl,ButtonBlockAppender:()=>DB,ButtonBlockerAppender:()=>LB,ColorPalette:()=>TM,ColorPaletteControl:()=>MM,ContrastChecker:()=>zp,CopyHandler:()=>cN,DefaultBlockAppender:()=>Qy,FontSizePicker:()=>PI,HeadingLevelDropdown:()=>pM,HeightControl:()=>Hg,InnerBlocks:()=>MS,Inserter:()=>NB,InspectorAdvancedControls:()=>Ra,InspectorControls:()=>Na,JustifyContentControl:()=>vl,JustifyToolbar:()=>_l,LineHeightControl:()=>ph,LinkControl:()=>tu,MediaPlaceholder:()=>LP,MediaReplaceFlow:()=>ru,MediaUpload:()=>Ha,MediaUploadCheck:()=>Ua,MultiSelectScrollIntoView:()=>hN,NavigableToolbar:()=>YE,ObserveTyping:()=>AS,PanelColorSettings:()=>DP,PlainText:()=>fR,RecursionProvider:()=>_N,RichText:()=>hR,RichTextShortcut:()=>vR,RichTextToolbarButton:()=>_R,SETTINGS_DEFAULTS:()=>M,SkipToSelectedBlock:()=>DR,ToolSelector:()=>SR,Typewriter:()=>kN,URLInput:()=>Ja,URLInputButton:()=>IR,URLPopover:()=>PP,Warning:()=>Wk,WritingFlow:()=>uw,__experimentalBlockAlignmentMatrixControl:()=>ZI,__experimentalBlockFullHeightAligmentControl:()=>WI,__experimentalBlockPatternSetup:()=>wM,__experimentalBlockPatternsList:()=>kC,__experimentalBlockVariationPicker:()=>gM,__experimentalBlockVariationTransforms:()=>jM,__experimentalBorderRadiusControl:()=>Md,__experimentalColorGradientControl:()=>Sp,__experimentalColorGradientSettingsDropdown:()=>zM,__experimentalDateFormatPicker:()=>NM,__experimentalDuotoneControl:()=>Jm,__experimentalFontAppearanceControl:()=>uh,__experimentalFontFamilyControl:()=>ah,__experimentalGetBorderClassesAndStyles:()=>mI,__experimentalGetColorClassesAndStyles:()=>kI,__experimentalGetElementClassName:()=>jN,__experimentalGetGapCSSValue:()=>sl,__experimentalGetGradientClass:()=>pp,__experimentalGetGradientObjectByGradientValue:()=>gp,__experimentalGetShadowClassesAndStyles:()=>bI,__experimentalGetSpacingClassesAndStyles:()=>_I,__experimentalImageEditor:()=>wP,__experimentalImageSizeControl:()=>jP,__experimentalImageURLInputUI:()=>NR,__experimentalInspectorPopoverHeader:()=>wN,__experimentalLetterSpacingControl:()=>hh,__experimentalLibrary:()=>pN,__experimentalLinkControl:()=>eu,__experimentalLinkControlSearchInput:()=>Ac,__experimentalLinkControlSearchItem:()=>bc,__experimentalLinkControlSearchResults:()=>Bc,__experimentalListView:()=>nM,__experimentalPanelColorGradientSettings:()=>UM,__experimentalPreviewOptions:()=>AR,__experimentalPublishDateTimePicker:()=>BN,__experimentalRecursionProvider:()=>yN,__experimentalResponsiveBlockControl:()=>kR,__experimentalSpacingSizesControl:()=>Fg,__experimentalTextDecorationControl:()=>Eh,__experimentalTextTransformControl:()=>Ch,__experimentalUnitControl:()=>wR,__experimentalUseBlockOverlayActive:()=>QI,__experimentalUseBlockPreview:()=>qw,__experimentalUseBorderProps:()=>fI,__experimentalUseColorProps:()=>vI,__experimentalUseCustomSides:()=>zm,__experimentalUseGradient:()=>fp,__experimentalUseHasRecursion:()=>SN,__experimentalUseMultipleOriginColorsAndGradients:()=>bd,__experimentalUseResizeCanvas:()=>LR,__experimentalWritingModeControl:()=>Rh,__unstableBlockNameContext:()=>WE,__unstableBlockSettingsMenuFirstItem:()=>dE,__unstableBlockToolbarLastItem:()=>Wj,__unstableEditorStyles:()=>zw,__unstableIframe:()=>bw,__unstableInserterMenuExtension:()=>_B,__unstableRichTextInputEvent:()=>xR,__unstableUseBlockSelectionClearer:()=>cS,__unstableUseClipboardHandler:()=>aN,__unstableUseMouseMoveTypingReset:()=>RS,__unstableUseTypewriter:()=>bN,__unstableUseTypingObserver:()=>NS,createCustomColorsHOC:()=>TI,getColorClassName:()=>fd,getColorObjectByAttributeValues:()=>gd,getColorObjectByColorValue:()=>md,getComputedFluidTypographyValue:()=>Di,getCustomValueFromPreset:()=>tl,getFontSize:()=>rg,getFontSizeClass:()=>sg,getFontSizeObjectByValue:()=>ig,getGradientSlugByValue:()=>mp,getGradientValueBySlug:()=>hp,getPxFromCssUnit:()=>EN,getSpacingPresetCssVar:()=>ol,getTypographyClassesAndStyles:()=>yI,isValueSpacingPreset:()=>el,privateApis:()=>IL,store:()=>Bi,storeConfig:()=>Ci,transformStyles:()=>Dw,useBlockBindingsUtils:()=>Vk,useBlockCommands:()=>mT,useBlockDisplayInformation:()=>yf,useBlockEditContext:()=>w,useBlockEditingMode:()=>aa,useBlockProps:()=>$y,useCachedTruthy:()=>SI,useHasRecursion:()=>xN,useInnerBlocksProps:()=>TS,useSetting:()=>Ei,useSettings:()=>ji,useStyleOverride:()=>ks,withColorContext:()=>EM,withColors:()=>MI,withFontSizes:()=>AI});var e={};n.r(e),n.d(e,{getAllPatterns:()=>Ke,getBlockRemovalRules:()=>ze,getBlockSettings:()=>Te,getBlockStyles:()=>rt,getBlockWithoutAttributes:()=>Re,getClosestAllowedInsertionPoint:()=>at,getClosestAllowedInsertionPointForPattern:()=>ct,getContentLockingParent:()=>Je,getEnabledBlockParents:()=>De,getEnabledClientIdsTree:()=>Le,getExpandedBlock:()=>Qe,getInserterMediaCategories:()=>Ue,getInsertionPoint:()=>ut,getLastFocus:()=>Ye,getLastInsertedBlocksClientIds:()=>Pe,getOpenedBlockSettingsMenu:()=>Fe,getParentSectionBlock:()=>et,getPatternBySlug:()=>We,getRegisteredInserterMediaCategories:()=>He,getRemovalPromptData:()=>Oe,getReusableBlocks:()=>qe,getSectionRootClientId:()=>it,getStyleOverrides:()=>Ve,getTemporarilyEditingAsBlocks:()=>nt,getTemporarilyEditingFocusModeToRevert:()=>ot,getZoomLevel:()=>lt,hasAllowedPatterns:()=>Ge,isBlockInterfaceHidden:()=>Me,isBlockSubtreeDisabled:()=>Ne,isDragging:()=>Xe,isSectionBlock:()=>tt,isZoomOut:()=>st});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>Eo,__experimentalGetAllowedBlocks:()=>ro,__experimentalGetAllowedPatterns:()=>po,__experimentalGetBlockListSettingsForBlocks:()=>vo,__experimentalGetDirectInsertBlock:()=>so,__experimentalGetGlobalBlocksByName:()=>Lt,__experimentalGetLastBlockAttributeChanges:()=>yo,__experimentalGetParsedPattern:()=>lo,__experimentalGetPatternTransformItems:()=>mo,__experimentalGetPatternsByBlockTypes:()=>go,__experimentalGetReusableBlockTitle:()=>_o,__unstableGetBlockWithoutInnerBlocks:()=>jt,__unstableGetClientIdWithClientIdsTree:()=>Tt,__unstableGetClientIdsTree:()=>Mt,__unstableGetContentLockingParent:()=>zo,__unstableGetEditorMode:()=>wo,__unstableGetSelectedBlocksWithPartialSelection:()=>kn,__unstableGetTemporarilyEditingAsBlocks:()=>Fo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>Vo,__unstableGetVisibleBlocks:()=>Ro,__unstableHasActiveBlockOverlayActive:()=>No,__unstableIsFullySelected:()=>gn,__unstableIsLastBlockChangeIgnored:()=>xo,__unstableIsSelectionCollapsed:()=>mn,__unstableIsSelectionMergeable:()=>bn,__unstableIsWithinBlockOverlay:()=>Ao,__unstableSelectionHasUnmergeableBlock:()=>fn,areInnerBlocksControlled:()=>jo,canEditBlock:()=>Zn,canInsertBlockType:()=>Hn,canInsertBlocks:()=>Un,canLockBlockType:()=>qn,canMoveBlock:()=>Wn,canMoveBlocks:()=>Kn,canRemoveBlock:()=>Gn,canRemoveBlocks:()=>$n,didAutomaticChange:()=>Bo,getAdjacentBlockClientId:()=>Jt,getAllowedBlocks:()=>oo,getBlock:()=>It,getBlockAttributes:()=>Bt,getBlockCount:()=>zt,getBlockEditingMode:()=>Lo,getBlockHierarchyRootClientId:()=>Xt,getBlockIndex:()=>_n,getBlockInsertionPoint:()=>An,getBlockListSettings:()=>fo,getBlockMode:()=>jn,getBlockName:()=>wt,getBlockNamesByClientId:()=>Ot,getBlockOrder:()=>vn,getBlockParents:()=>qt,getBlockParentsByBlockName:()=>Yt,getBlockRootClientId:()=>Zt,getBlockSelectionEnd:()=>Ut,getBlockSelectionStart:()=>Ht,getBlockTransformItems:()=>to,getBlocks:()=>Et,getBlocksByClientId:()=>Dt,getBlocksByName:()=>At,getClientIdsOfDescendants:()=>Pt,getClientIdsWithDescendants:()=>Rt,getDirectInsertBlock:()=>io,getDraggedBlockClientIds:()=>Mn,getFirstMultiSelectedBlockClientId:()=>ln,getGlobalBlockCount:()=>Nt,getHoveredBlockClientId:()=>Po,getInserterItems:()=>eo,getLastMultiSelectedBlockClientId:()=>an,getLowestCommonAncestorWithSelectedBlock:()=>Qt,getMultiSelectedBlockClientIds:()=>rn,getMultiSelectedBlocks:()=>sn,getMultiSelectedBlocksEndClientId:()=>hn,getMultiSelectedBlocksStartClientId:()=>pn,getNextBlockClientId:()=>tn,getPatternsByBlockTypes:()=>ho,getPreviousBlockClientId:()=>en,getSelectedBlock:()=>Kt,getSelectedBlockClientId:()=>Wt,getSelectedBlockClientIds:()=>on,getSelectedBlockCount:()=>Gt,getSelectedBlocksInitialCaretPosition:()=>nn,getSelectionEnd:()=>Vt,getSelectionStart:()=>Ft,getSettings:()=>bo,getTemplate:()=>On,getTemplateLock:()=>zn,hasBlockMovingClientId:()=>Co,hasDraggedInnerBlock:()=>Sn,hasInserterItems:()=>no,hasMultiSelection:()=>Cn,hasSelectedBlock:()=>$t,hasSelectedInnerBlock:()=>yn,isAncestorBeingDragged:()=>Rn,isAncestorMultiSelected:()=>dn,isBlockBeingDragged:()=>Pn,isBlockHighlighted:()=>Io,isBlockInsertionPointVisible:()=>Ln,isBlockMultiSelected:()=>un,isBlockSelected:()=>xn,isBlockValid:()=>Ct,isBlockVisible:()=>Mo,isBlockWithinSelection:()=>wn,isCaretWithinFormattedText:()=>Nn,isDraggingBlocks:()=>Tn,isFirstMultiSelectedBlock:()=>cn,isGroupable:()=>Oo,isLastBlockChangePersistent:()=>ko,isMultiSelecting:()=>Bn,isNavigationMode:()=>So,isSelectionEnabled:()=>In,isTyping:()=>En,isUngroupable:()=>Do,isValidTemplate:()=>Dn,wasBlockJustInserted:()=>To});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>Go,clearBlockRemovalPrompt:()=>Yo,deleteStyleOverride:()=>er,ensureDefaultBlock:()=>Zo,expandBlock:()=>ir,hideBlockInterface:()=>$o,modifyContentLockBlock:()=>lr,privateRemoveBlocks:()=>Ko,resetZoomLevel:()=>cr,setBlockRemovalRules:()=>Xo,setInsertionPoint:()=>sr,setLastFocus:()=>tr,setOpenedBlockSettingsMenu:()=>Qo,setStyleOverride:()=>Jo,setZoomLevel:()=>ar,showBlockInterface:()=>Wo,startDragging:()=>or,stopDragging:()=>rr,stopEditingAsBlocks:()=>nr});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Ur,__unstableExpandSelection:()=>$r,__unstableMarkAutomaticChange:()=>ui,__unstableMarkLastChangeAsPersistent:()=>ai,__unstableMarkNextChangeAsNotPersistent:()=>ci,__unstableSaveReusableBlock:()=>li,__unstableSetEditorMode:()=>pi,__unstableSetTemporarilyEditingAsBlocks:()=>xi,__unstableSplitSelection:()=>Gr,clearSelectedBlock:()=>jr,duplicateBlocks:()=>gi,enterFormattedText:()=>ti,exitFormattedText:()=>ni,flashBlock:()=>ki,hideInsertionPoint:()=>Fr,hoverBlock:()=>yr,insertAfterBlock:()=>fi,insertBeforeBlock:()=>mi,insertBlock:()=>Dr,insertBlocks:()=>Or,insertDefaultBlock:()=>ri,mergeBlocks:()=>Wr,moveBlockToPosition:()=>Lr,moveBlocksDown:()=>Rr,moveBlocksToPosition:()=>Ar,moveBlocksUp:()=>Nr,multiSelect:()=>Ir,receiveBlocks:()=>kr,registerInserterMediaCategory:()=>yi,removeBlock:()=>Zr,removeBlocks:()=>Kr,replaceBlock:()=>Mr,replaceBlocks:()=>Tr,replaceInnerBlocks:()=>qr,resetBlocks:()=>mr,resetSelection:()=>br,selectBlock:()=>xr,selectNextBlock:()=>wr,selectPreviousBlock:()=>Sr,selectionChange:()=>oi,setBlockEditingMode:()=>Si,setBlockMovingClientId:()=>hi,setBlockVisibility:()=>_i,setHasControlledInnerBlocks:()=>vi,setNavigationMode:()=>di,setTemplateValidity:()=>Vr,showInsertionPoint:()=>zr,startDraggingBlocks:()=>Jr,startMultiSelect:()=>Cr,startTyping:()=>Xr,stopDraggingBlocks:()=>ei,stopMultiSelect:()=>Br,stopTyping:()=>Qr,synchronizeTemplate:()=>Hr,toggleBlockHighlight:()=>bi,toggleBlockMode:()=>Yr,toggleSelection:()=>Er,unsetBlockEditingMode:()=>wi,updateBlock:()=>_r,updateBlockAttributes:()=>vr,updateBlockListSettings:()=>ii,updateSettings:()=>si,validateBlocksToTemplate:()=>fr});var s={};n.r(s),n.d(s,{getItems:()=>Tb,getSettings:()=>Nb,isUploading:()=>Mb,isUploadingById:()=>Rb,isUploadingByUrl:()=>Pb});var l={};n.r(l),n.d(l,{getAllItems:()=>Ab,getBlobUrls:()=>Vb,getItem:()=>Lb,getPausedUploadForPost:()=>zb,isBatchUploaded:()=>Db,isPaused:()=>Fb,isUploadingToPost:()=>Ob});var a={};n.r(a),n.d(a,{addItems:()=>Jb,cancelItem:()=>ek});var c={};n.r(c),n.d(c,{addItem:()=>ok,finishOperation:()=>ak,pauseQueue:()=>ik,prepareItem:()=>ck,processItem:()=>rk,removeItem:()=>lk,resumeQueue:()=>sk,revokeBlobUrls:()=>dk,updateSettings:()=>pk,uploadItem:()=>uk});var u={};n.r(u),n.d(u,{AdvancedPanel:()=>PN,BackgroundPanel:()=>_u,BorderPanel:()=>Xd,ColorPanel:()=>Op,DimensionsPanel:()=>um,FiltersPanel:()=>gf,GlobalStylesContext:()=>os,ImageSettingsPanel:()=>MN,TypographyPanel:()=>qh,areGlobalStyleConfigsEqual:()=>ts,getBlockCSSSelector:()=>of,getBlockSelectors:()=>Zf,getGlobalStylesChanges:()=>FN,getLayoutStyles:()=>Ff,toStyles:()=>Wf,useGlobalSetting:()=>ls,useGlobalStyle:()=>as,useGlobalStylesOutput:()=>Xf,useGlobalStylesOutputWithConfig:()=>Yf,useGlobalStylesReset:()=>ss,useHasBackgroundPanel:()=>bu,useHasBorderPanel:()=>Hd,useHasBorderPanelControls:()=>Ud,useHasColorPanel:()=>wp,useHasDimensionsPanel:()=>Xg,useHasFiltersPanel:()=>lf,useHasImageSettingsPanel:()=>TN,useHasTypographyPanel:()=>Lh,useSettingsForBlockElement:()=>cs});const d=window.wp.blocks,p=window.wp.element,h=window.wp.data,g=window.wp.compose,m=window.wp.hooks,f=Symbol("mayDisplayControls"),b=Symbol("mayDisplayParentControls"),k=Symbol("blockEditingMode"),v=Symbol("blockBindings"),_=Symbol("isPreviewMode"),x={name:"",isSelected:!1},y=(0,p.createContext)(x),{Provider:S}=y;function w(){return(0,p.useContext)(y)}const C=window.wp.deprecated;var B=n.n(C),I=n(7734),j=n.n(I);const E=window.wp.i18n,T={insertUsage:{}},M={alignWide:!1,supportsLayout:!0,colors:[{name:(0,E.__)("Black"),slug:"black",color:"#000000"},{name:(0,E.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,E.__)("White"),slug:"white",color:"#ffffff"},{name:(0,E.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,E.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,E.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,E.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,E.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,E.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,E.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,E.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,E.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,E._x)("Small","font size name"),size:13,slug:"small"},{name:(0,E._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,E._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,E._x)("Large","font size name"),size:36,slug:"large"},{name:(0,E._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,E.__)("Thumbnail")},{slug:"medium",name:(0,E.__)("Medium")},{slug:"large",name:(0,E.__)("Large")},{slug:"full",name:(0,E.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,E.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,E.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,E.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,E.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,E.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,E.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,E.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,E.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,E.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,E.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,E.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,E.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function P(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function R(e,t,n,o=1){const r=[...e];return r.splice(t,o),P(r,e.slice(t,t+o),n)}const N=Symbol("globalStylesDataKey"),A=Symbol("globalStylesLinks"),L=Symbol("selectBlockPatternsKey"),D=Symbol("reusableBlocksSelect"),O=Symbol("sectionRootClientIdKey"),z=window.wp.privateApis,{lock:F,unlock:V}=(0,z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),{isContentBlock:H}=V(d.privateApis),U=e=>e;function G(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),G(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function $(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function W(e,t=U){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 K(e){return W(e,(e=>{const{attributes:t,...n}=e;return n}))}function Z(e){return W(e,(e=>e.attributes))}function q(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&j()(e.clientIds,t.clientIds)&&function(e,t){return j()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function Y(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 X(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const Q=(0,g.pipe)(h.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),Y(o,n.blocks),X(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)}),X(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),X(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),Y(o,n.blocks),X(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}X(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),X(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),X(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),X(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})})),X(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 i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(K(n.blocks)),attributes:new Map(Z(n.blocks)),order:G(n.blocks),parents:new Map($(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),Y(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);var a;"SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;var u;return r!==l||c?(l={...l,isPersistentChange:c?!o:!q(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return K(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),K(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return Z(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const i of t.clientIds){var n;const s=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===s.length)continue;let l=!1;const a=e.get(i),c={};s.forEach((([e,t])=>{a[e]!==t&&(l=!0,c[e]=t)})),o=o||l,l&&r.set(i,{...a,...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)})),Z(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=G(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=G(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,P(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:i}=t,{index:s=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(i[0]),n=new Map(e);return n.set(r,R(e.get(r),t,s,i.length)),n}const l=new Map(e);return l.set(n,null!==(o=e.get(n)?.filter((e=>!i.includes(e))))&&void 0!==o?o:[]),l.set(r,P(e.get(r),i,s)),l}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,R(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,R(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=G(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const i=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];i.length!==e.length&&n.set(o,i)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return $(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return $(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),$(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function J(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const ee=(0,h.combineReducers)({blocks:Q,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=J(e.selectionStart,t),o=J(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?j()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e},insertionCue:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return j()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=M,t){if("UPDATE_SETTINGS"===t.type){const n=t.reset?{...M,...t.settings}:{...e,...t.settings};return Object.defineProperty(n,"__unstableIsPreviewMode",{get(){return B()("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),n}return e},preferences:function(e=T,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,h.select)(d.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},hoveredBlockClientId:function(e=!1,t){return"HOVER_BLOCK"===t.type?t.clientId:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}});function te(e,t){if(""===t){const n=e.blocks.tree.get(t);if(!n)return;return{clientId:"",...n}}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);const n=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:n?.innerBlocks}}function ne(e,t,n){const o=te(e,t);if(o&&(n(o),o?.innerBlocks?.length))for(const t of o?.innerBlocks)ne(e,t.clientId,n)}function oe(e,t,n){if(!n.length)return;let o=e.blocks.parents.get(t);for(;void 0!==o;){if(n.includes(o))return o;o=e.blocks.parents.get(o)}}function re(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function ie(e,t=!1,n=""){const o=e?.zoomLevel<100||"auto-scaled"===e?.zoomLevel,r=new Map,i=e.settings?.[O],s=e.blocks.order.get(i),l=Array.from(e.blockEditingModes).some((([,e])=>"disabled"===e)),a=[],c=[];return Object.keys(e.blocks.controlledInnerBlocks).forEach((t=>{const n=e.blocks.byClientId?.get(t);"core/template-part"===n?.name&&a.push(t),"core/block"===n?.name&&c.push(t)})),ne(e,n,(n=>{const{clientId:u,name:d}=n;if(!e.blockEditingModes.has(u)){if(l){let t,n=e.blocks.parents.get(u);for(;void 0!==n&&(r.has(n)?t=r.get(n):e.blockEditingModes.has(n)&&(t=e.blockEditingModes.get(n)),!t);)n=e.blocks.parents.get(n);if("disabled"===t)return void r.set(u,"disabled")}if(o||t){if(u===i)return void r.set(u,"contentOnly");if(!s?.length)return void r.set(u,"disabled");if(s.includes(u))return void r.set(u,"contentOnly");if(o)return void r.set(u,"disabled");if(!!!oe(e,u,s)){if(""===u)return void r.set(u,"disabled");if("core/template-part"===d)return void r.set(u,"contentOnly");if(!!!oe(e,u,a)&&!H(d))return void r.set(u,"disabled")}if(c.length){const t=oe(e,u,c);if(t)return oe(e,t,c)?void r.set(u,"disabled"):re(n)?void r.set(u,"contentOnly"):void r.set(u,"disabled")}return d&&H(d)?void r.set(u,"contentOnly"):void r.set(u,"disabled")}if(c.length){if(c.includes(u))return oe(e,u,c)?void r.set(u,"disabled"):void 0;const t=oe(e,u,c);if(t){if(oe(e,t,c))return void r.set(u,"disabled");if(re(n))return void r.set(u,"contentOnly");r.set(u,"disabled")}}}})),r}function se({prevState:e,nextState:t,addedBlocks:n,removedClientIds:o,isNavMode:r=!1}){const i=r?e.derivedNavModeBlockEditingModes:e.derivedBlockEditingModes;let s;return o?.forEach((t=>{ne(e,t,(e=>{i.has(e.clientId)&&(s||(s=new Map(i)),s.delete(e.clientId))}))})),n?.forEach((e=>{ne(t,e.clientId,(e=>{const n=ie(t,r,e.clientId);n.size&&(s=s?new Map([...s?.size?s:[],...n]):new Map([...i?.size?i:[],...n]))}))})),s}const le=(0,g.pipe)((function(e){return(t,n)=>{var o,r;const i=e(t,n);if("SET_EDITOR_MODE"!==n.type&&i===t)return t;switch(n.type){case"REMOVE_BLOCKS":{const e=se({prevState:t,nextState:i,removedClientIds:n.clientIds,isNavMode:!1}),o=se({prevState:t,nextState:i,removedClientIds:n.clientIds,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=se({prevState:t,nextState:i,addedBlocks:n.blocks,isNavMode:!1}),o=se({prevState:t,nextState:i,addedBlocks:n.blocks,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{const e=te(i,n.clientId);if(!e)break;const o=se({prevState:t,nextState:i,removedClientIds:[n.clientId],addedBlocks:[e],isNavMode:!1}),r=se({prevState:t,nextState:i,removedClientIds:[n.clientId],addedBlocks:[e],isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"REPLACE_BLOCKS":{const e=se({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:n.clientIds,isNavMode:!1}),o=se({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:n.clientIds,isNavMode:!0});if(e||o)return{...i,derivedBlockEditingModes:null!=e?e:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=o?o:t.derivedNavModeBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{const e=t.blocks.order.get(n.rootClientId),o=se({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:e,isNavMode:!1}),r=se({prevState:t,nextState:i,addedBlocks:n.blocks,removedClientIds:e,isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{const e=n.clientIds.map((e=>i.blocks.byClientId.get(e))),o=se({prevState:t,nextState:i,addedBlocks:e,removedClientIds:n.clientIds,isNavMode:!1}),r=se({prevState:t,nextState:i,addedBlocks:e,removedClientIds:n.clientIds,isNavMode:!0});if(o||r)return{...i,derivedBlockEditingModes:null!=o?o:t.derivedBlockEditingModes,derivedNavModeBlockEditingModes:null!=r?r:t.derivedNavModeBlockEditingModes};break}case"UPDATE_SETTINGS":if(t?.settings?.[O]!==i?.settings?.[O])return{...i,derivedBlockEditingModes:ie(i,!1),derivedNavModeBlockEditingModes:ie(i,!0)};break;case"RESET_BLOCKS":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...i,derivedBlockEditingModes:ie(i,!1),derivedNavModeBlockEditingModes:ie(i,!0)}}return i.derivedBlockEditingModes=null!==(o=t?.derivedBlockEditingModes)&&void 0!==o?o:new Map,i.derivedNavModeBlockEditingModes=null!==(r=t?.derivedNavModeBlockEditingModes)&&void 0!==r?r:new Map,i}}),(function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}))(ee),ae=window.wp.primitives,ce=window.ReactJSXRuntime,ue=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),de=window.wp.richText,pe=window.wp.preferences,he=window.wp.blockSerializationDefaultParser,ge="core/block-editor",me="user",fe="theme",be="directory",ke="fully",ve="unsynced",_e={name:"allPatterns",label:(0,E._x)("All","patterns")},xe={name:"myPatterns",label:(0,E.__)("My patterns")},ye={name:"core/starter-content",label:(0,E.__)("Starter content")};function Se(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==fe||!o&&!r)||(!(t!==be||!o&&r)||(t===me&&e.type!==me||(n===ke&&""!==e.syncStatus||!(n!==ve||"unsynced"===e.syncStatus||!o))))}function we(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const Ce=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let i=e;return r.forEach((e=>{i=i?.[e]})),null!==(o=i)&&void 0!==o?o:n};const Be=["color","border","dimensions","typography","spacing"],Ie={"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},je={"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"},Ee=e=>je[e]||e;function Te(e,t,...n){const o=wt(e,t),r=[];if(t){let n=t;do{const t=wt(e,n);(0,d.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(Be.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,m.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=Ee(n);for(const t of r){var l;const n=Bt(e,t);if(i=null!==(l=Ce(n.settings?.blocks?.[o],s))&&void 0!==l?l:Ce(n.settings,s),void 0!==i)break}const a=bo(e);var c,u;if(void 0===i&&o&&(i=Ce(a.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=Ce(a.__experimentalFeatures,s)),void 0!==i)return d.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?null!==(c=null!==(u=i.custom)&&void 0!==u?u:i.theme)&&void 0!==c?c:i.default:i;const p=Ie[s]?.(a);return void 0!==p?p:"typography.dropCap"===s||void 0}))}function Me(e){return e.isBlockInterfaceHidden}function Pe(e){return e?.lastBlockInserted?.clientIds}function Re(e,t){return e.blocks.byClientId.get(t)}const Ne=(e,t)=>{const n=t=>"disabled"===Lo(e,t)&&vn(e,t).every(n);return vn(e,t).every(n)};function Ae(e,t){const n=vn(e,t),o=[];for(const t of n){const n=Ae(e,t);"disabled"!==Lo(e,t)?o.push({clientId:t,innerBlocks:n}):o.push(...n)}return o}const Le=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(Ae,(t=>[t.blocks.order,t.derivedBlockEditingModes,t.derivedNavModeBlockEditingModes,t.blockEditingModes,t.settings.templateLock,t.blockListSettings,e(ge).__unstableGetEditorMode(t)])))),De=(0,h.createSelector)(((e,t,n=!1)=>qt(e,t,n).filter((t=>"disabled"!==Lo(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Oe(e){return e.removalPromptData}function ze(e){return e.blockRemovalRules}function Fe(e){return e.openedBlockSettingsMenu}const Ve=(0,h.createSelector)((e=>{const t=Rt(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{var o,r;const[,{clientId:i}]=e,[,{clientId:s}]=n;return(null!==(o=t[i])&&void 0!==o?o:-1)-(null!==(r=t[s])&&void 0!==r?r:-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function He(e){return e.registeredInserterMediaCategories}const Ue=(0,h.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),Ge=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=V(e(ge)),r=o(),{allowedBlockTypes:i}=bo(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=mt(e);return bt(r,i)&&r.every((({name:e})=>Hn(t,e,n)))}))}),((t,n)=>[...kt(e)(t),...vt(e)(t,n)]))));function $e(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:me,title:e.title.raw,categories:e.wp_pattern_category?.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status}}const We=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n)=>{var o,r;if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=V(e(ge)).getReusableBlocks().find((({id:e})=>e===o));return r?$e(r,t.settings.__experimentalUserPatternCategories):null}return[...null!==(o=t.settings.__experimentalBlockPatterns)&&void 0!==o?o:[],...null!==(r=t.settings[L]?.(e))&&void 0!==r?r:[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[V(e(ge)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[L]?.(e)])))),Ke=(0,h.createRegistrySelector)((e=>(0,h.createSelector)((t=>{var n,o;return[...V(e(ge)).getReusableBlocks().map((e=>$e(e,t.settings.__experimentalUserPatternCategories))),...null!==(n=t.settings.__experimentalBlockPatterns)&&void 0!==n?n:[],...null!==(o=t.settings[L]?.(e))&&void 0!==o?o:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),kt(e)))),Ze=[],qe=(0,h.createRegistrySelector)((e=>t=>{var n;const o=t.settings[D];return null!==(n=o?o(e):t.settings.__experimentalReusableBlocks)&&void 0!==n?n:Ze}));function Ye(e){return e.lastFocus}function Xe(e){return e.isDragging}function Qe(e){return e.expandedBlock}const Je=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)"contentOnly"===zn(e,o)&&(n=o);return n},et=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)tt(e,o)&&(n=o);return n};function tt(e,t){const n=wt(e,t);if("core/block"===n||"contentOnly"===zn(e,t))return!0;const o=So(e);if(o&&"core/template-part"===n)return!0;const r=vn(e,it(e));return o&&r.includes(t)}function nt(e){return e.temporarilyEditingAsBlocks}function ot(e){return e.temporarilyEditingFocusModeRevert}const rt=(0,h.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function it(e){return e.settings?.[O]}function st(e){return"auto-scaled"===e.zoomLevel||e.zoomLevel<100}function lt(e){return e.zoomLevel}function at(e,t,n=""){const o=Array.isArray(t)?t:[t],r=t=>o.every((n=>Hn(e,n,t)));if(!n){if(r(n))return n;const t=it(e);return t&&r(t)?t:null}let i=n;for(;null!==i&&!r(i);){i=Zt(e,i)}return i}function ct(e,t,n){const{allowedBlockTypes:o}=bo(e);if(!bt(mt(t),o))return null;return at(e,mt(t).map((({blockName:e})=>e)),n)}function ut(e){return e.insertionPoint}const dt=Symbol("isFiltered"),pt=new WeakMap,ht=new WeakMap;function gt(e){let t=pt.get(e);return t||(t=function(e){const t=(0,d.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),pt.set(e,t)),t}function mt(e){let t=ht.get(e);return t||(t=(0,he.parse)(e.content),t=t.filter((e=>null!==e.blockName)),ht.set(e,t)),t}const ft=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,bt=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!ft(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},kt=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[L]?.(e),t.blockPatterns,V(e(ge)).getReusableBlocks()],vt=e=>(t,n)=>[t.blockListSettings[n],t.blocks.byClientId.get(n),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockEditingModes,e(ge).__unstableGetEditorMode(t),it(t)];function _t(e,t,n="asc"){return e.concat().sort(((e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0})(t,e,n))}const xt=[],yt=new Set,St={[dt]:!0};function wt(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==p.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function Ct(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Bt(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function It(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const jt=(0,h.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:Bt(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function Et(e,t){const n=t&&jo(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||xt}const Tt=(0,h.createSelector)(((e,t)=>(B()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:Mt(e,t)})),(e=>[e.blocks.order])),Mt=(0,h.createSelector)(((e,t="")=>(B()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),vn(e,t).map((t=>Tt(e,t))))),(e=>[e.blocks.order])),Pt=(0,h.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o[e.blocks.order])),Rt=e=>Pt(e,""),Nt=(0,h.createSelector)(((e,t)=>{const n=Rt(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),At=(0,h.createSelector)(((e,t)=>{if(!t)return xt;const n=Array.isArray(t)?t:[t],o=Rt(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:xt}),(e=>[e.blocks.order,e.blocks.byClientId]));function Lt(e,t){return B()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),At(e,t)}const Dt=(0,h.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>It(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Ot=(0,h.createSelector)(((e,t)=>Dt(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Dt(e,t)));function zt(e,t){return vn(e,t).length}function Ft(e){return e.selection.selectionStart}function Vt(e){return e.selection.selectionEnd}function Ht(e){return e.selection.selectionStart.clientId}function Ut(e){return e.selection.selectionEnd.clientId}function Gt(e){const t=rn(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function $t(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Wt(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Kt(e){const t=Wt(e);return t?It(e,t):null}function Zt(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const qt=(0,h.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():xt}),(e=>[e.blocks.parents])),Yt=(0,h.createSelector)(((e,t,n,o=!1)=>{const r=qt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(wt(e,t))))}),(e=>[e.blocks.parents]));function Xt(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Qt(e,t){const n=Wt(e),o=[...qt(e,t),t],r=[...qt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return xt;if(t.clientId===n.clientId)return[t.clientId];const o=Zt(e,t.clientId);if(null===o)return xt;const r=vn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function rn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?xt:on(e)}const sn=(0,h.createSelector)((e=>{const t=rn(e);return t.length?t.map((t=>It(e,t))):xt}),(e=>[...on.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function ln(e){return rn(e)[0]||null}function an(e){const t=rn(e);return t[t.length-1]||null}function cn(e,t){return ln(e)===t}function un(e,t){return-1!==rn(e).indexOf(t)}const dn=(0,h.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Zt(e,n),o=un(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function pn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function hn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function gn(e){const t=Ft(e),n=Vt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function mn(e){const t=Ft(e),n=Vt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function fn(e){return on(e).some((t=>{const n=wt(e,t);return!(0,d.getBlockType)(n).merge}))}function bn(e,t){const n=Ft(e),o=Vt(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=Zt(e,n.clientId);if(r!==Zt(e,o.clientId))return!1;const i=vn(e,r);let s,l;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,l=n):(s=n,l=o);const a=t?l.clientId:s.clientId,c=t?s.clientId:l.clientId,u=wt(e,a);if(!(0,d.getBlockType)(u).merge)return!1;const p=It(e,c);if(p.name===u)return!0;const h=(0,d.switchToBlockType)(p,u);return h&&h.length}const kn=e=>{const t=Ft(e),n=Vt(e);if(t.clientId===n.clientId)return xt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return xt;const o=Zt(e,t.clientId);if(o!==Zt(e,n.clientId))return xt;const r=vn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=It(e,l.clientId),u=It(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,de.create)({html:d}),g=(0,de.create)({html:p});return h=(0,de.remove)(h,0,l.offset),g=(0,de.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,de.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,de.toHTMLString)({value:g})}}]};function vn(e,t){return e.blocks.order.get(t||"")||xt}function _n(e,t){return vn(e,Zt(e,t)).indexOf(t)}function xn(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function yn(e,t,n=!1){const o=on(e);return!!o.length&&(n?o.some((n=>qt(e,n,!0).includes(t))):o.some((n=>Zt(e,n)===t)))}function Sn(e,t,n=!1){return vn(e,t).some((t=>Pn(e,t)||n&&Sn(e,t,n)))}function wn(e,t){if(!t)return!1;const n=rn(e),o=n.indexOf(t);return o>-1&&oPn(e,t)))}function Nn(){return B()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const An=(0,h.createSelector)((e=>{let t,n;const{insertionCue:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Zt(e,i)||void 0,n=_n(e,r.clientId)+1):n=vn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function Ln(e){return null!==e.insertionCue}function Dn(e){return e.template.isValid}function On(e){return e.settings.template}function zn(e,t){var n,o;return t?null!==(n=fo(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const Fn=(e,t,n=null)=>{let o,r;if(t&&"object"==typeof t?(o=t,r=t.name):(o=(0,d.getBlockType)(t),r=t),!o)return!1;const{allowedBlockTypes:i}=bo(e);if(!ft(i,r,!0))return!1;const s=(Array.isArray(o.parent)?o.parent:[]).concat(Array.isArray(o.ancestor)?o.ancestor:[]);if(s.length>0){if(s.includes("core/post-content"))return!0;let t=n,o=!1;do{if(s.includes(wt(e,t))){o=!0;break}t=e.blocks.parents.get(t)}while(t);return o}return!0},Vn=(e,t,n=null)=>{if(!Fn(e,t,n))return!1;let o;t&&"object"==typeof t?(o=t,t=o.name):o=(0,d.getBlockType)(t);if(!!zn(e,n))return!1;if(!!tt(e,n))return!1;if("disabled"===Lo(e,null!=n?n:""))return!1;const r=fo(e,n);if(n&&void 0===r)return!1;const i=wt(e,n),s=(0,d.getBlockType)(i),l=s?.allowedBlocks;let a=ft(l,t);if(!1!==a){const e=r?.allowedBlocks,n=ft(e,t);null!==n&&(a=n)}const c=o.parent,u=ft(c,i);let p=!0;const h=o.ancestor;if(h){p=[n,...qt(e,n)].some((t=>ft(h,wt(e,t))))}const g=p&&(null===a&&null===u||!0===a||!0===u);return g?(0,m.applyFilters)("blockEditor.__unstableCanInsertBlockType",g,o,n,{getBlock:It.bind(null,e),getBlockParentsByBlockName:Yt.bind(null,e)}):g},Hn=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(Vn,((t,n,o)=>vt(e)(t,o)))));function Un(e,t,n=null){return t.every((t=>Hn(e,wt(e,t),n)))}function Gn(e,t){const n=Bt(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Zt(e,t);if(zn(e,o))return!1;return!!!et(e,t)&&"disabled"!==Lo(e,o)}function $n(e,t){return t.every((t=>Gn(e,t)))}function Wn(e,t){const n=Bt(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Zt(e,t);return"all"!==zn(e,o)&&"disabled"!==Lo(e,o)}function Kn(e,t){return t.every((t=>Wn(e,t)))}function Zn(e,t){const n=Bt(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function qn(e,t){return!!(0,d.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Yn(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Xn=(e,t,n)=>!!(0,d.hasBlockSupport)(t,"inserter",!0)&&Vn(e,t.name,n),Qn=(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}},Jn=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,d.hasBlockSupport)(n.name,"multiple",!0)||(r=Dt(e,Rt(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Yn(e,o)||{},l={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Qn(i,s)};if("transform"===t)return l;const a=(0,d.getBlockVariations)(n.name,"inserter");return{...l,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,parent:n.parent,ancestor:n.ancestor,variations:a,example:n.example,utility:1}},eo=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n=null,o=St)=>{const r=Vn(t,"core/block",n)?V(e(ge)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?ue:{src:ue,foreground:"var(--wp-block-synced-color)"},o=`core/block/${e.id}`,{time:r,count:i=0}=Yn(t,o)||{},s=Qn(r,i);return{id:o,name:"core/block",initialAttributes:{ref:e.id},title:e.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}})):[],i=Jn(t,{buildScope:"inserter"});let s=(0,d.getBlockTypes)().filter((e=>(0,d.hasBlockSupport)(e,"inserter",!0))).map(i);s=!1!==o[dt]?s.filter((e=>Xn(t,e,n))):s.filter((e=>Fn(t,e,n))).map((e=>({...e,isAllowedInCurrentRoot:Xn(t,e,n)})));const l=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Yn(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:Qn(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:a,noncore:c}=l.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...a,...c],...r]}),((t,n)=>[(0,d.getBlockTypes)(),V(e(ge)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...vt(e)(t,n)])))),to=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Jn(e,{buildScope:"transform"}),i=(0,d.getBlockTypes)().filter((t=>Xn(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e]))),l=(0,d.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]);return _t(l,(e=>s[e.name].frecency),"desc")}),((t,n,o)=>[(0,d.getBlockTypes)(),t.preferences.insertUsage,...vt(e)(t,o)])))),no=(0,h.createRegistrySelector)((e=>(t,n=null)=>{if((0,d.getBlockTypes)().some((e=>Xn(t,e,n))))return!0;return Vn(t,"core/block",n)&&V(e(ge)).getReusableBlocks().length>0})),oo=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n=null)=>{if(!n)return;const o=(0,d.getBlockTypes)().filter((e=>Xn(t,e,n)));return Vn(t,"core/block",n)&&V(e(ge)).getReusableBlocks().length>0&&o.push("core/block"),o}),((t,n)=>[(0,d.getBlockTypes)(),V(e(ge)).getReusableBlocks(),...vt(e)(t,n)])))),ro=(0,h.createSelector)(((e,t=null)=>(B()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),oo(e,t))),((e,t)=>oo.getDependants(e,t)));function io(e,t=null){var n;if(!t)return;const{defaultBlock:o,directInsert:r}=null!==(n=e.blockListSettings[t])&&void 0!==n?n:{};return o&&r?o:void 0}function so(e,t=null){return B()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),io(e,t)}const lo=(0,h.createRegistrySelector)((e=>(t,n)=>{const o=V(e(ge)).getPatternBySlug(n);return o?gt(o):null})),ao=e=>(t,n)=>[...kt(e)(t),...vt(e)(t,n)],co=new WeakMap;function uo(e){let t=co.get(e);return t||(t={...e,get blocks(){return gt(e).blocks}},co.set(e,t)),t}const po=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n=null,o=St)=>{const{getAllPatterns:r}=V(e(ge)),i=r(),{allowedBlockTypes:s}=bo(t),l=i.filter((({inserter:e=!0})=>!!e)).map(uo);return l.filter((e=>bt(mt(e),s))).filter((e=>mt(e).every((({blockName:e})=>!1!==o[dt]?Hn(t,e,n):Fn(t,e,n)))))}),ao(e)))),ho=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n,o=null)=>{if(!n)return xt;const r=e(ge).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?xt:s}),((t,n,o)=>ao(e)(t,o))))),go=(0,h.createRegistrySelector)((e=>(B()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ge).getPatternsByBlockTypes))),mo=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n,o=null)=>{if(!n)return xt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||jo(t,e))))return xt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ge).getPatternsByBlockTypes(r,o)}),((t,n,o)=>ao(e)(t,o)))));function fo(e,t){return e.blockListSettings[t]}function bo(e){return e.settings}function ko(e){return e.blocks.isPersistentChange}const vo=(0,h.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),_o=(0,h.createRegistrySelector)((e=>(0,h.createSelector)(((t,n)=>{B()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=V(e(ge)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[V(e(ge)).getReusableBlocks()]))));function xo(e){return e.blocks.isIgnoredChange}function yo(e){return e.lastBlockAttributesChange}function So(e){return"navigation"===wo(e)}const wo=(0,h.createRegistrySelector)((e=>t=>{var n;return window?.__experimentalEditorWriteMode?null!==(n=t.settings.editorTool)&&void 0!==n?n:e(pe.store).get("core","editorTool"):"edit"}));function Co(){return B()('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Bo(e){return!!e.automaticChangeStatus}function Io(e,t){return e.highlightedBlock===t}function jo(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Eo=(0,h.createSelector)(((e,t)=>{if(!t.length)return null;const n=Wt(e);if(t.includes(wt(e,n)))return n;const o=rn(e),r=Yt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function To(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function Mo(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}function Po(e){return e.hoveredBlockClientId}const Ro=(0,h.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?yt:t}),(e=>[e.blockVisibility]));function No(e,t){if("default"!==Lo(e,t))return!1;if(!Zn(e,t))return!0;if(st(e)){const n=it(e);if(n){const o=vn(e,n);if(o?.includes(t))return!0}else if(t&&!Zt(e,t))return!0}return!(0,d.hasBlockSupport)(wt(e,t),"__experimentalDisableBlockOverlay",!1)&&jo(e,t)&&!xn(e,t)&&!yn(e,t,!0)}function Ao(e,t){let n=e.blocks.parents.get(t);for(;n;){if(No(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const Lo=(0,h.createRegistrySelector)((e=>(t,n="")=>{null===n&&(n="");const o=So(t);if(!o&&t.derivedBlockEditingModes?.has(n))return t.derivedBlockEditingModes.get(n);if(o&&t.derivedNavModeBlockEditingModes?.has(n))return t.derivedNavModeBlockEditingModes.get(n);const r=t.blockEditingModes.get(n);if(r)return r;if(""===n)return"default";if("contentOnly"===zn(t,Zt(t,n))){const o=wt(t,n),{hasContentRoleAttribute:r}=V(e(d.store));return r(o)?"contentOnly":"disabled"}return"default"})),Do=(0,h.createRegistrySelector)((e=>(t,n="")=>{const o=n||Wt(t);if(!o)return!1;const{getGroupingBlockName:r}=e(d.store),i=It(t,o),s=r();return i&&(i.name===s||(0,d.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Gn(t,o)})),Oo=(0,h.createRegistrySelector)((e=>(t,n=xt)=>{const{getGroupingBlockName:o}=e(d.store),r=o(),i=n?.length?n:on(t),s=i?.length?Zt(t,i[0]):void 0;return Hn(t,r,s)&&i.length&&$n(t,i)})),zo=(e,t)=>(B()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),Je(e,t));function Fo(e){return B()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),nt(e)}function Vo(e){return B()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),ot(e)}const Ho=window.wp.a11y,Uo=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function Go(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;Object.hasOwn(o,"__unstableIsPreviewMode")&&(B()("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),o={...o},o.isPreviewMode=o.__unstableIsPreviewMode,delete o.__unstableIsPreviewMode);let r=o;if(t&&"web"===p.Platform.OS){r={};for(const e in o)Uo.includes(e)||(r[e]=o[e])}return{type:"UPDATE_SETTINGS",settings:r,reset:n}}function $o(){return{type:"HIDE_BLOCK_INTERFACE"}}function Wo(){return{type:"SHOW_BLOCK_INTERFACE"}}const Ko=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){function a(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t}const c=a(e.map(o.getBlock));let u;for(const d of l)if(u=d.callback(c),u)return void r(qo(e,t,u))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Zo())}))},Zo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function qo(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Yo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Xo(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Qo(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function Jo(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function er(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function tr(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function nr(e){return({select:t,dispatch:n,registry:o})=>{const r=V(o.select(Bi)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function or(){return{type:"START_DRAGGING"}}function rr(){return{type:"STOP_DRAGGING"}}function ir(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function sr(e){return{type:"SET_INSERTION_POINT",value:e}}const lr=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)},ar=(e=100)=>({select:t,dispatch:n})=>{if(100!==e){const e=t.getBlockSelectionStart(),o=t.getSectionRootClientId();if(e){let r;if(o){const n=t.getBlockOrder(o);r=n?.includes(e)?e:t.getBlockParents(e).find((e=>n.includes(e)))}else r=t.getBlockHierarchyRootClientId(e);r?n.selectBlock(r):n.clearSelectedBlock(),(0,Ho.speak)((0,E.__)("You are currently in zoom-out mode."))}}n({type:"SET_ZOOM_LEVEL",zoom:e})};function cr(){return{type:"RESET_ZOOM_LEVEL"}}const ur=window.wp.notices,dr="";function pr(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof de.RichTextData)&&-1!==n.toString().indexOf(dr)}))}function hr(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const gr=e=>Array.isArray(e)?e:[e],mr=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(fr(e))},fr=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,d.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function br(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function kr(e){return B()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function vr(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:gr(e),attributes:t,uniqueByBlock:n}}function _r(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function xr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function yr(e){return{type:"HOVER_BLOCK",clientId:e}}const Sr=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},wr=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function Cr(){return{type:"START_MULTI_SELECT"}}function Br(){return{type:"STOP_MULTI_SELECT"}}const Ir=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,Ho.speak)((0,E.sprintf)((0,E._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function jr(){return{type:"CLEAR_SELECTED_BLOCK"}}function Er(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const Tr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=gr(e),t=gr(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function Mr(e,t){return Tr(e,t)}const Pr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:gr(t),rootClientId:n})},Rr=Pr("MOVE_BLOCKS_DOWN"),Nr=Pr("MOVE_BLOCKS_UP"),Ar=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function Lr(e,t="",n="",o){return Ar([e],t,n,o)}function Dr(e,t,n,o,r){return Or([e],t,n,o,0,r)}const Or=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,B()("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=gr(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function zr(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const Fr=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Vr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Hr=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,d.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Ur=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const l=n.getBlockOrder(s);let a,c;l.indexOf(r.clientId)>l.indexOf(i.clientId)?(a=i,c=r):(a=r,c=i);const u=e?c:a,p=n.getBlock(u.clientId),h=(0,d.getBlockType)(p.name);if(!h.merge)return;const g=a,m=c,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,de.create)({html:k}),x=(0,de.create)({html:v});_=(0,de.remove)(_,g.offset,_.text.length),x=(0,de.insert)(x,dr,0,m.offset);const y=(0,d.cloneBlock)(f,{[g.attributeKey]:(0,de.toHTMLString)({value:_})}),S=(0,d.cloneBlock)(b,{[m.attributeKey]:(0,de.toHTMLString)({value:x})}),w=e?y:S,C=f.name===b.name?[w]:(0,d.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(y.attributes,e.attributes)}const I=pr(B),j=B[I],E=(0,de.create)({html:j}),T=E.text.indexOf(dr),M=(0,de.remove)(E,T,T+1),P=(0,de.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),N=[...e?C:[],{...p,attributes:{...p.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,I,T,T),o.replaceBlocks(R,N,0,n.getSelectedBlocksInitialCaretPosition())}))},Gr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),l=n.getBlockRootClientId(i.clientId);if(s!==l)return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const p=c,h=u,g=n.getBlock(p.clientId),m=n.getBlock(h.clientId),f=(0,d.getBlockType)(g.name),b=(0,d.getBlockType)(m.name),k="string"==typeof p.attributeKey?p.attributeKey:hr(f),v="string"==typeof h.attributeKey?h.attributeKey:hr(b),_=n.getBlockAttributes(p.clientId),x=_?.metadata?.bindings;if(x?.[k]){if(e.length){const{createWarningNotice:O}=t.dispatch(ur.store);return void O((0,E.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(p.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(p.clientId===h.clientId&&k===v&&p.offset===h.offset)if(e.length){if((0,d.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([p.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(p.clientId).length){function z(){const e=(0,d.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,d.createBlock)(e):(0,d.createBlock)(n.getBlockName(p.clientId))}const F=_[k].length;if(0===p.offset&&F)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId),s,!1);if(p.offset===F)return void o.insertBlocks([z()],n.getBlockIndex(p.clientId)+1,s)}const y=g.attributes[k],S=m.attributes[v];let w=(0,de.create)({html:y}),C=(0,de.create)({html:S});w=(0,de.remove)(w,p.offset,w.text.length),C=(0,de.remove)(C,0,h.offset);let B={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,de.toHTMLString)({value:w})}},I={...m,clientId:g.clientId===m.clientId?(0,d.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,de.toHTMLString)({value:C})}};const j=(0,d.getDefaultBlockName)();if(g.clientId===m.clientId&&j&&I.name!==j&&n.canInsertBlockType(j,s)){const V=(0,d.switchToBlockType)(I,j);1===V?.length&&(I=V[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[B,I]);let T;const M=[],P=[...e],R=P.shift(),N=(0,d.getBlockType)(B.name),A=N.merge&&R.name===N.name?[R]:(0,d.switchToBlockType)(R,N.name);if(A?.length){const H=A.shift();B={...B,attributes:{...B.attributes,...N.merge(B.attributes,H.attributes)}},M.push(B),T={clientId:B.clientId,attributeKey:k,offset:(0,de.create)({html:B.attributes[k]}).text.length},P.unshift(...A)}else(0,d.isUnmodifiedBlock)(B)||M.push(B),M.push(R);const L=P.pop(),D=(0,d.getBlockType)(I.name);if(P.length&&M.push(...P),L){const U=D.merge&&D.name===L.name?[L]:(0,d.switchToBlockType)(L,D.name);if(U?.length){const G=U.pop();M.push({...I,attributes:{...I.attributes,...D.merge(G.attributes,I.attributes)}}),M.push(...U),T={clientId:I.clientId,attributeKey:v,offset:(0,de.create)({html:G.attributes[v]}).text.length}}else M.push(L),(0,d.isUnmodifiedBlock)(I)||M.push(I)}else(0,d.isUnmodifiedBlock)(I)||M.push(I);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),T&&o.selectionChange(T.clientId,T.attributeKey,T.offset,T.offset)}))},$r=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Wr=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,l=o.getBlock(i),a=(0,d.getBlockType)(l.name);if(!a)return;const c=o.getBlock(s);if(!a.merge&&(0,d.getBlockSupport)(l.name,"__experimentalOnMerge")){const e=(0,d.switchToBlockType)(c,a.name);if(1!==e?.length)return void r.selectBlock(l.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(l.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,d.isUnmodifiedDefaultBlock)(l))return void r.removeBlock(i,o.isBlockSelected(i));if((0,d.isUnmodifiedDefaultBlock)(c))return void r.removeBlock(s,o.isBlockSelected(s));if(!a.merge)return void r.selectBlock(l.clientId);const u=(0,d.getBlockType)(c.name),{clientId:p,attributeKey:h,offset:g}=o.getSelectionStart(),m=(p===i?a:u).attributes[h],f=(p===i||p===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,d.cloneBlock)(l),k=(0,d.cloneBlock)(c);if(f){const e=p===i?b:k,t=e.attributes[h],n=(0,de.insert)((0,de.create)({html:t}),dr,g,g);e.attributes[h]=(0,de.toHTMLString)({value:n})}const v=l.name===c.name?[k]:(0,d.switchToBlockType)(k,l.name);if(!v||!v.length)return;const _=a.merge(b.attributes,v[0].attributes);if(f){const e=pr(_),t=_[e],n=(0,de.create)({html:t}),o=n.text.indexOf(dr),i=(0,de.remove)(n,o,o+1),s=(0,de.toHTMLString)({value:i});_[e]=s,r.selectionChange(l.clientId,e,o,o)}r.replaceBlocks([l.clientId,c.clientId],[{...l,attributes:{...l.attributes,..._}},...v.slice(1)],0)},Kr=(e,t=!0)=>Ko(e,t);function Zr(e,t){return Kr([e],t)}function qr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Yr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Xr(){return{type:"START_TYPING"}}function Qr(){return{type:"STOP_TYPING"}}function Jr(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function ei(){return{type:"STOP_DRAGGING_BLOCKS"}}function ti(){return B()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ni(){return B()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function oi(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const ri=(e,t,n)=>({dispatch:o})=>{const r=(0,d.getDefaultBlockName)();if(!r)return;const i=(0,d.createBlock)(r,e);return o.insertBlock(i,n,t)};function ii(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function si(e){return Go(e,{stripExperimentalSettings:!0})}function li(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function ai(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ci(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const ui=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=e=>setTimeout(e,100)}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},di=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},pi=e=>({registry:t})=>{t.dispatch(pe.store).set("core","editorTool",e),"navigation"===e?(0,Ho.speak)((0,E.__)("You are currently in Write mode.")):"edit"===e&&(0,Ho.speak)((0,E.__)("You are currently in Design mode."))};function hi(){return B()('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}const gi=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const i=r.map((e=>e.name));if(i.some((e=>!(0,d.hasBlockSupport)(e,"multiple",!0))))return;const s=n.getBlockRootClientId(e[0]),l=gr(e),a=n.getBlockIndex(l[l.length-1]),c=r.map((e=>(0,d.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(c,a+1,s,t),c.length>1&&t&&o.multiSelect(c[0].clientId,c[c.length-1].clientId),c.map((e=>e.clientId))},mi=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,d.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r,o)},fi=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,d.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r+1,o)};function bi(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const ki=e=>async({dispatch:t})=>{t(bi(e,!0)),await new Promise((e=>setTimeout(e,150))),t(bi(e,!1))};function vi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function _i(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function xi(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const yi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Si(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function wi(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Ci={reducer:le,selectors:t,actions:i},Bi=(0,h.createReduxStore)(ge,{...Ci,persist:["preferences"]}),Ii=(0,h.registerStore)(ge,{...Ci,persist:["preferences"]});function ji(...e){const{clientId:t=null}=w();return(0,h.useSelect)((n=>V(n(Bi)).getBlockSettings(t,...e)),[t,...e])}function Ei(e){B()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=ji(e);return t}V(Ii).registerPrivateActions(r),V(Ii).registerPrivateSelectors(e),V(Bi).registerPrivateActions(r),V(Bi).registerPrivateSelectors(e);const Ti=window.wp.styleEngine,Mi="1600px",Pi="320px",Ri=1,Ni=.25,Ai=.75,Li="14px";function Di({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Pi,maximumViewportWidth:r=Mi,scaleFactor:i=Ri,minimumFontSizeLimit:s}){if(s=Oi(s)?s:Li,n){const o=Oi(n);if(!o?.unit)return null;const r=Oi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),Ni),Ai),i=zi(o.value*n,3);e=r?.value&&i{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(Fi(t))}}const o=Fi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,E._x)("Regular","font style");break;case"italic":t=(0,E._x)("Italic","font style");break;case"oblique":t=(0,E._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,E._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,E._x)("Italic","font style"),value:"italic"}),r&&(t=Vi,n=Hi),t=0===t.length?Vi:t,n=0===n.length?Hi:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,E.sprintf)((0,E._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Gi(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!$i(t?.typography)&&!$i(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=Oi(n?.wideSize)?n?.wideSize:null;return $i(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=Di({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function $i(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Wi(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Gi(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Yi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Xi(){return(0,g.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Qi(e,t,n,o,r){const i=[Ce(e,["blocks",t,...n]),Ce(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return Qi(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function Ji(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=Ce(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=qi.find((e=>e.cssVarInfix===o));if(!i)return n;const s=Qi(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return Ji(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){var r;const i=null!==(r=Ce(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:Ce(e.settings,["custom",...o]);return i?Ji(e,t,i):n}(e,t,n,l):n}function es(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function ts(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:j()(e?.styles,t?.styles)&&j()(e?.settings,t?.settings)}function ns(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,Ti.getCSSValueFromRawStyle)(Ce(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const os=(0,p.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),rs={settings:{},styles:{}},is=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],ss=()=>{const{user:e,setUserConfig:t}=(0,p.useContext)(os),n={settings:e.settings,styles:e.styles};return[!!n&&!j()(n,rs),(0,p.useCallback)((()=>t(rs)),[t])]};function ls(e,t,n="all"){const{setUserConfig:o,...r}=(0,p.useContext)(os),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,a=`settings${s}`,c="all"===n?"merged":n;return[(0,p.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=Ce(t,l))&&void 0!==n?n:Ce(t,a);let o={};return is.forEach((e=>{var n;const r=null!==(n=Ce(t,`settings${i}.${e}`))&&void 0!==n?n:Ce(t,`settings.${e}`);void 0!==r&&(o=we(o,e.split("."),r))})),o}),[r,c,e,l,a,i]),e=>{o((t=>we(t,l.split("."),e)))}]}function as(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,p.useContext)(os),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let u,d;switch(n){case"all":u=Ce(r,c),d=o?Ji(r,t,u):u;break;case"user":u=Ce(s,c),d=o?Ji(r,t,u):u;break;case"base":u=Ce(i,c),d=o?Ji(i,t,u):u;break;default:throw"Unsupported source"}return[d,n=>{l((i=>we(i,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Yi[n],i=qi.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=Qi(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function cs(e,t,n){const{supportedStyles:o,supports:r}=(0,h.useSelect)((e=>({supportedStyles:V(e(d.store)).getSupportedStyles(t,n),supports:e(d.store).getBlockType(t)?.supports})),[t,n]);return(0,p.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function us(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,p.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,E._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function ds(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,p.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,E._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function ps(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,gs(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function ms(e,t,n,o,r,i){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=Ce(s,e);t&&(l={...l,attributes:we(l.attributes,e,t)})}))})),l}function fs(e,t,n){const o=(0,d.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const bs=new WeakMap;function ks({id:e,css:t}){return vs({id:e,css:t})}function vs({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=V((0,h.useDispatch)(Bi)),a=(0,h.useRegistry)(),c=(0,p.useId)();(0,p.useEffect)((()=>{if(!t&&!n)return;const u=e||c,d={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return bs.get(a)||bs.set(a,[]),bs.get(a).push([u,d]),window.queueMicrotask((()=>{bs.get(a)?.length&&a.batch((()=>{bs.get(a).forEach((e=>{s(...e)})),bs.set(a,[])}))})),()=>{const e=bs.get(a)?.find((([e])=>e===u));e?bs.set(a,bs.get(a).filter((([e])=>e!==u))):l(u)}}),[e,t,i,n,o,c,s,l,a])}function _s(e,t){const[n,o,r,i,s,l,a,c,u,d,h,g,m,f,b,k,v,_,x,y,S,w,C,B,I,j,E,T,M,P,R,N,A,L,D,O,z,F,V,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]=ji("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return cs((0,p.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:z,theme:V,default:H},gradients:{custom:Z,theme:q,default:Y},duotone:{custom:$,theme:W,default:K},defaultGradients:X,defaultPalette:U,defaultDuotone:G,custom:O,customGradient:Q,customDuotone:F,background:J,link:ee,heading:ne,button:oe,text:te},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:a,default:c,theme:u},customFontSize:d,defaultFontSizes:l,fontStyle:h,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:x,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:y,margin:S,blockGap:w,units:T},border:{color:N,radius:A,style:L,width:D},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:re})),[n,o,r,i,s,l,a,c,u,d,h,g,m,f,b,k,_,x,v,y,S,w,C,B,I,j,E,T,M,P,R,t,N,A,L,D,O,z,F,V,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re]),e)}const xs=(0,p.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,p.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,m.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,d.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const ys=window.wp.components,Ss={default:(0,ys.createSlotFill)("BlockControls"),block:(0,ys.createSlotFill)("BlockControlsBlock"),inline:(0,ys.createSlotFill)("BlockFormatControls"),other:(0,ys.createSlotFill)("BlockControlsOther"),parent:(0,ys.createSlotFill)("BlockControlsParent")};function ws({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=w();return n[f]?Ss[e]?.Fill:n[b]&&t?Ss.parent.Fill:null}(e,o);if(!r)return null;const i=(0,ce.jsxs)(ce.Fragment,{children:["default"===e&&(0,ce.jsx)(ys.ToolbarGroup,{controls:t}),n]});return(0,ce.jsx)(ys.__experimentalStyleProvider,{document,children:(0,ce.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,ce.jsx)(t,{...n,children:e})),i)}})})}window.wp.warning;const{ComponentsContext:Cs}=V(ys.privateApis);function Bs({group:e="default",...t}){const n=(0,p.useContext)(ys.__experimentalToolbarContext),o=(0,p.useContext)(Cs),r=(0,p.useMemo)((()=>({forwardedContext:[[ys.__experimentalToolbarContext.Provider,{value:n}],[Cs.Provider,{value:o}]]})),[n,o]),i=Ss[e],s=(0,ys.__experimentalUseSlotFills)(i.name);if(!i)return null;if(!s?.length)return null;const{Slot:l}=i,a=(0,ce.jsx)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,ce.jsx)(ys.ToolbarGroup,{children:a})}const Is=ws;Is.Slot=Bs;const js=e=>(0,ce.jsx)(ws,{group:"inline",...e});js.Slot=e=>(0,ce.jsx)(Bs,{group:"inline",...e});const Es=Is,Ts=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Ms=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Ps=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),Rs=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),Ns=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),As=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Ls=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),Ds={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Os(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function zs(e,t=Ds,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Os(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Fs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&"constrained"===o&&(r.none=(0,E.sprintf)((0,E.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,E.sprintf)((0,E.__)("Max %s wide"),n)),r}const Vs=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Hs=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,ce.jsx)(ae.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Us=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,ce.jsx)(ae.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Gs=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),$s=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Ws=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),Ks=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,ce.jsx)(ae.Path,{d:"m4.5 16.5v-9h1.5v9z"})]}),Zs=8,qs=["top","right","bottom","left"],Ys={top:void 0,right:void 0,bottom:void 0,left:void 0},Xs={custom:Vs,axial:Vs,horizontal:Hs,vertical:Us,top:Gs,right:$s,bottom:Ws,left:Ks},Qs={default:(0,E.__)("Spacing control"),top:(0,E.__)("Top"),bottom:(0,E.__)("Bottom"),left:(0,E.__)("Left"),right:(0,E.__)("Right"),mixed:(0,E.__)("Mixed"),vertical:(0,E.__)("Vertical"),horizontal:(0,E.__)("Horizontal"),axial:(0,E.__)("Horizontal & vertical"),custom:(0,E.__)("Custom")},Js={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function el(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function tl(e,t){if(!el(e))return e;const n=rl(e),o=t.find((e=>String(e.slug)===n));return o?.size}function nl(e,t){if(!e||el(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function ol(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function rl(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function il(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function sl(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=ol(n?.top)||t,r=ol(n?.left)||t;return o===r?o:`${o} ${r}`}const ll=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),al=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),cl=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),ul=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),dl=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})}),pl={top:{icon:ll,title:(0,E._x)("Align top","Block vertical alignment setting")},center:{icon:al,title:(0,E._x)("Align middle","Block vertical alignment setting")},bottom:{icon:cl,title:(0,E._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:ul,title:(0,E._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:dl,title:(0,E._x)("Space between","Block vertical alignment setting")}},hl=["top","center","bottom"];const gl=function({value:e,onChange:t,controls:n=hl,isCollapsed:o=!0,isToolbar:r}){function i(n){return()=>t(e===n?void 0:n)}const s=pl[e],l=pl.top,a=r?ys.ToolbarGroup:ys.ToolbarDropdownMenu,c=r?{isCollapsed:o}:{};return(0,ce.jsx)(a,{icon:s?s.icon:l.icon,label:(0,E._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...pl[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:i(t)}))),...c})},ml=e=>(0,ce.jsx)(gl,{...e,isToolbar:!1}),fl=e=>(0,ce.jsx)(gl,{...e,isToolbar:!0}),bl={left:Ts,center:Ms,right:Ps,"space-between":Rs,stretch:Ns};const kl=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?bl[o]:bl.left,a=[{name:"left",icon:Ts,title:(0,E.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:Ms,title:(0,E.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:Ps,title:(0,E.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:Rs,title:(0,E.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:Ns,title:(0,E.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?ys.ToolbarGroup:ys.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,ce.jsx)(c,{icon:l,popoverProps:r,label:(0,E.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})},vl=e=>(0,ce.jsx)(kl,{...e,isToolbar:!1}),_l=e=>(0,ce.jsx)(kl,{...e,isToolbar:!0}),xl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},yl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Sl={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},wl=["wrap","nowrap"],Cl={name:"flex",label:(0,E.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0,allowJustification:r=!0}=n;return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)(ys.Flex,{children:[r&&(0,ce.jsx)(ys.FlexItem,{children:(0,ce.jsx)(jl,{layout:e,onChange:t})}),o&&(0,ce.jsx)(ys.FlexItem,{children:(0,ce.jsx)(Tl,{layout:e,onChange:t})})]}),(0,ce.jsx)(El,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowVerticalAlignment:o=!0,allowJustification:r=!0}=n;return r||o?(0,ce.jsxs)(Es,{group:"block",__experimentalShareWithChildBlocks:!0,children:[r&&(0,ce.jsx)(jl,{layout:e,onChange:t,isToolbar:!0}),o&&(0,ce.jsx)(Bl,{layout:e,onChange:t})]}):null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ds}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!fs(o,"spacing","blockGap")?sl(n?.spacing?.blockGap,"0.5em"):void 0,a=xl[t.justifyContent],c=wl.includes(t.flexWrap)?t.flexWrap:"wrap",u=Sl[t.verticalAlignment],d=yl[t.justifyContent]||yl.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${Os(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=zs(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Bl({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?Sl.center:Sl.top,{verticalAlignment:r=o}=e;return(0,ce.jsx)(ml,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const Il={placement:"bottom-start"};function jl({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,ce.jsx)(vl,{allowedControls:s,value:o,onChange:i,popoverProps:Il});const l=[{value:"left",icon:Ts,label:(0,E.__)("Justify items left")},{value:"center",icon:Ms,label:(0,E.__)("Justify items center")},{value:"right",icon:Ps,label:(0,E.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:Rs,label:(0,E.__)("Space between items")}):l.push({value:"stretch",icon:Ns,label:(0,E.__)("Stretch items")}),(0,ce.jsx)(ys.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,E.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function El({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,ce.jsx)(ys.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Tl({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,ce.jsxs)(ys.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,E.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{icon:As,value:"horizontal",label:(0,E.__)("Horizontal")}),(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{icon:Ls,value:"vertical",label:(0,E.__)("Vertical")})]})}const Ml={name:"default",label:(0,E.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Ds}){const i=sl(t?.spacing?.blockGap);let s="";fs(n,"spacing","blockGap")||(i?.top?s=sl(i?.top):"string"==typeof i&&(s=sl(i)));let l="";return o&&s&&(l+=zs(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=Fs(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}};const Pl=(0,p.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,p.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Rl=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),Nl=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Al={name:"constrained",label:(0,E.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:Ts,label:(0,E.__)("Justify items left")},{value:"center",icon:Ms,label:(0,E.__)("Justify items center")},{value:"right",icon:Ps,label:(0,E.__)("Justify items right")}],[c]=ji("spacing.units"),u=(0,ys.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,ce.jsxs)(ys.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,ce.jsx)(ys.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ce.jsx)(Pl,{icon:Rl})})}),(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,ce.jsx)(ys.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ce.jsx)(Pl,{icon:Nl})})}),(0,ce.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,E.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,ce.jsx)(ys.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,E.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,ce.jsx)(Es,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,ce.jsx)(Dl,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ds}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=sl(n?.spacing?.blockGap);let u="";fs(o,"spacing","blockGap")||(c?.top?u=sl(c?.top):"string"==typeof c&&(u=sl(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${Os(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Os(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:s};\n\t\t\t\t\t}\n\t\t\t\t\t${Os(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?h+=`${Os(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${Os(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Ti.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Os(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Os(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=zs(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=Fs(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}},Ll={placement:"bottom-start"};function Dl({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,ce.jsx)(vl,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:Ll})}const Ol={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},zl=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],Fl={name:"grid",label:(0,E.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(Ul,{layout:e,onChange:t}),(0,ce.jsxs)(ys.__experimentalVStack,{spacing:4,children:[r&&(0,ce.jsx)(Hl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,ce.jsx)(Vl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Ds}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!fs(o,"spacing","blockGap")?sl(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${Os(e)} { ${d.join("; ")}; }`),r&&c&&(u+=zs(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Vl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,ce.jsxs)("fieldset",{children:[(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:(0,E.__)("Minimum column width")}),(0,ce.jsxs)(ys.Flex,{gap:4,children:[(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:(0,ce.jsx)(ys.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:zl,min:0,label:(0,E.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:Ol[l]||600,withInputField:!1,label:(0,E.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Hl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,ce.jsx)(ce.Fragment,{children:(0,ce.jsxs)("fieldset",{children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:(0,E.__)("Columns")}),(0,ce.jsxs)(ys.Flex,{gap:4,children:[(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:(0,ce.jsx)(ys.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,E.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,ce.jsx)(ys.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,E.__)("Rows")}):(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!=r?r:1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,E.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Ul({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,p.useState)(n||3),[a,c]=(0,p.useState)(o),[u,d]=(0,p.useState)(r||"12rem"),h=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",g="manual"===h?(0,E.__)("Grid items can be manually placed in any position on the grid."):(0,E.__)("Grid items are placed automatically depending on their order.");return(0,ce.jsxs)(ys.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,E.__)("Grid item position"),value:h,onChange:i=>{"manual"===i?d(r||"12rem"):(l(n||3),c(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?a:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?u:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?g:void 0,children:[(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"auto",label:(0,E.__)("Auto")},"auto"),(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"manual",label:(0,E.__)("Manual")},"manual")]})}const Gl=[Ml,Cl,Al,Fl];function $l(e="default"){return Gl.find((t=>t.name===e))}const Wl={type:"default"},Kl=(0,p.createContext)(Wl),Zl=Kl.Provider;function ql(){return(0,p.useContext)(Kl)}const Yl=[],Xl=["none","left","center","right","wide","full"],Ql=["wide","full"];function Jl(e=Xl){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,h.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(Bi).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),i=ql();if(t)return Yl;const s=$l(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?Yl:t}if("default"!==s.name&&"constrained"!==s.name)return Yl;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&Ql.includes(e))&&Xl.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?Yl:l}const ea=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),ta=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),na=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),oa=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})}),ra={none:{icon:Rl,title:(0,E._x)("None","Alignment option")},left:{icon:ea,title:(0,E.__)("Align left")},center:{icon:ta,title:(0,E.__)("Align center")},right:{icon:na,title:(0,E.__)("Align right")},wide:{icon:Nl,title:(0,E.__)("Wide width")},full:{icon:oa,title:(0,E.__)("Full width")}};const ia=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=Jl(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=ra[e],a=ra.none,c=o?ys.ToolbarGroup:ys.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,E.__)("Align")},d=o?{isCollapsed:r,controls:i.map((({name:t})=>({...ra[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,E.__)("Change alignment")},children:({onClose:t})=>(0,ce.jsx)(ce.Fragment,{children:(0,ce.jsx)(ys.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=ra[n],l=n===e||!e&&"none"===n;return(0,ce.jsx)(ys.MenuItem,{icon:r,iconPosition:"left",className:hs("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,ce.jsx)(c,{...u,...d})},sa=e=>(0,ce.jsx)(ia,{...e,isToolbar:!1}),la=e=>(0,ce.jsx)(ia,{...e,isToolbar:!0});function aa(e){const t=w(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,h.useDispatch)(Bi),i=(0,h.useSelect)((e=>n?null:e(Bi).getBlockEditingMode()),[n]);return(0,p.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[k]:i}const ca=["left","center","right","wide","full"],ua=["wide","full"];function da(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ca.filter((t=>e.includes(t))):!0===e?[...ca]:[],!n||!0===e&&!t?o.filter((e=>!ua.includes(e))):o}const pa={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Jl(da((0,d.getBlockSupport)(e,"align"),(0,d.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=aa();return o.length&&"default"===r?(0,ce.jsx)(Es,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,ce.jsx)(sa,{value:t,onChange:t=>{if(!t){const n=(0,d.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=da((0,d.getBlockSupport)(e,"align"),(0,d.hasBlockSupport)(e,"alignWide",!0));if(Jl(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,d.getBlockSupport)(t,"align"),i=(0,d.hasBlockSupport)(t,"alignWide",!0),s=da(r,i).includes(o);s&&(e.className=hs(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,d.hasBlockSupport)(e,"align",!1)};(0,m.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,d.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ca,""]}}),e}));const ha=(0,ys.createSlotFill)("InspectorControls"),ga=(0,ys.createSlotFill)("InspectorAdvancedControls"),ma=(0,ys.createSlotFill)("InspectorControlsBindings"),fa=(0,ys.createSlotFill)("InspectorControlsBackground"),ba=(0,ys.createSlotFill)("InspectorControlsBorder"),ka=(0,ys.createSlotFill)("InspectorControlsColor"),va=(0,ys.createSlotFill)("InspectorControlsFilter"),_a=(0,ys.createSlotFill)("InspectorControlsDimensions"),xa=(0,ys.createSlotFill)("InspectorControlsPosition"),ya=(0,ys.createSlotFill)("InspectorControlsTypography"),Sa=(0,ys.createSlotFill)("InspectorControlsListView"),wa=(0,ys.createSlotFill)("InspectorControlsStyles"),Ca={default:ha,advanced:ga,background:fa,bindings:ma,border:ba,color:ka,dimensions:_a,effects:(0,ys.createSlotFill)("InspectorControlsEffects"),filter:va,list:Sa,position:xa,settings:ha,styles:wa,typography:ya};function Ba({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(B()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=w(),i=Ca[t]?.Fill;return i&&r[f]?(0,ce.jsx)(ys.__experimentalStyleProvider,{document,children:(0,ce.jsx)(i,{children:t=>(0,ce.jsx)(ja,{fillProps:t,children:e,resetAllFilter:o})})}):null}function Ia({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,p.useContext)(ys.__experimentalToolsPanelContext);return(0,p.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ja({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,ce.jsx)(Ia,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,ce.jsx)(t,{...n,children:e})),r)}function Ea({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,h.useDispatch)(Bi),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,h.useSelect)(Bi),a=Xi(),c=s(),u=(0,p.useCallback)(((e=[])=>{const t={},n=l()?i():[c];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:gs(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,c,o]);return(0,ce.jsx)(ys.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:a,children:e},c)}function Ta({Slot:e,fillProps:t,...n}){const o=(0,p.useContext)(ys.__experimentalToolsPanelContext),r=(0,p.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[ys.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,ce.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Ma({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(B()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=Ca[t],s=(0,ys.__experimentalUseSlotFills)(i?.name);if(!i)return null;if(!s?.length)return null;const{Slot:l}=i;return n?(0,ce.jsx)(Ea,{group:t,label:n,children:(0,ce.jsx)(Ta,{...r,fillProps:o,Slot:l})}):(0,ce.jsx)(l,{...r,fillProps:o,bubblesVirtually:!0})}const Pa=Ba;Pa.Slot=Ma;const Ra=e=>(0,ce.jsx)(Ba,{...e,group:"advanced"});Ra.Slot=e=>(0,ce.jsx)(Ma,{...e,group:"advanced"}),Ra.slotName="InspectorAdvancedControls";const Na=Pa,Aa=window.wp.url,La=window.wp.dom,Da=window.wp.blob,Oa=window.wp.keycodes,za=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,ce.jsx)(ae.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),Fa=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),Va=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),Ha=(0,ys.withFilters)("editor.MediaUpload")((()=>null));const Ua=function({fallback:e=null,children:t}){const n=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi);return!!t().mediaUpload}),[]);return n?t:e},Ga=window.wp.isShallowEqual;var $a=n.n(Ga);const Wa=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})}),Ka=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Za=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const qa=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,g.useReducedMotion)(),i=r?p.Fragment:ys.__unstableAnimatePresence,s=r?"div":ys.__unstableMotion.div,l=`link-control-settings-drawer-${(0,g.useInstanceId)(e)}`;return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,E.isRTL)()?Ka:Za,"aria-controls":l,children:(0,E._x)("Advanced","Additional link settings")}),(0,ce.jsx)(i,{children:n&&(0,ce.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,ce.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})};var Ya=n(1609);function Xa(e){return"function"==typeof e}class Qa extends p.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,p.createRef)(),this.inputRef=(0,p.createRef)(),this.updateSuggestions=(0,g.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&this.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Aa.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,E.sprintf)((0,E._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,E.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Oa.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Oa.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Oa.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Oa.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Oa.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Oa.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,E.__)("Link selected.")));break;case Oa.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,ce.jsxs)(ce.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,E.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1}=this.props,{loading:a,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:d,suggestionOptionIdPrefix:p}=this.state,h=`url-input-control-${o}`,g={id:h,label:e,className:hs("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},m={id:h,value:s,required:!0,type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,E.__)("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":d,"aria-activedescendant":null!==u?`${p}-${u}`:void 0,ref:this.inputRef,suffix:this.props.suffix};return i?i(g,m,a):(0,ce.jsxs)(ys.BaseControl,{__nextHasNoMarginBottom:!0,...g,children:[(0,ce.jsx)(ys.__experimentalInputControl,{...m,__next40pxDefaultSize:!0}),a&&(0,ce.jsx)(ys.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return Xa(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,ce.jsx)(ys.Popover,{placement:"bottom",focusOnMount:!1,children:(0,ce.jsx)("div",{...c,className:hs("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:o.map(((e,t)=>(0,Ya.createElement)(ys.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:hs("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}const Ja=(0,g.compose)(g.withSafeTimeout,ys.withSpokenMessages,g.withInstanceId,(0,h.withSelect)(((e,t)=>{if(Xa(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Bi);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Qa),ec=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),tc=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,p.createInterpolateElement)((0,E.sprintf)((0,E.__)("Create: %s"),e),{mark:(0,ce.jsx)("mark",{})}),(0,ce.jsx)(ys.MenuItem,{...n,iconPosition:"left",icon:ec,className:"block-editor-link-control__search-item",onClick:t,children:r})},nc=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),oc=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,ce.jsx)(ae.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),rc=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),ic=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.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"})}),sc=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),lc=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),ac=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),cc=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),uc={post:nc,page:oc,post_tag:rc,category:ic,attachment:sc};function dc({isURL:e,suggestion:t}){let n=null;return e?n=lc:t.type in uc&&(n=uc[t.type],"page"===t.type&&(t.isFrontPage&&(n=ac),t.isBlogHome&&(n=cc))),n?(0,ce.jsx)(Pl,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function pc(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function hc(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}const gc=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,E.__)("Press ENTER to add this link"):(l=t.url)?(0,g.pipe)(Aa.safeDecodeURI,Aa.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Aa.filterURLForDisplay,24),hc,pc)(l):l;var l;return(0,ce.jsx)(ys.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,ce.jsx)(dc,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&mc(t),className:"block-editor-link-control__search-item",children:(0,ce.jsx)(ys.TextHighlight,{text:(0,La.__unstableStripHTML)(t.title),highlight:n})})};function mc(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const fc=gc,bc=e=>(B()("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,ce.jsx)(gc,{...e})),kc="__CREATE__",vc="link",_c="mailto",xc="internal",yc=[vc,_c,"tel",xc],Sc=[{id:"opensInNewTab",title:(0,E.__)("Open in new tab")}];function wc({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:n,suggestionsListProps:o,buildSuggestionItemProps:r,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:a,createSuggestionButtonText:c,suggestionsQuery:u}){const d=hs("block-editor-link-control__search-results",{"is-loading":l}),p=1===i.length&&yc.includes(i[0].type),h=e&&!p&&!a,g=!u?.type,m=a?(0,E.__)("Suggestions"):(0,E.sprintf)((0,E.__)('Search results for "%s"'),t);return(0,ce.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,ce.jsx)("div",{...o,className:d,"aria-label":m,children:(0,ce.jsx)(ys.MenuGroup,{children:i.map(((e,o)=>h&&kc===e.type?(0,ce.jsx)(tc,{searchTerm:t,buttonText:c,onClick:()=>n(e),itemProps:r(e,o),isSelected:o===s},e.type):kc===e.type?null:(0,ce.jsx)(fc,{itemProps:r(e,o),suggestion:e,index:o,onClick:()=>{n(e)},isSelected:o===s,isURL:yc.includes(e.type),searchTerm:t,shouldShowType:g,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})})}const Cc=wc,Bc=e=>(B()("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,ce.jsx)(wc,{...e}));function Ic(e){if(e.includes(" "))return!1;const t=(0,Aa.getProtocol)(e),n=(0,Aa.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,Aa.isValidFragment)(e);return n||r||i||o}const jc=()=>Promise.resolve([]),Ec=e=>{let t=vc;const n=(0,Aa.getProtocol)(e)||"";return n.includes("mailto")&&(t=_c),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=xc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Aa.prependHTTP)(e):e,type:t}])};function Tc(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?Ec:jc;return(0,p.useCallback)(((t,{isInitialSuggestions:l})=>Ic(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||Ic(e)||!o?l:l.concat({title:e,url:e,type:kc})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const Mc=()=>Promise.resolve([]),Pc=()=>{},Rc=(0,p.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Pc,onChange:l=Pc,onSelect:a=Pc,showSuggestions:c=!0,renderSuggestions:u=e=>(0,ce.jsx)(Cc,{...e}),fetchSuggestions:d=null,allowDirectEntry:h=!0,showInitialSuggestions:g=!1,suggestionsQuery:m={},withURLSuggestion:f=!0,createSuggestionButtonText:b,hideLabelFromVision:k=!1,suffix:v},_)=>{const x=Tc(m,h,i),y=c?d||x:Mc,[S,w]=(0,p.useState)(),C=async e=>{let t=e;if(kc!==e.type){if(h||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};a({...r,...t},t)}}else try{t=await s(e.title),t?.url&&a(t)}catch(e){}},B=null!=r?r:(0,E.__)("Search or type URL");return(0,ce.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,ce.jsx)(Ja,{disableSuggestions:n?.url===e,label:B,hideLabelFromVision:k,className:o,value:e,onChange:(e,t)=>{l(e),w(t)},placeholder:B,__experimentalRenderSuggestions:c?e=>u({...e,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:m,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),C(t)}}):null,__experimentalFetchLinkSuggestions:y,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:g,onSubmit:(t,n)=>{const o=t||S;o||e?.trim()?.length?C(o||{url:e}):n.preventDefault()},ref:_,suffix:v}),t]})})),Nc=Rc,Ac=e=>(B()("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,ce.jsx)(Rc,{...e})),Lc=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),Dc=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Oc=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),zc=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),{Slot:Fc,Fill:Vc}=(0,ys.createSlotFill)("BlockEditorLinkControlViewer");function Hc(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}`)}}const Uc=function(e){const[t,n]=(0,p.useReducer)(Hc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,p.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Gc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,h.useSelect)((e=>e(pe.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=Uc(s),c=l&&Object.keys(l).length,u=e&&(0,Aa.filterURLForDisplay)((0,Aa.safeDecodeURI)(e.url),24)||"",d=!e?.url?.length,p=!d&&(0,La.__unstableStripHTML)(l?.title||e?.title||u),m=!e?.url||p.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===u;let f;f=l?.icon?(0,ce.jsx)("img",{src:l?.icon,alt:""}):d?(0,ce.jsx)(Pl,{icon:Lc,size:32}):(0,ce.jsx)(Pl,{icon:lc});const{createNotice:b}=(0,h.useDispatch)(ur.store),k=(0,g.useCopyToClipboard)(e.url,(()=>{b("info",(0,E.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,ce.jsx)("div",{role:"group","aria-label":(0,E.__)("Manage link"),className:hs("block-editor-link-control__search-item",{"is-current":!0,"is-rich":c,"is-fetching":!!a,"is-preview":!0,"is-error":d,"is-url-title":p===u}),children:(0,ce.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,ce.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":(0,E.__)("Link information"),children:[(0,ce.jsx)("span",{className:hs("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:f}),(0,ce.jsx)("span",{className:"block-editor-link-control__search-item-details",children:d?(0,ce.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,E.__)("Link is empty")}):(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,ce.jsx)(ys.__experimentalTruncate,{numberOfLines:1,children:p})}),!m&&(0,ce.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,ce.jsx)(ys.__experimentalTruncate,{numberOfLines:1,children:u})})]})})]}),(0,ce.jsx)(ys.Button,{icon:Dc,label:(0,E.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),o&&(0,ce.jsx)(ys.Button,{icon:Oc,label:(0,E.__)("Remove link"),onClick:r,size:"compact",showTooltip:!i}),(0,ce.jsx)(ys.Button,{icon:zc,label:(0,E.__)("Copy link"),ref:k,accessibleWhenDisabled:!0,disabled:d,size:"compact",showTooltip:!i}),(0,ce.jsx)(Fc,{fillProps:e})]})})}const $c=()=>{},Wc=({value:e,onChange:t=$c,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,ce.jsx)(ys.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help},t.id)));return(0,ce.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,ce.jsx)(ys.VisuallyHidden,{as:"legend",children:(0,E.__)("Currently selected link settings")}),r]})};const Kc=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var Zc=n(5215),qc=n.n(Zc);const Yc=()=>{},Xc="core/block-editor",Qc="linkControlSettingsDrawer";function Jc({searchInputPlaceholder:e,value:t,settings:n=Sc,onChange:o=Yc,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:a,forceIsEditingLink:c,createSuggestion:u,withCreateSuggestion:d,inputValue:g="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:_=null}){void 0===d&&u&&(d=!0);const[x,y]=(0,p.useState)(!1),{advancedSettingsPreference:S}=(0,h.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(pe.store).get(Xc,Qc))&&void 0!==t&&t}}),[]),{set:w}=(0,h.useDispatch)(pe.store),C=S||x,B=(0,p.useRef)(!0),I=(0,p.useRef)(),j=(0,p.useRef)(),T=(0,p.useRef)(!1),M=n.map((({id:e})=>e)),[P,R,N,A,L]=function(e){const[t,n]=(0,p.useState)(e||{}),[o,r]=(0,p.useState)(e);return qc()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),D=t&&!(0,Ga.isShallowEqualObjects)(P,t),[O,z]=(0,p.useState)(void 0!==c?c:!t||!t.url),{createPage:F,isCreatingPage:V,errorMessage:H}=function(e){const t=(0,p.useRef)(),[n,o]=(0,p.useState)(!1),[r,i]=(0,p.useState)(null);return(0,p.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=Kc(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,E.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(u);(0,p.useEffect)((()=>{void 0!==c&&z(c)}),[c]),(0,p.useEffect)((()=>{if(B.current)return;(La.focus.focusable.find(I.current)[0]||I.current).focus(),T.current=!1}),[O,V]),(0,p.useEffect)((()=>(B.current=!1,()=>{B.current=!0})),[]);const U=t?.url?.trim()?.length>0,G=()=>{T.current=!!I.current?.contains(I.current.ownerDocument.activeElement),z(!1)},$=()=>{D&&o({...t,...P,url:W}),G()},W=g||P?.url||"",K=!W?.trim()?.length,Z=r&&t&&!O&&!V,q=O&&U,Y=U&&v,X=(O||!t)&&!V,Q=!D||K,J=!!n?.length&&O&&U;return(0,ce.jsxs)("div",{tabIndex:-1,ref:I,className:"block-editor-link-control",children:[V&&(0,ce.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,ce.jsx)(ys.Spinner,{})," ",(0,E.__)("Creating"),"…"]}),X&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)("div",{className:hs({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Y,"has-actions":q}),children:[Y&&(0,ce.jsx)(ys.TextControl,{__nextHasNoMarginBottom:!0,ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,E.__)("Text"),value:P?.title,onChange:A,onKeyDown:e=>{const{keyCode:t}=e;t!==Oa.ENTER||K||(e.preventDefault(),$())},__next40pxDefaultSize:!0}),(0,ce.jsx)(Nc,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:W,withCreateSuggestion:d,onCreateSuggestion:F,onChange:N,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(M.includes(n)||(t[n]=e[n]),t)),{});o({...P,...t,title:P?.title||e?.title}),G()},showInitialSuggestions:a,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:b,hideLabelFromVision:!Y,suffix:q?void 0:(0,ce.jsx)(ys.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,ce.jsx)(ys.Button,{onClick:Q?Yc:$,label:(0,E.__)("Submit"),icon:Wa,className:"block-editor-link-control__search-submit","aria-disabled":Q,size:"small"})})})]}),H&&(0,ce.jsx)(ys.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:H})]}),t&&!O&&!V&&(0,ce.jsx)(Gc,{value:t,onEditClick:()=>z(!0),hasRichPreviews:k,hasUnlinkControl:Z,onRemove:()=>{r(),z(!0)}},t?.url),J&&(0,ce.jsx)("div",{className:"block-editor-link-control__tools",children:!K&&(0,ce.jsx)(qa,{settingsOpen:C,setSettingsOpen:e=>{w&&w(Xc,Qc,e),y(e)},children:(0,ce.jsx)(Wc,{value:P,settings:n,onChange:L(M)})})}),q&&(0,ce.jsxs)(ys.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),R(t),U?G():r?.(),i?.()},children:(0,E.__)("Cancel")}),(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Q?Yc:$,className:"block-editor-link-control__search-submit","aria-disabled":Q,children:(0,E.__)("Save")})]}),!V&&_&&_()]})}Jc.ViewerFill=Vc,Jc.DEFAULT_LINK_SETTINGS=Sc;const eu=e=>(B()("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,ce.jsx)(Jc,{...e})),tu=Jc,nu=()=>{};let ou=0;const ru=(0,g.compose)([(0,h.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(ur.store);return{createNotice:t,removeNotice:n}})),(0,ys.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:a,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:d=nu,name:p=(0,E.__)("Replace"),createNotice:g,removeNotice:m,children:f,multiple:b=!1,addToGallery:k,handleUpload:v=!0,popoverProps:_,renderToggle:x})=>{const{getSettings:y}=(0,h.useSelect)(Bi),S="block-editor/media-replace-flow/error-notice/"+ ++ou,w=e=>{const t=(0,La.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{g("error",t,{speak:!0,id:S,isDismissible:!0})}),1e3)},C=(e,t)=>{u&&c&&c(),t(),s(e),(0,Ho.speak)((0,E.__)("The media file has been replaced")),m(S)},B=e=>{e.keyCode===Oa.DOWN&&(e.preventDefault(),e.target.click())},I=b&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,ce.jsx)(ys.Dropdown,{popoverProps:_,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>x?x({"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:B,children:p}):(0,ce.jsx)(ys.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:B,children:p}),renderContent:({onClose:i})=>(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)(ys.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,ce.jsxs)(Ua,{children:[(0,ce.jsx)(Ha,{gallery:I,addToGallery:k,multiple:b,value:b?n:t,onSelect:e=>C(e,i),allowedTypes:o,render:({open:e})=>(0,ce.jsx)(ys.MenuItem,{icon:za,onClick:e,children:(0,E.__)("Open Media Library")})}),(0,ce.jsx)(ys.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!v)return t(),s(n);d(n),y().mediaUpload({allowedTypes:o,filesList:n,onFileChange:([e])=>{C(e,t)},onError:w})})(e,i)},accept:r,multiple:!!b,render:({openFileDialog:e})=>(0,ce.jsx)(ys.MenuItem,{icon:Fa,onClick:()=>{e()},children:(0,E._x)("Upload","verb")})})]}),c&&(0,ce.jsx)(ys.MenuItem,{icon:Va,onClick:c,isPressed:u,children:(0,E.__)("Use featured image")}),e&&a&&(0,ce.jsx)(ys.MenuItem,{onClick:()=>{a(),i()},children:(0,E.__)("Reset")}),"function"==typeof f?f({onClose:i}):f]}),l&&(0,ce.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,ce.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,E.__)("Current media URL:")}),(0,ce.jsx)(tu,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e)}})]})]})})})),iu="image",su={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},lu=()=>{};const au=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},cu=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function uu({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,className:i,onToggleCallback:s=lu}){return(0,p.useEffect)((()=>{void 0!==n?.isOpen&&s(n?.isOpen)}),[n?.isOpen,s]),(0,ce.jsx)(ys.__experimentalItemGroup,{as:e,className:i,...n,children:(0,ce.jsxs)(ys.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,ce.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,ce.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,ce.jsxs)(ys.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,ce.jsx)(ys.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,ce.jsx)(ys.VisuallyHidden,{as:"span",children:t?(0,E.sprintf)((0,E.__)("Background image: %s"),o||r):(0,E.__)("No background image selected")})]})]})})}function du({label:e,filename:t,url:n,children:o,onToggle:r=lu,hasImageValue:i}){if(!i)return;const s=e||(0,Aa.getFilename)(n)||(0,E.__)("Add background image");return(0,ce.jsx)(ys.Dropdown,{popoverProps:su,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,E.__)("Background size, position and repeat options."),isOpen:o};return(0,ce.jsx)(uu,{imgUrl:n,filename:t,label:s,toggleProps:i,as:"button",onToggleCallback:r})},renderContent:()=>(0,ce.jsx)(ys.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function pu(){return(0,ce.jsx)(ys.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,ce.jsx)(ys.Spinner,{})})}function hu({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=lu,onResetImage:r=lu,displayInPanel:i,defaultValues:s}){const[l,a]=(0,p.useState)(!1),{getSettings:c}=(0,h.useSelect)(Bi),{id:u,title:d,url:g}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},m=(0,p.useRef)(),{createErrorNotice:f}=(0,h.useDispatch)(ur.store),b=e=>{f(e,{type:"snackbar"}),a(!1)},k=n=>{if(!n||!n.url)return e(we(t,["background","backgroundImage"],void 0)),void a(!1);if((0,Da.isBlobURL)(n.url))return void a(!0);if(n.media_type&&n.media_type!==iu||!n.media_type&&n.type&&n.type!==iu)return void b((0,E.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(we(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),a(!1)},v=ku(t),_=()=>{const[e]=La.focus.tabbable.find(m.current);e?.focus(),e?.click()},x=!v&&ku(n),y=d||(0,Aa.getFilename)(g)||(0,E.__)("Add background image");return(0,ce.jsxs)("div",{ref:m,className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[l&&(0,ce.jsx)(pu,{}),(0,ce.jsx)(ru,{mediaId:u,mediaURL:g,allowedTypes:[iu],accept:"image/*",onSelect:k,popoverProps:{className:hs({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,ce.jsx)(uu,{className:"block-editor-global-styles-background-panel__image-preview",imgUrl:g,filename:d,label:y}),renderToggle:e=>(0,ce.jsx)(ys.Button,{...e,__next40pxDefaultSize:!0}),onError:b,onReset:()=>{_(),r()},children:x&&(0,ce.jsx)(ys.MenuItem,{onClick:()=>{_(),e(we(t,["background"],{backgroundImage:"none"})),o()},children:(0,E.__)("Remove")})}),(0,ce.jsx)(ys.DropZone,{onFilesDrop:e=>{c().mediaUpload({allowedTypes:[iu],filesList:e,onFileChange([e]){k(e)},onError:b,multiple:!1})},label:(0,E.__)("Drop to upload")})]})}function gu({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const d=!("no-repeat"===i||"cover"===u&&void 0===i),p=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(we(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},h=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,ce.jsxs)(ys.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,ce.jsx)(ys.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Focal point"),url:s,value:cu(h),onChange:n=>{e(we(t,["background","backgroundPosition"],au(n)))}}),(0,ce.jsx)(ys.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(we(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,ce.jsxs)(ys.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,E.__)("Size"),value:u,onChange:p,isBlock:!0,help:(g=r||o?.backgroundSize,"cover"===g||void 0===g?(0,E.__)("Image covers the space evenly."):"contain"===g?(0,E.__)("Image is contained without distortion."):(0,E.__)("Image has a fixed width.")),children:[(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"cover",label:(0,E._x)("Cover","Size option for background image control")},"cover"),(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"contain",label:(0,E._x)("Contain","Size option for background image control")},"contain"),(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"auto",label:(0,E._x)("Tile","Size option for background image control")},"tile")]}),(0,ce.jsxs)(ys.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,ce.jsx)(ys.__experimentalUnitControl,{"aria-label":(0,E.__)("Background image width"),onChange:p,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,E.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,ce.jsx)(ys.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Repeat"),checked:d,onChange:()=>e(we(t,["background","backgroundRepeat"],!0===d?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var g}function mu({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi),n=t();return{globalStyles:n[N],_links:n[A]}}),[]),l=(0,p.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=ns(n,{styles:i,_links:s})})),e):n}),[i,s,n]),a=()=>t(we(e,["background"],{})),{title:c,url:u}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},d=ku(e)||ku(l),g=d&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[m,f]=(0,p.useState)(!1);return(0,ce.jsx)("div",{className:hs("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":m}),children:g?(0,ce.jsx)(du,{label:c,filename:c,url:u,onToggle:f,hasImageValue:d,children:(0,ce.jsxs)(ys.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,ce.jsx)(hu,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{f(!1),a()},onRemoveImage:()=>f(!1),defaultValues:r}),(0,ce.jsx)(gu,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,ce.jsx)(hu,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{f(!1),a()},onRemoveImage:()=>f(!1)})})}const fu={backgroundImage:!0};function bu(e){return"web"===p.Platform.OS&&e?.background?.backgroundImage}function ku(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function vu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function _u({as:e=vu,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=fu,defaultValues:l={},headerLabel:a=(0,E.__)("Background image")}){const c=bu(r),u=(0,p.useCallback)((e=>({...e,background:{}})),[]);return(0,ce.jsx)(e,{resetAllFilter:u,value:t,onChange:n,panelId:i,headerLabel:a,children:c&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,E.__)("Image"),onDeselect:()=>n(we(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,ce.jsx)(mu,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const xu="background",yu={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Su(e,t="any"){const n=(0,d.getBlockSupport)(e,xu);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function wu(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:yu.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:yu.backgroundPosition}),t}function Cu(e){return ku(e)?"has-background":""}function Bu({children:e}){const t=(0,p.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,ce.jsx)(Na,{group:"background",resetAllFilter:t,children:e})}function Iu({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,h.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(Bi),i=r();return{style:o(e)?.style,inheritedValue:i[N]?.blocks?.[t]}}),[e,t]);if(!bu(o)||!Su(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Su(t,"backgroundSize")}},l=(0,d.getBlockSupport)(t,[xu,"defaultControls"]);return(0,ce.jsx)(_u,{inheritedValue:i,as:Bu,panelId:e,defaultValues:yu,settings:s,onChange:e=>{n({style:gs(e)})},defaultControls:l,value:r})}const ju={useBlockProps:function({name:e,style:t}){if(!Su(e)||!t?.background?.backgroundImage)return;const n=wu(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Su};(0,m.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Eu=/[\s#]/g,Tu={type:"string",source:"attribute",attribute:"id",selector:"*"};const Mu={addSaveProps:function(e,t,n){(0,d.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==aa())return null;const n="web"===p.Platform.OS;return(0,ce.jsx)(Na,{group:"advanced",children:(0,ce.jsx)(ys.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,E.__)("HTML anchor"),help:(0,ce.jsxs)(ce.Fragment,{children:[(0,E.__)("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,ce.jsxs)(ce.Fragment,{children:[" ",(0,ce.jsx)(ys.ExternalLink,{href:(0,E.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,E.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,E.__)("Add an anchor"),onChange:e=>{e=e.replace(Eu,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,d.hasBlockSupport)(e,"anchor")};(0,m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,d.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Tu}),e}));const Pu={addSaveProps:function(e,t,n){return(0,d.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,d.hasBlockSupport)(e,"ariaLabel")};(0,m.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,d.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}));const Ru={edit:function({className:e,setAttributes:t}){return"default"!==aa()?null:(0,ce.jsx)(Na,{group:"advanced",children:(0,ce.jsx)(ys.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,E.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,E.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,d.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=hs(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,d.hasBlockSupport)(e,"customClassName",!0)};(0,m.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,d.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,d.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o&&void 0===e.attributes.className)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,d.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,d.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,d.getBlockDefaultClassName)(t.name)),e}));var Nu={grad:.9,turn:360,rad:360/(2*Math.PI)},Au=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Lu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Du=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Ou=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},zu=function(e){return{r:Du(e.r,0,255),g:Du(e.g,0,255),b:Du(e.b,0,255),a:Du(e.a)}},Fu=function(e){return{r:Lu(e.r),g:Lu(e.g),b:Lu(e.b),a:Lu(e.a,3)}},Vu=/^#([0-9a-f]{3,8})$/i,Hu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uu=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},Gu=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},$u=function(e){return{h:Ou(e.h),s:Du(e.s,0,100),l:Du(e.l,0,100),a:Du(e.a)}},Wu=function(e){return{h:Lu(e.h),s:Lu(e.s),l:Lu(e.l),a:Lu(e.a,3)}},Ku=function(e){return Gu((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},Zu=function(e){return{h:(t=Uu(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},qu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ju={string:[[function(e){var t=Vu.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?Lu(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?Lu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Xu.exec(e)||Qu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:zu({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=qu.exec(e)||Yu.exec(e);if(!t)return null;var n,o,r=$u({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Nu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ku(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return Au(t)&&Au(n)&&Au(o)?zu({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!Au(t)||!Au(n)||!Au(o))return null;var s=$u({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return Ku(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!Au(t)||!Au(n)||!Au(o))return null;var s=function(e){return{h:Ou(e.h),s:Du(e.s,0,100),v:Du(e.v,0,100),a:Du(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return Gu(s)},"hsv"]]},ed=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Fu(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?Hu(Lu(255*r)):"","#"+Hu(t)+Hu(n)+Hu(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return Fu(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Fu(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 Wu(Zu(this.rgba))},e.prototype.toHslString=function(){return t=(e=Wu(Zu(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=Uu(this.rgba),{h:Lu(e.h),s:Lu(e.s),v:Lu(e.v),a:Lu(e.a,3)};var e},e.prototype.invert=function(){return sd({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),sd(nd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),sd(nd(this.rgba,-e))},e.prototype.grayscale=function(){return sd(nd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),sd(rd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),sd(rd(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?sd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Lu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Zu(this.rgba);return"number"==typeof e?sd({h:e,s:t.s,l:t.l,a:t.a}):Lu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===sd(e).toHex()},e}(),sd=function(e){return e instanceof id?e:new id(e)},ld=[],ad=function(e){e.forEach((function(e){ld.indexOf(e)<0&&(e(id,Ju),ld.push(e))}))};function cd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h(a=dd(s))?(l+.05)/(a+.05):(a+.05)/(l+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}ad([cd,pd]);const{kebabCase:hd}=V(ys.privateApis),gd=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},md=(e,t)=>e?.find((e=>e.color===t));function fd(e,t){if(e&&t)return`has-${hd(t)}-${e}`}function bd(){const[e,t,n,o,r,i,s,l,a,c]=ji("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),u={disableCustomColors:!e,disableCustomGradients:!i};return u.colors=(0,p.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:n}),r&&o&&o.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:o}),t&&t.length&&e.push({name:(0,E._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),e}),[t,n,o,r]),u.gradients=(0,p.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,E._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:l}),c&&a&&a.length&&e.push({name:(0,E._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:a}),s&&s.length&&e.push({name:(0,E._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),e}),[s,l,a,c]),u.hasColorsOrGradients=!!u.colors.length||!!u.gradients.length,u}function kd(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function vd(e={}){const{flat:t,...n}=e;return t||kd(Object.values(n).filter(Boolean))||"px"}function _d(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,ys.__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]:"",i=kd(o);return 0===r||r?`${r}${i}`:void 0}function xd(e={}){const t=_d(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function yd(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function Sd({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let i=_d(o);void 0===i&&(i=vd(t));const s=yd(o)&&xd(o),l=s?(0,E.__)("Mixed"):null;return(0,ce.jsx)(ys.__experimentalUnitControl,{...r,"aria-label":(0,E.__)("Border radius"),disableUnits:s,isOnly:!0,value:i,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:l,size:"__unstable-large"})}const wd={topLeft:(0,E.__)("Top left"),topRight:(0,E.__)("Top right"),bottomLeft:(0,E.__)("Bottom left"),bottomRight:(0,E.__)("Bottom right")};function Cd({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const i=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...s,[t]:o})},s="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,ce.jsx)("div",{className:"components-border-radius-control__input-controls-wrapper",children:Object.entries(wd).map((([e,o])=>{const[l,a]=(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(s[e]),c=s[e]?a:t[e]||t.flat;return(0,ce.jsx)(ys.Tooltip,{text:o,placement:"top",children:(0,ce.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,ce.jsx)(ys.__experimentalUnitControl,{...r,"aria-label":o,value:[l,c].join(""),onChange:i(e),onUnitChange:(u=e,e=>{const o={...t};o[u]=e,n(o)}),size:"__unstable-large"})})},e);var u}))})}const Bd=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});function Id({isLinked:e,...t}){const n=e?(0,E.__)("Unlink radii"):(0,E.__)("Link radii");return(0,ce.jsx)(ys.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?Bd:Oc,iconSize:24,label:n})}const jd={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},Ed=0,Td={px:100,em:20,rem:20};function Md({onChange:e,values:t}){const[n,o]=(0,p.useState)(!yd(t)||!xd(t)),[r,i]=(0,p.useState)({flat:"string"==typeof t?(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[s]=ji("spacing.units"),l=(0,ys.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem"]}),a=vd(r),c=l&&l.find((e=>e.value===a)),u=c?.step||1,[d]=(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(_d(t));return(0,ce.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:(0,E.__)("Radius")}),(0,ce.jsxs)("div",{className:"components-border-radius-control__wrapper",children:[n?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(Sd,{className:"components-border-radius-control__unit-control",values:t,min:Ed,onChange:e,selectedUnits:r,setSelectedUnits:i,units:l}),(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:Ed,max:Td[a],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${a}`:void 0)},step:u,__nextHasNoMarginBottom:!0})]}):(0,ce.jsx)(Cd,{min:Ed,onChange:e,selectedUnits:r,setSelectedUnits:i,values:t||jd,units:l}),(0,ce.jsx)(Id,{onClick:()=>o(!n),isLinked:n})]})]})}const Pd=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Rd=(0,ce.jsx)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ce.jsx)(ae.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})}),Nd=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M7 11.5h10V13H7z"})}),Ad=[];function Ld({shadow:e,onShadowChange:t,settings:n}){const o=Vd(n);return(0,ce.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,ce.jsxs)(ys.__experimentalVStack,{spacing:4,children:[(0,ce.jsx)(ys.__experimentalHeading,{level:5,children:(0,E.__)("Drop shadow")}),(0,ce.jsx)(Dd,{presets:o,activeShadow:e,onSelect:t}),(0,ce.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,E.__)("Clear")})})]})})}function Dd({presets:e,activeShadow:t,onSelect:n}){return e?(0,ce.jsx)(ys.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,E.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,ce.jsx)(Od,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function Od({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,ce.jsx)(ys.Tooltip,{text:t,children:(0,ce.jsx)(ys.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:hs("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,ce.jsx)("button",{className:hs("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,ce.jsx)(Pl,{icon:Pd})})})})}function zd({shadow:e,onShadowChange:t,settings:n}){return(0,ce.jsx)(ys.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:Fd(e,t),renderContent:()=>(0,ce.jsx)(ys.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,ce.jsx)(Ld,{shadow:e,onShadowChange:t,settings:n})})})}function Fd(e,t){return({onToggle:n,isOpen:o})=>{const r=(0,p.useRef)(void 0),i={onClick:n,className:hs({"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(void 0),r.current?.focus()},className:hs("block-editor-global-styles__shadow-editor__remove-button",{"is-open":o}),label:(0,E.__)("Remove")};return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,...i,children:(0,ce.jsxs)(ys.__experimentalHStack,{justify:"flex-start",children:[(0,ce.jsx)(Pl,{className:"block-editor-global-styles__toggle-icon",icon:Rd,size:24}),(0,ce.jsx)(ys.FlexItem,{children:(0,E.__)("Drop shadow")})]})}),!!e&&(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,size:"small",icon:Nd,...s})]})}}function Vd(e){return(0,p.useMemo)((()=>{var t;if(!e?.shadow)return Ad;const n=e?.shadow?.defaultPresets,{default:o,theme:r,custom:i}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},s={name:(0,E.__)("Unset"),slug:"unset",shadow:"none"},l=[...n&&o||Ad,...r||Ad,...i||Ad];return l.length&&l.unshift(s),l}),[e])}function Hd(e){return Object.values(Ud(e)).some(Boolean)}function Ud(e){return{hasBorderColor:Gd(e),hasBorderRadius:$d(e),hasBorderStyle:Wd(e),hasBorderWidth:Kd(e),hasShadow:Zd(e)}}function Gd(e){return e?.border?.color}function $d(e){return e?.border?.radius}function Wd(e){return e?.border?.style}function Kd(e){return e?.border?.width}function Zd(e){const t=Vd(e);return!!e?.shadow&&t.length>0}function qd({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const Yd={radius:!0,color:!0,width:!0,shadow:!0};function Xd({as:e=qd,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=Yd}){var a,c,u,d;const h=us(r),g=(0,p.useCallback)((e=>Ji({settings:r},"",e)),[r]),m=e=>{const t=h.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},f=(0,p.useMemo)((()=>{if((0,ys.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:g(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?g(o?.border?.color):void 0}}),[o?.border,g]),b=e=>n({...t,border:e}),k=Gd(r),v=Wd(r),_=Kd(r),x=$d(r),y=g(f?.radius),S=e=>b({...f,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},C=Zd(r),B=g(o?.shadow),I=null!==(a=r?.shadow?.presets)&&void 0!==a?a:{},j=null!==(c=null!==(u=null!==(d=I.custom)&&void 0!==d?d:I.theme)&&void 0!==u?u:I.default)&&void 0!==c?c:[],T=e=>{const o=j?.find((({shadow:t})=>t===e))?.slug;n(we(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},M=(0,p.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),P=l?.color||l?.width,R=k||v||_||x,N=ap({blockName:s,hasShadowControl:C,hasBorderControl:R});return(0,ce.jsxs)(e,{resetAllFilter:M,value:t,onChange:n,panelId:i,label:N,children:[(_||k)&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{hasValue:()=>(0,ys.__experimentalIsDefinedBorder)(t?.border),label:(0,E.__)("Border"),onDeselect:()=>(()=>{if(w())return b({radius:t?.border?.radius});b(void 0)})(),isShownByDefault:P,panelId:i,children:(0,ce.jsx)(ys.BorderBoxControl,{colors:h,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,ys.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:m(t[e]?.color)})})):t&&(t.color=m(t.color)),b({radius:f?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!C,label:(0,E.__)("Border")})}),x&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{hasValue:w,label:(0,E.__)("Radius"),onDeselect:()=>S(void 0),isShownByDefault:l.radius,panelId:i,children:(0,ce.jsx)(Md,{values:y,onChange:e=>{S(e||void 0)}})}),C&&(0,ce.jsxs)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>T(void 0),isShownByDefault:l.shadow,panelId:i,children:[R?(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:(0,E.__)("Shadow")}):null,(0,ce.jsx)(ys.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,ce.jsx)(zd,{shadow:B,onShadowChange:T,settings:r})})]})]})}const Qd="__experimentalBorder",Jd="shadow",ep=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},tp=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=ep(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=ep(e,"color",n);return o||{color:n}};function np(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function op(e){if((0,ys.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:gs(o),borderColor:n}}function rp(e){return(0,ys.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function ip({label:e,children:t,resetAllFilter:n}){const o=(0,p.useCallback)((e=>{const t=rp(e),o=n(t);return{...e,...op(o)}}),[n]);return(0,ce.jsx)(Na,{group:"border",resetAllFilter:o,label:e,children:t})}function sp({clientId:e,name:t,setAttributes:n,settings:o}){const r=Hd(o);const{style:i,borderColor:s}=(0,h.useSelect)((function(t){const{style:n,borderColor:o}=t(Bi).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),l=(0,p.useMemo)((()=>rp({style:i,borderColor:s})),[i,s]);if(!r)return null;const a={...(0,d.getBlockSupport)(t,[Qd,"__experimentalDefaultControls"]),...(0,d.getBlockSupport)(t,[Jd,"__experimentalDefaultControls"])};return(0,ce.jsx)(Xd,{as:ip,panelId:e,settings:o,value:l,onChange:e=>{n(op(e))},defaultControls:a})}function lp(e,t="any"){if("web"!==p.Platform.OS)return!1;const n=(0,d.getBlockSupport)(e,Qd);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function ap({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=Ud(_s(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,E.__)("Border & Shadow"):n?(0,E.__)("Shadow"):(0,E.__)("Border")}function cp(e,t,n){if(!lp(t,"color")||fs(t,Qd,"color"))return e;const o=up(n),r=hs(e.className,o);return e.className=r||void 0,e}function up(e){const{borderColor:t,style:n}=e,o=fd("border-color",t);return hs({"has-border-color":t||n?.border?.color,[o]:!!o})}const dp={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=bd();if(!lp(e,"color")||fs(e,Qd,"color"))return{};const{color:r}=tp({colors:o,namedColor:t}),{color:i}=tp({colors:o,namedColor:np(n?.border?.top?.color)}),{color:s}=tp({colors:o,namedColor:np(n?.border?.right?.color)}),{color:l}=tp({colors:o,namedColor:np(n?.border?.bottom?.color)}),{color:a}=tp({colors:o,namedColor:np(n?.border?.left?.color)});return cp({style:gs({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:cp,attributeKeys:["borderColor","style"],hasSupport:e=>lp(e,"color")};function pp(e){if(e)return`has-${e}-gradient-background`}function hp(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function gp(e,t){const n=e?.find((e=>e.gradient===t));return n}function mp(e,t){const n=gp(e,t);return n&&n.slug}function fp({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=w(),[o,r,i]=ji("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,p.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:a}=(0,h.useSelect)((o=>{const{getBlockAttributes:r}=o(Bi),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,h.useDispatch)(Bi),u=(0,p.useCallback)((o=>{const r=mp(s,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,c]),d=pp(l);let g;return g=l?hp(s,l):a,{gradientClass:d,gradientValue:g,setGradient:u}}(0,m.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return lp(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:bp}=V(ys.privateApis),kp=["colors","disableCustomColors","gradients","disableCustomGradients"],vp="color",_p="gradient";function xp({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:d,showTitle:p=!0,enableAlpha:h,headingLevel:g}){const m=l&&(e&&e.length>0||!n),f=a&&(t&&t.length>0||!o);if(!m&&!f)return null;const b={[vp]:(0,ce.jsx)(ys.ColorPalette,{value:c,onChange:f?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:d,enableAlpha:h,headingLevel:g}),[_p]:(0,ce.jsx)(ys.GradientPicker,{value:u,onChange:m?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:d,headingLevel:g})},k=e=>(0,ce.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:b[e]});return(0,ce.jsx)(ys.BaseControl,{__nextHasNoMarginBottom:!0,className:hs("block-editor-color-gradient-control",i),children:(0,ce.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,ce.jsxs)(ys.__experimentalVStack,{spacing:1,children:[p&&(0,ce.jsx)("legend",{children:(0,ce.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,ce.jsx)(ys.BaseControl.VisualLabel,{children:s})})}),m&&f&&(0,ce.jsx)("div",{children:(0,ce.jsxs)(bp,{defaultTabId:u?_p:!!m&&vp,children:[(0,ce.jsxs)(bp.TabList,{children:[(0,ce.jsx)(bp.Tab,{tabId:vp,children:(0,E.__)("Color")}),(0,ce.jsx)(bp.Tab,{tabId:_p,children:(0,E.__)("Gradient")})]}),(0,ce.jsx)(bp.TabPanel,{tabId:vp,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.color}),(0,ce.jsx)(bp.TabPanel,{tabId:_p,className:"block-editor-color-gradient-control__panel",focusable:!1,children:b.gradient})]})}),!f&&k(vp),!m&&k(_p)]})})})}function yp(e){const[t,n,o,r]=ji("color.palette","color.gradients","color.custom","color.customGradient");return(0,ce.jsx)(xp,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Sp=function(e){return kp.every((t=>e.hasOwnProperty(t)))?(0,ce.jsx)(xp,{...e}):(0,ce.jsx)(yp,{...e})};function wp(e){const t=Cp(e),n=Tp(e),o=Bp(e),r=jp(e),i=Ep(e),s=Ip(e);return t||n||o||r||i||s}function Cp(e){const t=us(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Bp(e){const t=us(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Ip(e){const t=us(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function jp(e){const t=us(e),n=ds(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function Ep(e){const t=us(e),n=ds(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function Tp(e){const t=us(e),n=ds(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function Mp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:(0,E.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,ce.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const Pp={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},Rp={placement:"left-start",offset:36,shift:!0},{Tabs:Np}=V(ys.privateApis),Ap=({indicators:e,label:t})=>(0,ce.jsxs)(ys.__experimentalHStack,{justify:"flex-start",children:[(0,ce.jsx)(ys.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,ce.jsx)(ys.Flex,{expanded:!1,children:(0,ce.jsx)(ys.ColorIndicator,{colorValue:e})},t)))}),(0,ce.jsx)(ys.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Lp({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,ce.jsx)(Sp,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function Dp({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){var a;const c=i.find((e=>void 0!==e.userValue)),{key:u,...d}=null!==(a=i[0])&&void 0!==a?a:{},h=(0,p.useRef)(void 0);return(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,ce.jsx)(ys.Dropdown,{popoverProps:Rp,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:o,isOpen:i})=>{const s={onClick:o,className:hs("block-editor-panel-color-gradient-settings__dropdown",{"is-open":i}),"aria-expanded":i,ref:h};return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.Button,{...s,__next40pxDefaultSize:!0,children:(0,ce.jsx)(Ap,{indicators:r,label:e})}),t()&&(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,label:(0,E.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Nd,onClick:()=>{n(),i&&o(),h.current?.focus()}})]})},renderContent:()=>(0,ce.jsx)(ys.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,ce.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,ce.jsx)(Lp,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,ce.jsxs)(Np,{defaultTabId:c?.key,children:[(0,ce.jsx)(Np.TabList,{children:i.map((e=>(0,ce.jsx)(Np.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,ce.jsx)(Np.TabPanel,{tabId:t,focusable:!1,children:(0,ce.jsx)(Lp,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function Op({as:e=Mp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Pp,children:l}){const a=us(r),c=ds(r),u=r?.color?.custom,d=r?.color?.customGradient,h=a.length>0||u,g=c.length>0||d,m=e=>Ji({settings:r},"",e),f=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},b=e=>{const t=c.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=Tp(r),v=m(o?.color?.background),_=m(t?.color?.background),x=m(o?.color?.gradient),y=m(t?.color?.gradient),S=Bp(r),w=m(o?.elements?.link?.color?.text),C=m(t?.elements?.link?.color?.text),B=m(o?.elements?.link?.[":hover"]?.color?.text),I=m(t?.elements?.link?.[":hover"]?.color?.text),j=Cp(r),T=m(o?.color?.text),M=m(t?.color?.text),P=e=>{let o=we(t,["color","text"],f(e));T===w&&(o=we(o,["elements","link","color","text"],f(e))),n(o)},R=[{name:"caption",label:(0,E.__)("Captions"),showPanel:Ip(r)},{name:"button",label:(0,E.__)("Button"),showPanel:Ep(r)},{name:"heading",label:(0,E.__)("Heading"),showPanel:jp(r)},{name:"h1",label:(0,E.__)("H1"),showPanel:jp(r)},{name:"h2",label:(0,E.__)("H2"),showPanel:jp(r)},{name:"h3",label:(0,E.__)("H3"),showPanel:jp(r)},{name:"h4",label:(0,E.__)("H4"),showPanel:jp(r)},{name:"h5",label:(0,E.__)("H5"),showPanel:jp(r)},{name:"h6",label:(0,E.__)("H6"),showPanel:jp(r)}],N=(0,p.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...R.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),A=[j&&{key:"text",label:(0,E.__)("Text"),hasValue:()=>!!M,resetValue:()=>P(void 0),isShownByDefault:s.text,indicators:[T],tabs:[{key:"text",label:(0,E.__)("Text"),inheritedValue:T,setValue:P,userValue:M}]},k&&{key:"background",label:(0,E.__)("Background"),hasValue:()=>!!_||!!y,resetValue:()=>{const e=we(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[null!=x?x:v],tabs:[h&&{key:"background",label:(0,E.__)("Color"),inheritedValue:v,setValue:e=>{const o=we(t,["color","background"],f(e));o.color.gradient=void 0,n(o)},userValue:_},g&&{key:"gradient",label:(0,E.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=we(t,["color","gradient"],b(e));o.color.background=void 0,n(o)},userValue:y,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,E.__)("Link"),hasValue:()=>!!C||!!I,resetValue:()=>{let e=we(t,["elements","link",":hover","color","text"],void 0);e=we(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[w,B],tabs:[{key:"link",label:(0,E.__)("Default"),inheritedValue:w,setValue:e=>{n(we(t,["elements","link","color","text"],f(e)))},userValue:C},{key:"hover",label:(0,E.__)("Hover"),inheritedValue:B,setValue:e=>{n(we(t,["elements","link",":hover","color","text"],f(e)))},userValue:I}]}].filter(Boolean);return R.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=m(o?.elements?.[e]?.color?.background),a=m(o?.elements?.[e]?.color?.gradient),c=m(o?.elements?.[e]?.color?.text),u=m(t?.elements?.[e]?.color?.background),d=m(t?.elements?.[e]?.color?.gradient),p=m(t?.elements?.[e]?.color?.text),k="caption"!==e;A.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=we(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:k?[c,null!=a?a:l]:[c],tabs:[h&&{key:"text",label:(0,E.__)("Text"),inheritedValue:c,setValue:o=>{n(we(t,["elements",e,"color","text"],f(o)))},userValue:p},h&&k&&{key:"background",label:(0,E.__)("Background"),inheritedValue:l,setValue:o=>{const r=we(t,["elements",e,"color","background"],f(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&k&&{key:"gradient",label:(0,E.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=we(t,["elements",e,"color","gradient"],b(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,ce.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[A.map((e=>{const{key:t,...n}=e;return(0,ce.jsx)(Dp,{...n,colorGradientControlSettings:{colors:a,disableCustomColors:!u,gradients:c,disableCustomGradients:!d},panelId:i},t)})),l]})}ad([cd,pd]);const zp=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,d=l||o;if(!u&&!d)return null;const p=[{color:u,description:(0,E.__)("text color")},{color:d,description:(0,E.__)("link color")}],h=sd(c),g=h.alpha()<1,m=h.brightness(),f={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let b="",k="";for(const e of p){if(!e.color)continue;const t=sd(e.color),n=t.isReadable(h,f),o=t.alpha()<1;if(!n){if(g||o)continue;b=m({refsMap:(0,g.observableMap)()})),[]);return(0,ce.jsx)(Fp.Provider,{value:t,children:e})}function Hp(e){const{refsMap:t}=(0,p.useContext)(Fp);return(0,g.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function Up(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Gp(e,t){const{refsMap:n}=(0,p.useContext)(Fp);(0,p.useLayoutEffect)((()=>{Up(t,n.get(e));const o=n.subscribe(e,(()=>Up(t,n.get(e))));return()=>{o(),Up(t,null)}}),[n,e,t])}function $p(e){const[t,n]=(0,p.useState)(null);return Gp(e,n),t}function Wp(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Kp(e,t){return Object.keys(t).some((n=>e[n]!==t[n]))?t:e}function Zp({clientId:e}){const t=$p(e),[n,o]=(0,p.useReducer)(Kp,{});return(0,p.useLayoutEffect)((()=>{function e(){o(function(e){if(!e)return{};const t=e.querySelector("a"),n=t?.innerText?Wp(t,"color"):void 0,o=Wp(e,"color");let r=e,i=Wp(r,"background-color");for(;"rgba(0, 0, 0, 0)"===i&&r.parentNode&&r.parentNode.nodeType===r.parentNode.ELEMENT_NODE;)r=r.parentNode,i=Wp(r,"background-color");return{textColor:o,backgroundColor:i,linkColor:n}}(t))}t&&window.requestAnimationFrame((()=>window.requestAnimationFrame(e)))})),(0,ce.jsx)(zp,{backgroundColor:n.backgroundColor,textColor:n.textColor,linkColor:n.linkColor,enableAlphaChecker:!0})}const qp="color",Yp=e=>{const t=(0,d.getBlockSupport)(e,qp);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Xp=e=>{if("web"!==p.Platform.OS)return!1;const t=(0,d.getBlockSupport)(e,qp);return null!==t&&"object"==typeof t&&!!t.link},Qp=e=>{const t=(0,d.getBlockSupport)(e,qp);return null!==t&&"object"==typeof t&&!!t.gradients},Jp=e=>{const t=(0,d.getBlockSupport)(e,qp);return t&&!1!==t.background},eh=e=>{const t=(0,d.getBlockSupport)(e,qp);return t&&!1!==t.text};function th(e,t,n){if(!Yp(t)||fs(t,qp))return e;const o=Qp(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!fs(t,qp,e),c=a("text")?fd("color",i):void 0,u=a("gradients")?pp(s):void 0,d=a("background")?fd("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=hs(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function nh(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:gs(l),textColor:n,backgroundColor:r,gradient:s}}function oh(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function rh({children:e,resetAllFilter:t}){const n=(0,p.useCallback)((e=>{const n=oh(e),o=t(n);return{...e,...nh(o)}}),[t]);return(0,ce.jsx)(Na,{group:"color",resetAllFilter:n,children:e})}function ih({clientId:e,name:t,setAttributes:n,settings:o}){const r=wp(o);const{style:i,textColor:s,backgroundColor:l,gradient:a}=(0,h.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(Bi).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),c=(0,p.useMemo)((()=>oh({style:i,textColor:s,backgroundColor:l,gradient:a})),[i,s,l,a]);if(!r)return null;const u=(0,d.getBlockSupport)(t,[qp,"__experimentalDefaultControls"]),g="web"===p.Platform.OS&&!c?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,d.getBlockSupport)(t,[qp,"enableContrastChecker"]);return(0,ce.jsx)(Op,{as:rh,panelId:e,settings:o,value:c,onChange:e=>{n(nh(e))},defaultControls:u,enableContrastChecker:!1!==(0,d.getBlockSupport)(t,[qp,"enableContrastChecker"]),children:g&&(0,ce.jsx)(Zp,{clientId:e})})}const sh={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=ji("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,p.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!Yp(e)||fs(e,qp))return{};const c={};n&&!fs(e,qp,"text")&&(c.color=gd(a,n)?.color),t&&!fs(e,qp,"background")&&(c.backgroundColor=gd(a,t)?.color);const u=th({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),d=t||r?.color?.background||o||r?.color?.gradient;return{...u,className:hs(u.className,!d&&Cu(r))}},addSaveProps:th,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:Yp},lh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function ah({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,className:i,...s}){var l;const[a]=ji("typography.fontFamilies");if(r||(r=a),!r||0===r.length)return null;const c=[{key:"",name:(0,E.__)("Default")},...r.map((({fontFamily:e,name:t})=>({key:e,name:t||e,style:{fontFamily:e}})))];t||B()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),e||void 0!==s.size&&"default"!==s.size||B()("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});const u=null!==(l=c.find((e=>e.key===n)))&&void 0!==l?l:"";return(0,ce.jsx)(ys.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,E.__)("Font"),value:u,onChange:({selectedItem:e})=>o(e.key),options:c,className:hs("block-editor-font-family-control",i,{"is-next-has-no-margin-bottom":t}),...s})}(0,m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Yp(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Qp(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return ms({linkColor:Xp(r),textColor:eh(r),backgroundColor:Jp(r),gradient:Qp(r)},lh,e,t,n,o)}));const ch=(e,t)=>e?t?(0,E.__)("Appearance"):(0,E.__)("Font style"):(0,E.__)("Font weight");function uh(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...a}=e,c=o||r,u=ch(o,r),d={key:"default",name:(0,E.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:h,fontWeights:g,combinedStyleAndWeightOptions:m}=Ui(i),f=(0,p.useMemo)((()=>o&&r?(()=>{const e=[d];return m&&e.push(...m),e})():o?(()=>{const e=[d];return h.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[d];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,h,g,m]),b=f.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||f[0];return t||void 0!==a.size&&"default"!==a.size||B()("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),c&&(0,ce.jsx)(ys.CustomSelectControl,{...a,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:u,describedBy:b?o?r?(0,E.sprintf)((0,E.__)("Currently selected font appearance: %s"),b.name):(0,E.sprintf)((0,E.__)("Currently selected font style: %s"),b.name):(0,E.sprintf)((0,E.__)("Currently selected font weight: %s"),b.name):(0,E.__)("No selected font appearance"),options:f,value:b,onChange:({selectedItem:e})=>n(e.style)})}const dh=1.5;const ph=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return dh;default:return e}},l=i?t:"";return e||void 0!==r.size&&"default"!==r.size||B()("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,ce.jsx)("div",{className:"block-editor-line-height-control",children:(0,ce.jsx)(ys.__experimentalNumberControl,{...r,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,E.__)("Line height"),placeholder:dh,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function hh({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=ji("spacing.units"),s=(0,ys.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return e||void 0!==r.size&&"default"!==r.size||B()("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...r,label:(0,E.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}const gh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),mh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),fh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),bh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})}),kh=[{label:(0,E.__)("Align text left"),value:"left",icon:gh},{label:(0,E.__)("Align text center"),value:"center",icon:mh},{label:(0,E.__)("Align text right"),value:"right",icon:fh},{label:(0,E.__)("Justify text"),value:"justify",icon:bh}],vh=["left","center","right"];function _h({className:e,value:t,onChange:n,options:o=vh}){const r=(0,p.useMemo)((()=>kh.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,ce.jsx)(ys.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Text alignment"),className:hs("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}const xh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),yh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),Sh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),wh=[{label:(0,E.__)("None"),value:"none",icon:Nd},{label:(0,E.__)("Uppercase"),value:"uppercase",icon:xh},{label:(0,E.__)("Lowercase"),value:"lowercase",icon:yh},{label:(0,E.__)("Capitalize"),value:"capitalize",icon:Sh}];function Ch({className:e,value:t,onChange:n}){return(0,ce.jsx)(ys.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Letter case"),className:hs("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:wh.map((e=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const Bh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),Ih=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.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"})}),jh=[{label:(0,E.__)("None"),value:"none",icon:Nd},{label:(0,E.__)("Underline"),value:"underline",icon:Bh},{label:(0,E.__)("Strikethrough"),value:"line-through",icon:Ih}];function Eh({value:e,onChange:t,className:n}){return(0,ce.jsx)(ys.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Decoration"),className:hs("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:jh.map((e=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const Th=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),Mh=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})}),Ph=[{label:(0,E.__)("Horizontal"),value:"horizontal-tb",icon:Th},{label:(0,E.__)("Vertical"),value:(0,E.isRTL)()?"vertical-lr":"vertical-rl",icon:Mh}];function Rh({className:e,value:t,onChange:n}){return(0,ce.jsx)(ys.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Orientation"),className:hs("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Ph.map((e=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const Nh=1,Ah=6;function Lh(e){const t=Oh(e),n=zh(e),o=Fh(e),r=Vh(e),i=Uh(e),s=Hh(e),l=Gh(e),a=$h(e),c=Wh(e),u=Dh(e);return t||n||o||r||i||s||u||l||a||c}function Dh(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function Oh(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function zh(e){return e?.typography?.lineHeight}function Fh(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function Vh(e){return e?.typography?.letterSpacing}function Hh(e){return e?.typography?.textTransform}function Uh(e){return e?.typography?.textAlign}function Gh(e){return e?.typography?.textDecoration}function $h(e){return e?.typography?.writingMode}function Wh(e){return e?.typography?.textColumns}function Kh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:(0,E.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Zh={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function qh({as:e=Kh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Zh}){const l=e=>Ji({settings:r},"",e),a=Oh(r),c=l(o?.typography?.fontFamily),{fontFamilies:u,fontFamilyFaces:d}=(0,p.useMemo)((()=>function(e,t){var n;const o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap((e=>{var t;return null!==(t=o?.[e])&&void 0!==t?t:[]})),i=null!==(n=r.find((e=>e.fontFamily===t))?.fontFace)&&void 0!==n?n:[];return{fontFamilies:r,fontFamilyFaces:i}}(r,c)),[r,c]),h=e=>{const o=u?.find((({fontFamily:t})=>t===e))?.slug;n(we(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},g=Dh(r),m=!r?.typography?.customFontSize,f=function(e){var t,n,o;const r=e?.typography?.fontSizes,i=!!e?.typography?.defaultFontSizes;return[...null!==(t=r?.custom)&&void 0!==t?t:[],...null!==(n=r?.theme)&&void 0!==n?n:[],...i&&null!==(o=r?.default)&&void 0!==o?o:[]]}(r),b=l(o?.typography?.fontSize),k=(e,o)=>{n(we(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},v=Fh(r),_=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,E.__)("Appearance"):(0,E.__)("Font style"):(0,E.__)("Font weight")}(r),x=r?.typography?.fontStyle,y=r?.typography?.fontWeight,S=l(o?.typography?.fontStyle),w=l(o?.typography?.fontWeight),{nearestFontStyle:C,nearestFontWeight:B}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=Ui(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Wi(s,n)))?.style?.fontStyle),c||(r=n?Wi(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(d,S,w),I=(0,p.useCallback)((({fontStyle:e,fontWeight:o})=>{e===S&&o===w||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[S,w,n,t]),j=(0,p.useCallback)((()=>{I({})}),[I]);(0,p.useEffect)((()=>{C&&B?I({fontStyle:C,fontWeight:B}):j()}),[C,B,j,I]);const T=zh(r),M=l(o?.typography?.lineHeight),P=e=>{n(we(t,["typography","lineHeight"],e||void 0))},R=Vh(r),N=l(o?.typography?.letterSpacing),A=e=>{n(we(t,["typography","letterSpacing"],e||void 0))},L=Wh(r),D=l(o?.typography?.textColumns),O=e=>{n(we(t,["typography","textColumns"],e||void 0))},z=Hh(r),F=l(o?.typography?.textTransform),V=e=>{n(we(t,["typography","textTransform"],e||void 0))},H=Gh(r),U=l(o?.typography?.textDecoration),G=e=>{n(we(t,["typography","textDecoration"],e||void 0))},$=$h(r),W=l(o?.typography?.writingMode),K=e=>{n(we(t,["typography","writingMode"],e||void 0))},Z=Uh(r),q=l(o?.typography?.textAlign),Y=e=>{n(we(t,["typography","textAlign"],e||void 0))},X=(0,p.useCallback)((e=>({...e,typography:{}})),[]);return(0,ce.jsxs)(e,{resetAllFilter:X,value:t,onChange:n,panelId:i,children:[a&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>h(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,ce.jsx)(ah,{fontFamilies:u,value:c,onChange:h,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),g&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>k(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,ce.jsx)(ys.FontSizePicker,{value:b,onChange:k,fontSizes:f,disableCustomFontSizes:m,withReset:!1,withSlider:!0,size:"__unstable-large"})}),v&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:_,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:j,isShownByDefault:s.fontAppearance,panelId:i,children:(0,ce.jsx)(uh,{value:{fontStyle:S,fontWeight:w},onChange:I,hasFontStyles:x,hasFontWeights:y,fontFamilyFaces:d,size:"__unstable-large"})}),T&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:(0,E.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,ce.jsx)(ph,{__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})}),R&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:(0,E.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>A(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,ce.jsx)(hh,{value:N,onChange:A,size:"__unstable-large",__unstableInputWidth:"auto"})}),L&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:(0,E.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>O(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,ce.jsx)(ys.__experimentalNumberControl,{label:(0,E.__)("Columns"),max:Ah,min:Nh,onChange:O,size:"__unstable-large",spinControls:"custom",value:D,initialPosition:1})}),H&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:(0,E.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>G(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,ce.jsx)(Eh,{value:U,onChange:G,size:"__unstable-large",__unstableInputWidth:"auto"})}),$&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{className:"single-column",label:(0,E.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>K(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,ce.jsx)(Rh,{value:W,onChange:K,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),z&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>V(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,ce.jsx)(Ch,{value:F,onChange:V,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Z&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>Y(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,ce.jsx)(_h,{value:q,onChange:Y,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const Yh="typography.lineHeight";const Xh=window.wp.tokenList;var Qh=n.n(Xh);const Jh="typography.__experimentalFontFamily",{kebabCase:eg}=V(ys.privateApis);function tg(e,t,n){if(!(0,d.hasBlockSupport)(t,Jh))return e;if(fs(t,Sg,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(Qh())(e.className);o.add(`has-${eg(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}const ng={useBlockProps:function({name:e,fontFamily:t}){return tg({},e,{fontFamily:t})},addSaveProps:tg,attributeKeys:["fontFamily"],hasSupport:e=>(0,d.hasBlockSupport)(e,Jh)};(0,m.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,d.hasBlockSupport)(e,Jh)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:og}=V(ys.privateApis),rg=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function ig(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function sg(e){if(e)return`has-${og(e)}-font-size`}const lg="typography.fontSize";function ag(e,t,n){if(!(0,d.hasBlockSupport)(t,lg))return e;if(fs(t,Sg,"fontSize"))return e;const o=new(Qh())(e.className);o.add(sg(n.fontSize));const r=o.value;return e.className=r||void 0,e}const cg={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=ji("typography.fontSizes","typography.fluid","layout");if(!(0,d.hasBlockSupport)(e,lg)||fs(e,Sg,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Gi({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:rg(o,t,n?.typography?.fontSize).size}}),s?ag(s,e,{fontSize:t}):void 0},addSaveProps:ag,attributeKeys:["fontSize","style"],hasSupport:e=>(0,d.hasBlockSupport)(e,lg)},ug={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,d.hasBlockSupport)(e,lg)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return ms({fontSize:(0,d.hasBlockSupport)(r,lg)},ug,e,t,n,o)}));const dg=[{icon:gh,title:(0,E.__)("Align text left"),align:"left"},{icon:mh,title:(0,E.__)("Align text center"),align:"center"},{icon:fh,title:(0,E.__)("Align text right"),align:"right"}],pg={placement:"bottom-start"};const hg=function({value:e,onChange:t,alignmentControls:n=dg,label:o=(0,E.__)("Align text"),description:r=(0,E.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?ys.ToolbarGroup:ys.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:pg};return(0,ce.jsx)(c,{icon:a?a.icon:(0,E.isRTL)()?fh:gh,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})},gg=e=>(0,ce.jsx)(hg,{...e,isToolbar:!1}),mg=e=>(0,ce.jsx)(hg,{...e,isToolbar:!0}),fg="typography.textAlign",bg=[{icon:gh,title:(0,E.__)("Align text left"),align:"left"},{icon:mh,title:(0,E.__)("Align text center"),align:"center"},{icon:fh,title:(0,E.__)("Align text right"),align:"right"}],kg=["left","center","right"],vg=[];function _g(e){return Array.isArray(e)?kg.filter((t=>e.includes(t))):!0===e?kg:vg}const xg={edit:function({style:e,name:t,setAttributes:n}){const o=_s(t),r=o?.typography?.textAlign,i=aa();if(!r||"default"!==i)return null;const s=_g((0,d.getBlockSupport)(t,fg));if(!s.length)return null;const l=bg.filter((e=>s.includes(e.align)));return(0,ce.jsx)(Es,{group:"block",children:(0,ce.jsx)(gg,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:gs(o)})},alignmentControls:l})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!_g((0,d.getBlockSupport)(e,fg)).length)return null;if(fs(e,Sg,"textAlign"))return null;const n=t.typography.textAlign;return{className:hs({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,d.getBlockSupport)(t,fg);_g(r).includes(o)&&!fs(t,Sg,"textAlign")&&(e.className=hs(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,d.hasBlockSupport)(e,fg,!1)};function yg(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Sg="typography",wg=[Yh,lg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Jh,fg,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Cg(e){const t={...yg(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...yg(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:gs(t),fontFamily:i,fontSize:r}}function Bg(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function Ig({children:e,resetAllFilter:t}){const n=(0,p.useCallback)((e=>{const n=Bg(e),o=t(n);return{...e,...Cg(o)}}),[t]);return(0,ce.jsx)(Na,{group:"typography",resetAllFilter:n,children:e})}function jg({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s}=(0,h.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(Bi).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),l=Lh(o),a=(0,p.useMemo)((()=>Bg({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!l)return null;const c=(0,d.getBlockSupport)(t,[Sg,"__experimentalDefaultControls"]);return(0,ce.jsx)(qh,{as:Ig,panelId:e,settings:o,value:a,onChange:e=>{n(Cg(e))},defaultControls:c})}const Eg=[],Tg=new Intl.Collator("und",{numeric:!0}).compare;function Mg(){const[e,t,n,o]=ji("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=null!=e?e:Eg,i=null!=t?t:Eg,s=n&&!1!==o?n:Eg;return(0,p.useMemo)((()=>{const e=[{name:(0,E.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>Tg(e.slug,t.slug))),e.length>Zs?[{name:(0,E.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}const Pg=(0,ce.jsxs)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ce.jsx)(ae.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,ce.jsx)(ae.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),Rg={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function Ng({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:a,type:c,value:u}){var d,m;u=nl(u,a);let f=a;const b=a.length<=Zs,k=(0,h.useSelect)((e=>{const t=e(Bi).getSettings();return t?.disableCustomSpacingSizes})),[v,_]=(0,p.useState)(!k&&void 0!==u&&!el(u)),[x,y]=(0,p.useState)(n),S=(0,g.usePrevious)(u);u&&S!==u&&!el(u)&&!0!==v&&_(!0);const[w]=ji("spacing.units"),C=(0,ys.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let B=null;!b&&!v&&void 0!==u&&(!el(u)||el(u)&&t)?(f=[...a,{name:t?(0,E.__)("Mixed"):(0,E.sprintf)((0,E.__)("Custom (%s)"),u),slug:"custom",size:u}],B=f.length-1):t||(B=v?tl(u,a):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":rl(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(u,a));const I=(0,p.useMemo)((()=>(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(B)),[B])[1]||C[0]?.value,j=parseFloat(B,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${a[e]?.slug}`},M=t?(0,E.__)("Mixed"):null,P=f.map(((e,t)=>({key:t,name:e.name}))),R=a.slice(1,a.length-1).map(((e,t)=>({value:t+1,label:void 0}))),N=qs.includes(l)&&s?Qs[l]:"",A=s?c?.toLowerCase():c,L=(0,E.sprintf)((0,E._x)("%1$s %2$s","spacing"),N,A).trim();return(0,ce.jsxs)(ys.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,ce.jsx)(ys.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),v&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:B,units:C,min:x,placeholder:M,disableUnits:t,label:L,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===u?.charAt(0)&&y(0)},onDrag:()=>{"-"===u?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:j,min:0,max:null!==(d=Rg[I]?.max)&&void 0!==d?d:10,step:null!==(m=Rg[I]?.steps)&&void 0!==m?m:.1,withInputField:!1,onChange:e=>{o([e,I].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:L,hideLabelFromVision:!0})]}),b&&!v&&(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:B,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===u&&o("0")},withInputField:!1,"aria-valuenow":B,"aria-valuetext":a[B]?.name,renderTooltipContent:e=>void 0===u?void 0:a[e]?.name,min:0,max:a.length-1,marks:R,label:L,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!b&&!v&&(0,ce.jsx)(ys.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===B))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:L,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!k&&(0,ce.jsx)(ys.Button,{label:v?(0,E.__)("Use size preset"):(0,E.__)("Set custom size"),icon:Pg,onClick:()=>{_(!v)},isPressed:v,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const Ag=["vertical","horizontal"];function Lg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=nl(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?Ag.filter((e=>il(r,e))):Ag;return(0,ce.jsx)(ce.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,ce.jsx)(Ng,{icon:Xs[t],label:Qs[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function Dg({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?qs.filter((e=>r.includes(e))):qs,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=nl(l[t],i),e)),{})};o[e]=n,t(o)};return(0,ce.jsx)(ce.Fragment,{children:a.map((t=>(0,ce.jsx)(Ng,{icon:Xs[t],label:Qs[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function Og({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,ce.jsx)(Ng,{label:Qs[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=nl(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function zg({isLinked:e,...t}){const n=e?(0,E.__)("Unlink sides"):(0,E.__)("Link sides");return(0,ce.jsx)(ys.Button,{...t,size:"small",icon:e?Bd:Oc,iconSize:24,label:n})}function Fg({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=qs,useSelect:a,values:c}){const u=Mg(),d=c||Ys,h=1===l?.length,g=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[m,f]=(0,p.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(il(t)&&(l||a))return Js.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?Js.custom:t[0]}(d,l)),b={...e,minimumCustomValue:n,onChange:e=>{const t={...c,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:u,type:t,useSelect:a,values:d},k=qs.includes(m)&&s?Qs[m]:"",v=(0,E.sprintf)((0,E._x)("%1$s %2$s","spacing"),t,k).trim();return(0,ce.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,ce.jsxs)(ys.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:v}),!h&&!g&&(0,ce.jsx)(zg,{label:t,onClick:()=>{f(m===Js.axial?Js.custom:Js.axial)},isLinked:m===Js.axial})]}),(0,ce.jsx)(ys.__experimentalVStack,{spacing:.5,children:m===Js.axial?(0,ce.jsx)(Lg,{...b}):m===Js.custom?(0,ce.jsx)(Dg,{...b}):(0,ce.jsx)(Og,{side:m,...b,showSideInLabel:s})})]})}const Vg={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Hg({label:e=(0,E.__)("Height"),onChange:t,value:n}){var o,r;const i=parseFloat(n),[s]=ji("spacing.units"),l=(0,ys.__experimentalUseCustomUnits)({availableUnits:s||["%","px","em","rem","vh","vw"]}),a=(0,p.useMemo)((()=>(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||l[0]?.value||"px";return(0,ce.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ce.jsx)(ys.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ce.jsxs)(ys.Flex,{children:[(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:(0,ce.jsx)(ys.__experimentalUnitControl,{value:n,units:l,onChange:t,onUnitChange:e=>{const[o,r]=(0,ys.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ce.jsx)(ys.FlexItem,{isBlock:!0,children:(0,ce.jsx)(ys.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ce.jsx)(ys.RangeControl,{__next40pxDefaultSize:!0,value:i,min:0,max:null!==(o=Vg[a]?.max)&&void 0!==o?o:100,step:null!==(r=Vg[a]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,a].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function Ug(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,h.useSelect)(Bi);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){var a;const{columnStart:e,rowStart:n}=null!==(a=o(r).style?.layout)&&void 0!==a?a:{};(n-1)*t+e-1{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,ce.jsxs)(ys.__experimentalVStack,{as:ys.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:a,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,ce.jsxs)(ys.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Kg(n),value:i||"fit",help:Gg(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"fit",label:(0,E._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"fill",label:(0,E._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,E._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,ce.jsx)(ys.__experimentalUnitControl,{size:"__unstable-large",units:u,onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,label:a,hideLabelFromVision:!0})]})}function Kg(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,E.__)("Width"):(0,E.__)("Height")}function Zg({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:c=3,rowCount:u}=null!=n?n:{},d=(0,h.useSelect)((e=>e(Bi).getBlockRootClientId(r))),{moveBlocksToPosition:p,__unstableMarkNextChangeAsNotPersistent:g}=(0,h.useDispatch)(Bi),m=Ug(d,c);return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsxs)(ys.__experimentalHStack,{as:ys.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,E.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,ce.jsx)(ys.__experimentalInputControl,{size:"__unstable-large",label:(0,E.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:n})},value:null!=l?l:1,min:1}),(0,ce.jsx)(ys.__experimentalInputControl,{size:"__unstable-large",label:(0,E.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:n})},value:null!=a?a:1,min:1})]}),window.__experimentalEnableGridInteractivity&&c&&(0,ce.jsxs)(ys.Flex,{as:ys.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,E.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,ce.jsx)(ys.FlexItem,{style:{width:"50%"},children:(0,ce.jsx)(ys.__experimentalInputControl,{size:"__unstable-large",label:(0,E.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),g(),p([r],d,d,m(n,s))},value:null!=i?i:1,min:1,max:c?c-(null!=l?l:1)+1:void 0})}),(0,ce.jsx)(ys.FlexItem,{style:{width:"50%"},children:(0,ce.jsx)(ys.__experimentalInputControl,{size:"__unstable-large",label:(0,E.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),g(),p([r],d,d,m(i,n))},value:null!=s?s:1,min:1,max:u?u-(null!=a?a:1)+1:void 0})})]})]})}function qg({panelId:e,value:t,onChange:n=()=>{},options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=null!=t?t:"auto",[a,c,u]=ji("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),d=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),p=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=[{label:(0,E._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?p:[],...d||[],{label:(0,E._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,ce.jsx)(ys.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,E.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,ce.jsx)(ys.SelectControl,{label:(0,E.__)("Aspect ratio"),value:l,options:null!=o?o:h,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const Yg=["horizontal","vertical"];function Xg(e){const t=Qg(e),n=Jg(e),o=em(e),r=tm(e),i=nm(e),s=om(e),l=rm(e),a=im(e);return"web"===p.Platform.OS&&(t||n||o||r||i||s||l||a)}function Qg(e){return e?.layout?.contentSize}function Jg(e){return e?.layout?.wideSize}function em(e){return e?.spacing?.padding}function tm(e){return e?.spacing?.margin}function nm(e){return e?.spacing?.blockGap}function om(e){return e?.dimensions?.minHeight}function rm(e){return e?.dimensions?.aspectRatio}function im(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},i=("flex"===o||"flex"===n||"grid"===o||"grid"===n)&&r;return!!e?.layout&&i}function sm(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function lm(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function am({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:(0,E.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const cm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function um({as:e=am,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=cm,onVisualize:l=()=>{},includeLayoutControls:a=!1}){var c,u,d,h,g,m,f,b;const{dimensions:k,spacing:v}=r,_=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=Ji({settings:{dimensions:k,spacing:v}},"",e[n]),t)),{}):Ji({settings:{dimensions:k,spacing:v}},"",e),x=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),y=(0,ys.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),S=-1/0,[w,C]=(0,p.useState)(S),B=Qg(r)&&a,I=_(o?.layout?.contentSize),j=e=>{n(we(t,["layout","contentSize"],e||void 0))},T=Jg(r)&&a,M=_(o?.layout?.wideSize),P=e=>{n(we(t,["layout","wideSize"],e||void 0))},R=em(r),N=lm(_(o?.spacing?.padding)),A=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,L=A&&A.some((e=>Yg.includes(e))),D=e=>{const o=sm(e,A);n(we(t,["spacing","padding"],o))},O=()=>l("padding"),z=tm(r),F=lm(_(o?.spacing?.margin)),V=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=V&&V.some((e=>Yg.includes(e))),U=e=>{const o=sm(e,V);n(we(t,["spacing","margin"],o))},G=()=>l("margin"),$=nm(r),W=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,K=W&&W.some((e=>Yg.includes(e))),Z=_(o?.spacing?.blockGap),q=function(e,t){return e?"string"==typeof e?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top}:e}(Z,K),Y=e=>{n(we(t,["spacing","blockGap"],e))},X=e=>{e||Y(null),!K&&e?.hasOwnProperty("top")?Y(e.top):Y({top:e?.top,left:e?.left})},Q=om(r),J=_(o?.dimensions?.minHeight),ee=e=>{const o=we(t,["dimensions","minHeight"],e);n(we(o,["dimensions","aspectRatio"],void 0))},te=rm(r),ne=_(o?.dimensions?.aspectRatio),oe=im(r),re=o?.layout,ie=(0,p.useCallback)((e=>({...e,layout:gs({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),se=()=>l(!1);return(0,ce.jsxs)(e,{resetAllFilter:ie,value:t,onChange:n,panelId:i,children:[(B||T)&&(0,ce.jsx)("span",{className:"span-columns",children:(0,E.__)("Set the width of the main content area.")}),B&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>j(void 0),isShownByDefault:null!==(c=s.contentSize)&&void 0!==c?c:cm.contentSize,panelId:i,children:(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Content width"),labelPosition:"top",value:I||"",onChange:e=>{j(e)},units:y,prefix:(0,ce.jsx)(ys.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ce.jsx)(Pl,{icon:Rl})})})}),T&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(u=s.wideSize)&&void 0!==u?u:cm.wideSize,panelId:i,children:(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Wide width"),labelPosition:"top",value:M||"",onChange:e=>{P(e)},units:y,prefix:(0,ce.jsx)(ys.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ce.jsx)(Pl,{icon:Nl})})})}),R&&(0,ce.jsxs)(ys.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,E.__)("Padding"),onDeselect:()=>D(void 0),isShownByDefault:null!==(d=s.padding)&&void 0!==d?d:cm.padding,className:hs({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,ce.jsx)(ys.BoxControl,{__next40pxDefaultSize:!0,values:N,onChange:D,label:(0,E.__)("Padding"),sides:A,units:y,allowReset:!1,splitOnAxis:L,inputProps:{onMouseOver:O,onMouseOut:se}}),x&&(0,ce.jsx)(Fg,{values:N,onChange:D,label:(0,E.__)("Padding"),sides:A,units:y,allowReset:!1,onMouseOver:O,onMouseOut:se})]}),z&&(0,ce.jsxs)(ys.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,E.__)("Margin"),onDeselect:()=>U(void 0),isShownByDefault:null!==(h=s.margin)&&void 0!==h?h:cm.margin,className:hs({"tools-panel-item-spacing":x}),panelId:i,children:[!x&&(0,ce.jsx)(ys.BoxControl,{__next40pxDefaultSize:!0,values:F,onChange:U,inputProps:{min:w,onDragStart:()=>{C(0)},onDragEnd:()=>{C(S)},onMouseOver:G,onMouseOut:se},label:(0,E.__)("Margin"),sides:V,units:y,allowReset:!1,splitOnAxis:H}),x&&(0,ce.jsx)(Fg,{values:F,onChange:U,minimumCustomValue:-1/0,label:(0,E.__)("Margin"),sides:V,units:y,allowReset:!1,onMouseOver:G,onMouseOut:se})]}),$&&(0,ce.jsxs)(ys.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,E.__)("Block spacing"),onDeselect:()=>Y(void 0),isShownByDefault:null!==(g=s.blockGap)&&void 0!==g?g:cm.blockGap,className:hs({"tools-panel-item-spacing":x,"single-column":!x&&!K}),panelId:i,children:[!x&&(K?(0,ce.jsx)(ys.BoxControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Block spacing"),min:0,onChange:X,units:y,sides:W,values:q,allowReset:!1,splitOnAxis:K}):(0,ce.jsx)(ys.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Block spacing"),min:0,onChange:Y,units:y,value:Z})),x&&(0,ce.jsx)(Fg,{label:(0,E.__)("Block spacing"),min:0,onChange:X,showSideInLabel:!1,sides:K?W:["top"],values:q,allowReset:!1})]}),oe&&(0,ce.jsx)($g,{value:re,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:null!==(m=s.childLayout)&&void 0!==m?m:cm.childLayout}),Q&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,E.__)("Minimum height"),onDeselect:()=>{ee(void 0)},isShownByDefault:null!==(f=s.minHeight)&&void 0!==f?f:cm.minHeight,panelId:i,children:(0,ce.jsx)(Hg,{label:(0,E.__)("Minimum height"),value:J,onChange:ee})}),te&&(0,ce.jsx)(qg,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:ne,onChange:e=>{const o=we(t,["dimensions","aspectRatio"],e);n(we(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:null!==(b=s.aspectRatio)&&void 0!==b?b:cm.aspectRatio})]})}const dm=new WeakMap;const pm=function(e){return(0,g.useRefEffect)((t=>{function n(t){const{deltaX:n,deltaY:o}=t,r=e.current;let i=dm.get(r);i||(i=(0,La.getScrollContainer)(r),dm.set(r,i)),i.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},hm=".block-editor-block-list__block",gm=".block-list-appender",mm=".block-editor-button-block-appender";function fm(e,t){return e.closest(hm)===t.closest(hm)}function bm(e,t){return t.closest([hm,gm,mm].join(","))===e}function km(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(hm);return t?t.id.slice(6):void 0}function vm(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function _m(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function xm(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const ym=["core/navigation"];function Sm(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&ym.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!xm(o))for(const e of o.children)if(_m(e)){n=vm(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const wm=Number.MAX_SAFE_INTEGER;const Cm=(0,p.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const a=$p(e),c=$p(null!=t?t:e),u=(0,g.useMergeRefs)([l,pm(r)]),[d,h]=(0,p.useReducer)((e=>(e+1)%wm),0);(0,p.useLayoutEffect)((()=>{if(!a)return;const e=new window.MutationObserver(h);return e.observe(a,{attributes:!0}),()=>{e.disconnect()}}),[a]);const m=(0,p.useMemo)((()=>{if(!(d<0||!a||t&&!c))return{getBoundingClientRect:()=>c?vm(Sm(a),Sm(c)):Sm(a),contextElement:a}}),[d,a,t,c]);return!a||t&&!c?null:(0,ce.jsx)(ys.Popover,{ref:u,animate:!1,focusOnMount:!1,anchor:m,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:hs("block-editor-block-popover",s.className),variant:"unstyled",children:n})})),Bm=(0,p.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,ce.jsx)(Cm,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function Im({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,p.useState)(e.offsetWidth),[i,s]=(0,p.useState)(e.offsetHeight);(0,p.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,p.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,ce.jsx)("div",{style:l,children:n})}const jm=(0,p.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){var l;null!==(l=t)&&void 0!==l||(t=e);const a=$p(e);return(0,ce.jsx)(Cm,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:a&&e===t?(0,ce.jsx)(Im,{selectedElement:a,additionalStyles:r,children:n}):n})}));function Em({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=$p(e),[i,s]=(0,p.useReducer)((()=>n(r)));(0,p.useLayoutEffect)((()=>{r&&window.requestAnimationFrame((()=>window.requestAnimationFrame(s)))}),[r,t]);const l=(0,p.useRef)(t),[a,c]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{if($a()(t,l.current)||o)return;c(!0),l.current=t;const e=setTimeout((()=>{c(!1)}),400);return()=>{c(!1),clearTimeout(e)}}),[t,o]),a||o?(0,ce.jsx)(jm,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,ce.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function Tm(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Mm({clientId:e,value:t,forceShow:n}){return(0,ce.jsx)(Em,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=Tm(e,"margin-top"),n=Tm(e,"margin-right"),o=Tm(e,"margin-bottom"),r=Tm(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function Pm({clientId:e,value:t,forceShow:n}){return(0,ce.jsx)(Em,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:Tm(e,"padding-top"),borderRightWidth:Tm(e,"padding-right"),borderBottomWidth:Tm(e,"padding-bottom"),borderLeftWidth:Tm(e,"padding-left")}),forceShow:n})}const Rm="dimensions",Nm="spacing";function Am({children:e,resetAllFilter:t}){const n=(0,p.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,ce.jsx)(Na,{group:"dimensions",resetAllFilter:n,children:e})}function Lm({clientId:e,name:t,setAttributes:n,settings:o}){const r=Xg(o),i=(0,h.useSelect)((t=>t(Bi).getBlockAttributes(e)?.style),[e]),[s,l]=function(){const[e,t]=(0,p.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=V((0,h.useDispatch)(Bi));return(0,p.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const a={...(0,d.getBlockSupport)(t,[Rm,"__experimentalDefaultControls"]),...(0,d.getBlockSupport)(t,[Nm,"__experimentalDefaultControls"])};return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(um,{as:Am,panelId:e,settings:o,value:i,onChange:e=>{n({style:gs(e)})},defaultControls:a,onVisualize:l}),!!o?.spacing?.padding&&(0,ce.jsx)(Pm,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,ce.jsx)(Mm,{forceShow:"margin"===s,clientId:e,value:i})]})}function Dm(e,t="any"){if("web"!==p.Platform.OS)return!1;const n=(0,d.getBlockSupport)(e,Rm);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const Om={useBlockProps:function({name:e,minHeight:t,style:n}){if(!Dm(e,"aspectRatio")||fs(e,Rm,"aspectRatio"))return{};const o=hs({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>Dm(e,"aspectRatio")};function zm(){B()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const Fm=[...wg,Qd,qp,Rm,xu,Nm,Jd],Vm=e=>Fm.some((t=>(0,d.hasBlockSupport)(e,t)));function Hm(e={}){const t={};return(0,Ti.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Um={[`${Qd}.__experimentalSkipSerialization`]:["border"],[`${qp}.__experimentalSkipSerialization`]:[qp],[`${Sg}.__experimentalSkipSerialization`]:[Sg],[`${Rm}.__experimentalSkipSerialization`]:[Rm],[`${Nm}.__experimentalSkipSerialization`]:[Nm],[`${Jd}.__experimentalSkipSerialization`]:[Jd]},Gm={...Um,[`${Rm}.aspectRatio`]:[`${Rm}.aspectRatio`],[`${xu}`]:[xu]},$m={[`${Rm}.aspectRatio`]:!0,[`${xu}`]:!0},Wm={gradients:"gradient"};function Km(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;Km(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function Zm(e,t,n,o=Gm){if(!Vm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=$m[e]||(0,d.getBlockSupport)(t,e);!0===o&&(r=Km(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=Wm[e]||e;r=Km(r,[[...n,t]])}))})),e.style={...Hm(r),...e.style},e}const qm={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=_s(t,o),i=aa(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ih,{...s}),(0,ce.jsx)(Iu,{...s}),(0,ce.jsx)(jg,{...s}),(0,ce.jsx)(sp,{...s}),(0,ce.jsx)(Lm,{...s})]})},hasSupport:Vm,addSaveProps:Zm,attributeKeys:["style"],useBlockProps:function({name:e,style:t}){const n=(0,g.useInstanceId)(Xm,"wp-elements"),o=`.${n}`,r=t?.elements,i=(0,p.useMemo)((()=>{if(!r)return;const t=[];return Ym.forEach((({elementType:n,pseudo:i,elements:s})=>{if(fs(e,qp,n))return;const l=r?.[n];if(l){const e=es(o,d.__EXPERIMENTAL_ELEMENTS[n]);t.push((0,Ti.compileCSS)(l,{selector:e})),i&&i.forEach((e=>{l[e]&&t.push((0,Ti.compileCSS)(l[e],{selector:es(o,`${d.__EXPERIMENTAL_ELEMENTS[n]}${e}`)}))}))}s&&s.forEach((e=>{r[e]&&t.push((0,Ti.compileCSS)(r[e],{selector:es(o,d.__EXPERIMENTAL_ELEMENTS[e])}))}))})),t.length>0?t.join(""):void 0}),[o,r,e]);return ks({css:i}),Zm({className:n},e,{style:t},Um)}},Ym=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],Xm={};(0,m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Vm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,m.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,d.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const Qm=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});const Jm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,ce.jsx)(ys.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,ce.jsx)(ys.DuotoneSwatch,{values:s}):(0,ce.jsx)(Pl,{icon:Qm});const c=(0,E.__)("Apply duotone filter"),u=`${(0,g.useInstanceId)(e,"duotone-control",t)}__description`;return(0,ce.jsx)(ys.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,E.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,ce.jsx)(ys.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Oa.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,ce.jsxs)(ys.MenuGroup,{label:(0,E.__)("Duotone"),children:[(0,ce.jsx)("p",{children:(0,E.__)("Create a two-tone color effect without losing your original image.")}),(0,ce.jsx)(ys.DuotonePicker,{"aria-label":c,"aria-describedby":u,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function ef(e){return`${e}{filter:none}`}function tf(e,t){return`${e}{filter:url(#${t})}`}function nf(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=sd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}(t);return`\n`}function of(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return Ce(i,`${a}.root`,null)||Ce(i,a,null)||e}const t=Ce(s,`${a}.__experimentalSelector`,null);return t?es(c,t):e}let d;return l&&(d=Ce(i,a,null)),d||(o?of(e,u[0],n):null)}const rf=[];function sf(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||rf,i=e?.color?.[t]?.theme||rf,s=e?.color?.[t]?.default||rf;return(0,p.useMemo)((()=>[...r,...i,...o?rf:s]),[o,r,i,s])}function lf(e){return af(e)}function af(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function cf({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Xi();return(0,ce.jsx)(ys.__experimentalToolsPanel,{label:(0,E._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const uf={duotone:!0},df={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,E.__)("Duotone")},pf=({indicator:e,label:t})=>(0,ce.jsxs)(ys.__experimentalHStack,{justify:"flex-start",children:[(0,ce.jsx)(ys.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,ce.jsx)(ys.Flex,{expanded:!1,children:"unset"!==e&&e?(0,ce.jsx)(ys.DuotoneSwatch,{values:e}):(0,ce.jsx)(ys.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,ce.jsx)(ys.FlexItem,{title:t,children:t})]}),hf=(e,t)=>({onToggle:n,isOpen:o})=>{const r=(0,p.useRef)(void 0),i={onClick:n,className:hs({"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(),r.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,E.__)("Reset")};return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,...i,children:(0,ce.jsx)(pf,{indicator:e,label:(0,E.__)("Duotone")})}),e&&(0,ce.jsx)(ys.Button,{size:"small",icon:Nd,...s})]})};function gf({as:e=cf,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=uf}){const l=af(r),a=sf(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),c=sf(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),u=(d=o?.filter?.duotone,Ji({settings:r},"",d));var d;const h=e=>{const o=a.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(we(t,["filter","duotone"],r))},g=()=>h(void 0),m=(0,p.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,ce.jsx)(e,{resetAllFilter:m,value:t,onChange:n,panelId:i,children:l&&(0,ce.jsx)(ys.__experimentalToolsPanelItem,{label:(0,E.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:g,isShownByDefault:s.duotone,panelId:i,children:(0,ce.jsx)(ys.Dropdown,{popoverProps:df,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:hf(u,g),renderContent:()=>(0,ce.jsx)(ys.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,ce.jsxs)(ys.MenuGroup,{label:(0,E.__)("Duotone"),children:[(0,ce.jsx)("p",{children:(0,E.__)("Create a two-tone color effect without losing your original image.")}),(0,ce.jsx)(ys.DuotonePicker,{colorPalette:c,duotonePalette:a,disableCustomColors:!0,disableCustomDuotone:!0,value:u,onChange:h})]})})})})})}const mf=[],ff=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function bf({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=ji(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,p.useMemo)((()=>[...o||mf,...r||mf,...n&&i||mf]),[n,o,r,i])}function kf(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}ad([cd]);const vf={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=_s(n),i=aa(),s=bf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=bf({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=ji("color.custom","color.customDuotone"),u=!a,d=!c||0===l?.length&&u;if(0===s?.length&&d)return null;if("default"!==i)return null;const p=Array.isArray(o)?o:kf(o,s);return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(Na,{group:"filter",children:(0,ce.jsx)(gf,{value:{filter:{duotone:p}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})}),(0,ce.jsx)(Es,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,ce.jsx)(Jm,{duotonePalette:s,colorPalette:l,disableCustomDuotone:d,disableCustomColors:u,value:p,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})})]})},useBlockProps:function({clientId:e,name:t,style:n}){const o=(0,g.useInstanceId)(xf),r=(0,p.useMemo)((()=>{const e=(0,d.getBlockType)(t);if(e){if(!(0,d.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,d.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=of(e);return"string"==typeof t?es(n,t):n}return of(e,"filter.duotone",{fallback:!0})}}),[t]),i=n?.color?.duotone,s=`wp-duotone-${o}`,l=r&&i;return _f({clientId:e,id:s,selector:r,attribute:i}),{className:l?s:""}},attributeKeys:["style"],hasSupport:e=>(0,d.hasBlockSupport)(e,"filter.duotone")};function _f({clientId:e,id:t,selector:n,attribute:o}){const r=bf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:kf(o,r),l="string"==typeof o&&s;let a=null;l?a=s:("string"==typeof o&&!l||i)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),u=Array.isArray(a)||"unset"===a;vs(u?{css:"unset"!==a?tf(c,t):ef(c),__unstableType:"presets"}:void 0),vs(u?{assets:"unset"!==a?nf(t,a):"",__unstableType:"svgs"}:void 0);const d=$p(e);(0,p.useEffect)((()=>{if(u&&d&&ff){const e=d.style.display;d.style.setProperty("display","inline-block"),d.offsetHeight,d.style.setProperty("display",e)}}),[u,d,a])}const xf={};function yf(e){return(0,h.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Bi),{getBlockType:r,getActiveBlockVariation:i}=t(d.store),s=n(e),l=r(s);if(!l)return null;const a=o(e),c=i(s,a),u=(0,d.isReusableBlock)(l)||(0,d.isTemplatePart)(l),p=(u?(0,d.__experimentalGetBlockLabel)(l,a):void 0)||l.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,E.__)("Sticky"):"fixed"===t?(0,E.__)("Fixed"):null}(a),g={isSynced:u,title:p,icon:l.icon,description:l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name};return c?{isSynced:u,title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name}:g}),[e])}(0,m.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,d.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Sf="position",wf={key:"default",value:"",name:(0,E.__)("Default")},Cf={key:"sticky",value:"sticky",name:(0,E._x)("Sticky","Name for the value of the CSS position property"),hint:(0,E.__)("The block will stick to the top of the window instead of scrolling.")},Bf={key:"fixed",value:"fixed",name:(0,E._x)("Fixed","Name for the value of the CSS position property"),hint:(0,E.__)("The block will not move when the page is scrolled.")},If=["top","right","bottom","left"],jf=["sticky","fixed"];function Ef(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function Tf({name:e}={}){const[t,n]=ji("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,d.getBlockSupport)(r,Sf)||o;var r}function Mf({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,d.getBlockSupport)(e,Sf);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,d.getBlockSupport)(e,Sf);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:l}=(0,h.useSelect)((e=>{const{getBlockParents:n}=e(Bi),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),a=yf(l),c=i&&s===Cf.value&&a?(0,E.sprintf)((0,E.__)("The block will stick to the scrollable area of the parent %s block."),a.title):null,u=(0,p.useMemo)((()=>{const e=[wf];return(i||s===Cf.value)&&e.push(Cf),(r||s===Bf.value)&&e.push(Bf),e}),[r,i,s]),g=s&&u.find((e=>e.value===s))||wf;return p.Platform.select({web:u.length>1?(0,ce.jsx)(Na,{group:"position",children:(0,ce.jsx)(ys.BaseControl,{__nextHasNoMarginBottom:!0,help:c,children:(0,ce.jsx)(ys.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,E.__)("Position"),hideLabelFromVision:!0,describedBy:(0,E.sprintf)((0,E.__)("Currently selected position: %s"),g.name),options:u,value:g,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:gs(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}const Pf={edit:function(e){return Tf(e)?null:(0,ce.jsx)(Mf,{...e})},useBlockProps:function({name:e,style:t}){const n=(0,d.hasBlockSupport)(e,Sf),o=Tf({name:e}),r=n&&!o,i=(0,g.useInstanceId)(Rf),s=`.wp-container-${i}.wp-container-${i}`;let l;r&&(l=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return jf.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,If.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:t})||"");const a=hs({[`wp-container-${i}`]:r&&!!l,[`is-position-${t?.position?.type}`]:r&&!!l&&!!t?.position?.type});return ks({css:l}),{className:a}},attributeKeys:["style"],hasSupport:e=>(0,d.hasBlockSupport)(e,Sf)},Rf={};const Nf={button:"wp-element-button",caption:"wp-element-caption"},Af={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:Lf}=V(ys.privateApis);function Df(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+Lf(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...Df(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const Of=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const i=zf({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=zf({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function zf(e={},t="",n,o={},r=!1){const i=Ki===t,s=Object.entries(d.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=Ce(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!Ce(u,[o],!1))return;const r=n.startsWith("--")?n:Lf(n);t.push(`${r}: ${(0,Ti.getCSSValueFromRawStyle)(Ce(u,[o]))}`)}));else if(Ce(e,c,!1)){const n=o.startsWith("--")?o:Lf(o);t.push(`${n}: ${(0,Ti.getCSSValueFromRawStyle)(Ce(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=ns(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...wu(e.background)}}));return(0,Ti.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:Lf(e.key);let l=ns(e.value,o);"font-size"===t&&(l=Gi({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function Ff({layoutDefinitions:e=Ds,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?sl(t?.spacing?.blockGap):"";if(r&&(n===Ki?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||l}`)})),r.length){let i="";i=o?n===Ki?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===Ki?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===Ki&&o&&(s+=`${Zi} { --wp--style--block-gap: ${l}; }`)),n===Ki&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const Vf=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function Hf(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>Vf.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const Uf=(e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=Hf(e.styles);return r&&o.push({styles:r,selector:Ki,skipSelectorWrapper:!0}),Object.entries(d.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n,skipSelectorWrapper:!Nf[t]})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const i=Hf(n);if(n?.variations){const r={};Object.entries(n.variations).forEach((([n,i])=>{var s,l;r[n]=Hf(i),i?.css&&(r[n].css=i.css);const a=t[e]?.styleVariationSelectors?.[n];Object.entries(null!==(s=i?.elements)&&void 0!==s?s:{}).forEach((([e,t])=>{t&&d.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:es(a,d.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(null!==(l=i?.blocks)&&void 0!==l?l:{}).forEach((([e,n])=>{var r;const i=es(a,t[e]?.selector),s=es(a,t[e]?.duotoneSelector),l=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=es(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=es(e,r)})))})),n}(a,t[e]?.featureSelectors),c=Hf(n);n?.css&&(c.css=n.css),o.push({selector:i,duotoneSelector:s,featureSelectors:l,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:c}),Object.entries(null!==(r=n.elements)&&void 0!==r?r:{}).forEach((([e,t])=>{t&&d.__EXPERIMENTAL_ELEMENTS[e]&&o.push({styles:t,selector:es(i,d.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),i.variations=r}t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:i,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&d.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>d.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},Gf=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return qi.forEach((({path:n})=>{const o=Ce(e,n,!1);!1!==o&&(t=we(t,n,o))})),t},i=r(e.settings),s=e.settings?.custom;return(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:Zi}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const i=r(n),s=n.custom;(Object.keys(i).length>0||s)&&o.push({presets:i,custom:s,selector:t[e]?.selector})})),o},$f=(e,t)=>{const n=Gf(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return qi.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=Ce(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${Lf(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${Lf(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=Df(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},Wf=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=Uf(e,t),c=Gf(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Zi} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=Of(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=zf(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||Ki!==t&&!d||(g+=Ff({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=zf(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=qf(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=Of(p,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");g+=`:root :where(${o}){${r};}`}}))}const t=zf(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=qf(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=zf(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=sl(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{Ki!==e&&Zi!==e||(e="");const n=function(e="*",t={}){return qi.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=Ce(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${Lf(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${Lf(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function Kf(e,t){return Gf(e,t).flatMap((({presets:e})=>function(e={}){return qi.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=Ce(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>nf(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const Zf=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=of(e);let s=of(e,"filter.duotone");if(!s){const t=of(e),n=(0,d.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&es(t,n)}const l=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,a=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(r),u={};c?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);u[o]=r}));const p=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(Af).forEach((([t,o])=>{const r=of(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:a,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:l,name:r,selector:i,styleVariationSelectors:c?.length?u:void 0}})),o};function qf(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?es(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function Yf(e={},t){const[n]=ls("spacing.blockGap"),o=null!==n,r=!o,i=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,h.useSelect)(d.store);return(0,p.useMemo)((()=>{var n;if(!e?.styles||!e?.settings)return[];const l=(a=e,a.styles?.blocks?.["core/separator"]&&a.styles?.blocks?.["core/separator"].color?.background&&!a.styles?.blocks?.["core/separator"].color?.text&&!a.styles?.blocks?.["core/separator"].border?.color?{...a,styles:{...a.styles,blocks:{...a.styles.blocks,"core/separator":{...a.styles.blocks["core/separator"],color:{...a.styles.blocks["core/separator"].color,text:a.styles?.blocks["core/separator"].color.background}}}}}:a);var a;const c=Zf((0,d.getBlockTypes)(),s),u=$f(l,c),p=Wf(l,c,o,r,i,t),h=Kf(l,c),g=[{css:u,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(n=l.styles.css)&&void 0!==n?n:"",isGlobalStyles:!0},{assets:h,__unstableType:"svg",isGlobalStyles:!0}];return(0,d.getBlockTypes)().forEach((e=>{if(l.styles.blocks[e.name]?.css){const t=c[e.name].selector;g.push({css:qf(l.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[g,l.settings]}),[o,r,e,i,t,s])}function Xf(e=!1){const{merged:t}=(0,p.useContext)(os);return Yf(t,e)}const Qf="is-style-";function Jf(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(Qf)){const n=t.slice(9);"default"!==n&&e.push(n)}return e}),[]):[]}function eb({override:e}){vs(e)}function tb(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=Ce(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}const nb={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>Jf(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,h.useSelect)(d.store),r=function(e,t=[]){const n=Jf(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${Qf}${r}-${n}`,{settings:s,styles:l}=function(e,t,n){const{merged:o}=(0,p.useContext)(os),{globalSettings:r,globalStyles:i}=(0,h.useSelect)((e=>{const t=e(Bi).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[N]}}),[]);return(0,p.useMemo)((()=>{var s,l,a;const c=tb({settings:null!==(s=o?.settings)&&void 0!==s?s:r,styles:null!==(l=o?.styles)&&void 0!==l?l:i},e,t);return{settings:null!==(a=o?.settings)&&void 0!==a?a:r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:c}}}}}}),[o,r,i,t,n,e])}(e,r,n),a=(0,p.useMemo)((()=>{if(!r)return;const e={settings:s,styles:l},t=Zf((0,d.getBlockTypes)(),o,n);return Wf(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,l,o,n]);return vs({id:`variation-${n}`,css:a,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}},ob="layout",{kebabCase:rb}=V(ys.privateApis);function ib(e){return(0,d.hasBlockSupport)(e,"layout")||(0,d.hasBlockSupport)(e,"__experimentalLayout")}function sb(e={},t=""){const{layout:n}=e,{default:o}=(0,d.getBlockSupport)(t,ob)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(Ds[r?.type||"default"]?.className){const e=Ds[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,h.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(Bi).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${rb(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${rb(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}const lb={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=_s(n),{layout:i}=r,{themeSupportsLayout:s}=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==aa())return null;const l=(0,d.getBlockSupport)(n,ob,{}),a={...i,...l},{allowSwitching:c,allowEditing:u=!0,allowInheriting:p=!0,default:g}=a;if(!u)return null;const m={...l,...e},{type:f,default:{type:b="default"}={}}=m,k=f||b,v=!(!p||k&&"default"!==k&&"constrained"!==k&&!m.inherit),_=e||g||{},{inherit:x=!1,contentSize:y=null}=_;if(("default"===k||"constrained"===k)&&!s)return null;const S=$l(k),w=$l("constrained"),C=!_.type&&(y||x),B=!!x||!!y,I=e=>t({layout:e});return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(Na,{children:(0,ce.jsxs)(ys.PanelBody,{title:(0,E.__)("Layout"),children:[v&&(0,ce.jsx)(ce.Fragment,{children:(0,ce.jsx)(ys.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Inner blocks use content width"),checked:"constrained"===S?.name||B,onChange:()=>t({layout:{type:"constrained"===S?.name||B?"default":"constrained"}}),help:"constrained"===S?.name||B?(0,E.__)("Nested blocks use content width with options for full and wide widths."):(0,E.__)("Nested blocks will fill the width of this container.")})}),!x&&c&&(0,ce.jsx)(ab,{type:k,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,ce.jsx)(S.inspectorControls,{layout:_,onChange:I,layoutBlockSupport:a,name:n,clientId:o}),w&&C&&(0,ce.jsx)(w.inspectorControls,{layout:_,onChange:I,layoutBlockSupport:a,name:n,clientId:o})]})}),!x&&S&&(0,ce.jsx)(S.toolBarControls,{layout:_,onChange:I,layoutBlockSupport:l,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>ib(e)};function ab({type:e,onChange:t}){return(0,ce.jsx)(ys.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,E.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Gl.map((({name:e,label:t})=>(0,ce.jsx)(ys.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function cb({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,g.useInstanceId)(e),{layout:l}=i,{default:a}=(0,d.getBlockSupport)(r,ob)||{},c=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||a||{},u=`wp-container-${rb(r)}-is-layout-`,p=`.${u}${s}`,h=null!==n,m=$l(c?.type||"default"),f=m?.getLayoutStyle?.({blockName:r,selector:p,layout:c,style:i?.style,hasBlockGapSupport:h}),b=hs({[`${u}${s}`]:!!f},o);return ks({css:f}),(0,ce.jsx)(e,{...t,__unstableLayoutClassNames:b})}const ub=(0,g.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=ib(o),s=sb(r,o),l=(0,h.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=V(e(Bi)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,ce.jsx)(cb,{block:e,props:t,layoutClasses:s,...l}):(0,ce.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function db(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,m.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||ib(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,m.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",ub);class pb{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=null!=e?e:1,this.rowStart=null!=t?t:1,this.columnEnd=void 0!==r?this.columnStart+r-1:null!=n?n:this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:null!=o?o:this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function hb(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function gb(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function mb(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)/ to quickly insert new blocks."),{kbd:(0,ce.jsx)("kbd",{})}),(0,p.createInterpolateElement)((0,E.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,ce.jsx)("kbd",{})}),(0,p.createInterpolateElement)((0,E.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,ce.jsx)("kbd",{})}),(0,E.__)("Drag files into the editor to automatically insert media blocks."),(0,E.__)("Change a block's type by pressing the block icon on the toolbar.")];const kb=function(){const[e]=(0,p.useState)(Math.floor(Math.random()*bb.length));return(0,ce.jsx)(ys.Tip,{children:bb[e]})},vb=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),_b=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),xb=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const yb=(0,p.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:xb});const r=(0,ce.jsx)(ys.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,ce.jsx)("span",{style:i,className:hs("block-editor-block-icon",n,{"has-colors":t}),children:r})})),{Badge:Sb}=V(ys.privateApis);const wb=function({title:e,icon:t,description:n,blockType:o,className:r,name:i}){o&&(B()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:s}=(0,h.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(Bi);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:l}=(0,h.useDispatch)(Bi);return(0,ce.jsxs)("div",{className:hs("block-editor-block-card",r),children:[s&&(0,ce.jsx)(ys.Button,{onClick:()=>l(s),label:(0,E.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,E.isRTL)()?vb:_b,size:"small"}),(0,ce.jsx)(yb,{icon:t,showColors:!0}),(0,ce.jsxs)(ys.__experimentalVStack,{spacing:1,children:[(0,ce.jsxs)("h2",{className:"block-editor-block-card__title",children:[(0,ce.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!!i?.length&&(0,ce.jsx)(Sb,{children:e})]}),n&&(0,ce.jsx)(ys.__experimentalText,{className:"block-editor-block-card__description",children:n})]})]})};let Cb=function(e){return e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e}({}),Bb=function(e){return e.Processing="PROCESSING",e.Paused="PAUSED",e}({}),Ib=function(e){return e.Prepare="PREPARE",e.Upload="UPLOAD",e}({});const jb={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:()=>{}}};const Eb=function(e=jb,t={type:Cb.Unknown}){switch(t.type){case Cb.PauseQueue:return{...e,queueStatus:"paused"};case Cb.ResumeQueue:return{...e,queueStatus:"active"};case Cb.Add:return{...e,queue:[...e.queue,t.item]};case Cb.Cancel:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,error:t.error}:e))};case Cb.Remove:return{...e,queue:e.queue.filter((e=>e.id!==t.id))};case Cb.OperationStart:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,currentOperation:t.operation}:e))};case Cb.AddOperations:return{...e,queue:e.queue.map((e=>e.id!==t.id?e:{...e,operations:[...e.operations||[],...t.operations]}))};case Cb.OperationFinish:return{...e,queue:e.queue.map((e=>{if(e.id!==t.id)return e;const n=e.operations?e.operations.slice(1):[],o=e.attachment||t.item.attachment?{...e.attachment,...t.item.attachment}:void 0;return{...e,currentOperation:void 0,operations:n,...t.item,attachment:o,additionalData:{...e.additionalData,...t.item.additionalData}}}))};case Cb.CacheBlobUrl:{const n=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...n,t.blobUrl]}}}case Cb.RevokeBlobUrls:{const n={...e.blobUrls};return delete n[t.id],{...e,blobUrls:n}}case Cb.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e};function Tb(e){return e.queue}function Mb(e){return e.queue.length>=1}function Pb(e,t){return e.queue.some((e=>e.attachment?.url===t||e.sourceUrl===t))}function Rb(e,t){return e.queue.some((e=>e.attachment?.id===t||e.sourceAttachmentId===t))}function Nb(e){return e.settings}function Ab(e){return e.queue}function Lb(e,t){return e.queue.find((e=>e.id===t))}function Db(e,t){return 0===e.queue.filter((e=>t===e.batchId)).length}function Ob(e,t){return e.queue.some((e=>e.currentOperation===Ib.Upload&&e.additionalData.post===t))}function zb(e,t){return e.queue.find((e=>e.status===Bb.Paused&&e.additionalData.post===t))}function Fb(e){return"paused"===e.queueStatus}function Vb(e,t){return e.blobUrls[t]||[]}const Hb={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ub;const Gb=new Uint8Array(16);function $b(){if(!Ub&&(Ub="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ub))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ub(Gb)}const Wb=[];for(let e=0;e<256;++e)Wb.push((e+256).toString(16).slice(1));function Kb(e,t=0){return Wb[e[t+0]]+Wb[e[t+1]]+Wb[e[t+2]]+Wb[e[t+3]]+"-"+Wb[e[t+4]]+Wb[e[t+5]]+"-"+Wb[e[t+6]]+Wb[e[t+7]]+"-"+Wb[e[t+8]]+Wb[e[t+9]]+"-"+Wb[e[t+10]]+Wb[e[t+11]]+Wb[e[t+12]]+Wb[e[t+13]]+Wb[e[t+14]]+Wb[e[t+15]]}const Zb=function(e,t,n){if(Hb.randomUUID&&!t&&!e)return Hb.randomUUID();const o=(e=e||{}).random||(e.rng||$b)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return Kb(o)};class qb extends Error{constructor({code:e,message:t,file:n,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=n}}function Yb(e,t){if(!t)return;const n=t.some((t=>t.includes("/")?t===e.type:e.type.startsWith(`${t}/`)));if(e.type&&!n)throw new qb({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,E.sprintf)((0,E.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}function Xb(e,t){const n=(o=t)?Object.entries(o).flatMap((([e,t])=>{const[n]=t.split("/");return[t,...e.split("|").map((e=>`${n}/${e}`))]})):null;var o;if(!n)return;const r=n.includes(e.type);if(e.type&&!r)throw new qb({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,E.sprintf)((0,E.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}function Qb(e,t){if(e.size<=0)throw new qb({code:"EMPTY_FILE",message:(0,E.sprintf)((0,E.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new qb({code:"SIZE_ABOVE_LIMIT",message:(0,E.sprintf)((0,E.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Jb({files:e,onChange:t,onSuccess:n,onError:o,onBatchSuccess:r,additionalData:i,allowedTypes:s}){return async({select:l,dispatch:a})=>{const c=Zb();for(const u of e){try{Yb(u,s),Xb(u,l.getSettings().allowedMimeTypes)}catch(e){o?.(e);continue}try{Qb(u,l.getSettings().maxUploadFileSize)}catch(e){o?.(e);continue}a.addItem({file:u,batchId:c,onChange:t,onSuccess:n,onBatchSuccess:r,onError:o,additionalData:i})}}}function ek(e,t,n=!1){return async({select:o,dispatch:r})=>{const i=o.getItem(e);if(i){if(i.abortController?.abort(),!n){const{onError:e}=i;e?.(null!=t?t:new Error("Upload cancelled")),!e&&t&&console.error("Upload cancelled",t)}r({type:Cb.Cancel,id:e,error:t}),r.removeItem(e),r.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function tk(e){return function(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}(e,e.name)}class nk extends File{constructor(e="stub-file"){super([],e)}}function ok({file:e,batchId:t,onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,additionalData:s={},sourceUrl:l,sourceAttachmentId:a,abortController:c,operations:u}){return async({dispatch:d})=>{const p=Zb(),h=function(e){if(e instanceof File)return e;const t=e.type.split("/")[1],n="application/pdf"===e.type?"document":e.type.split("/")[0];return new File([e],`${n}.${t}`,{type:e.type})}(e);let g;h instanceof nk||(g=(0,Da.createBlobURL)(h),d({type:Cb.CacheBlobUrl,id:p,blobUrl:g})),d({type:Cb.Add,item:{id:p,batchId:t,status:Bb.Processing,sourceFile:tk(h),file:h,attachment:{url:g},additionalData:{convert_format:!1,...s},onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,sourceUrl:l,sourceAttachmentId:a,abortController:c||new AbortController,operations:Array.isArray(u)?u:[Ib.Prepare]}}),d.processItem(p)}}function rk(e){return async({select:t,dispatch:n})=>{if(t.isPaused())return;const o=t.getItem(e),{attachment:r,onChange:i,onSuccess:s,onBatchSuccess:l,batchId:a}=o,c=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0];if(r&&i?.([r]),!c)return r&&s?.([r]),n.revokeBlobUrls(e),void(a&&t.isBatchUploaded(a)&&l?.());if(c)switch(n({type:Cb.OperationStart,id:e,operation:c}),c){case Ib.Prepare:n.prepareItem(o.id);break;case Ib.Upload:n.uploadItem(e)}}}function ik(){return{type:Cb.PauseQueue}}function sk(){return async({select:e,dispatch:t})=>{t({type:Cb.ResumeQueue});for(const n of e.getAllItems())t.processItem(n.id)}}function lk(e){return async({select:t,dispatch:n})=>{t.getItem(e)&&n({type:Cb.Remove,id:e})}}function ak(e,t){return async({dispatch:n})=>{n({type:Cb.OperationFinish,id:e,item:t}),n.processItem(e)}}function ck(e){return async({dispatch:t})=>{const n=[Ib.Upload];t({type:Cb.AddOperations,id:e,operations:n}),t.finishOperation(e,{})}}function uk(e){return async({select:t,dispatch:n})=>{const o=t.getItem(e);t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([t])=>{(0,Da.isBlobURL)(t.url)||n.finishOperation(e,{attachment:t})},onSuccess:([t])=>{n.finishOperation(e,{attachment:t})},onError:t=>{n.cancelItem(e,t)}})}}function dk(e){return async({select:t,dispatch:n})=>{const o=t.getBlobUrls(e);for(const e of o)(0,Da.revokeBlobURL)(e);n({type:Cb.RevokeBlobUrls,id:e})}}function pk(e){return{type:Cb.UpdateSettings,settings:e}}const{lock:hk,unlock:gk}=(0,z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media"),mk="core/upload-media",fk={reducer:Eb,selectors:s,actions:a},bk=(0,h.createReduxStore)(mk,{reducer:Eb,selectors:s,actions:a});(0,h.register)(bk),gk(bk).registerPrivateActions(c),gk(bk).registerPrivateSelectors(l);const kk=(0,g.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,h.useRegistry)(),[r]=(0,p.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,h.createRegistry)({},t),o.registerStore(mk,fk),e.set(t,o)),o}(r,o,t);return i===o?(0,ce.jsx)(e,{registry:o,...n}):(0,ce.jsx)(h.RegistryProvider,{value:i,children:(0,ce.jsx)(e,{registry:i,...n})})}),"withRegistryProvider")((e=>{const{children:t,settings:n}=e,{updateSettings:o}=gk((0,h.useDispatch)(bk));return(0,p.useEffect)((()=>{o(n)}),[n,o]),(0,ce.jsx)(ce.Fragment,{children:t})})),vk=kk;const _k=(0,g.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,h.useRegistry)(),[r]=(0,p.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,h.createRegistry)({},t),o.registerStore(ge,Ci),e.set(t,o)),o}(r,o,t);return i===o?(0,ce.jsx)(e,{registry:o,...n}):(0,ce.jsx)(h.RegistryProvider,{value:i,children:(0,ce.jsx)(e,{registry:i,...n})})}),"withRegistryProvider"),xk=()=>{};function yk({clientId:e=null,value:t,selection:n,onChange:o=xk,onInput:r=xk}){const i=(0,h.useRegistry)(),{resetBlocks:s,resetSelection:l,replaceInnerBlocks:a,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:u}=i.dispatch(Bi),{getBlockName:g,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(Bi),k=(0,h.useSelect)((t=>!e||t(Bi).areInnerBlocksControlled(e)),[e]),v=(0,p.useRef)({incoming:null,outgoing:[]}),_=(0,p.useRef)(!1),x=()=>{t&&(u(),e?i.batch((()=>{c(e,!0);const n=t.map((e=>(0,d.cloneBlock)(e)));_.current&&(v.current.incoming=n),u(),a(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},y=(0,p.useRef)(r),S=(0,p.useRef)(o);(0,p.useEffect)((()=>{y.current=r,S.current=o}),[r,o]),(0,p.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],x(),n&&l(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,p.useRef)(!1);(0,p.useEffect)((()=>{w.current?k||(v.current.outgoing=[],x()):w.current=!0}),[k]),(0,p.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(Bi);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===g(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:y.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),Bi);return()=>{_.current=!1,c()}}),[i,e]),(0,p.useEffect)((()=>()=>{u(),e?(c(e,!1),u(),a(e,[])):s([])}),[])}const Sk=window.wp.keyboardShortcuts;function wk(){return null}wk.Register=function(){const{registerShortcut:e}=(0,h.useDispatch)(Sk.store);return(0,p.useEffect)((()=>{e({name:"core/block-editor/copy",category:"block",description:(0,E.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,E.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,E.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,E.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,E.__)("Remove the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"backspace"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,E.__)("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,E.__)("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,E.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,E.__)("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,E.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,E.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,E.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,E.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,E.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,E.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,E.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}})}),[e]),null};const Ck=wk;const Bk=function(e={}){return(0,p.useMemo)((()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes})),[e])},Ik=()=>{};function jk(e,{allowedTypes:t,additionalData:n={},filesList:o,onError:r=Ik,onFileChange:i,onSuccess:s,onBatchSuccess:l}){e.dispatch(bk).addItems({files:o,onChange:i,onSuccess:s,onBatchSuccess:l,onError:({message:e})=>r(e),additionalData:n,allowedTypes:t})}const Ek=_k((e=>{const{settings:t,registry:n,stripExperimentalSettings:o=!1}=e,r=Bk(t);let i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,p.useMemo)((()=>({...t,mediaUpload:jk.bind(null,n)})),[t,n]));const{__experimentalUpdateSettings:s}=V((0,h.useDispatch)(Bi));(0,p.useEffect)((()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[i,o,s]),yk(e);const l=(0,ce.jsxs)(ys.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,ce.jsx)(Ck.Register,{}),(0,ce.jsx)(Vp,{children:e.children})]});return window.__experimentalMediaProcessing?(0,ce.jsx)(vk,{settings:r,useSubRegistry:!1,children:l}):l})),Tk=e=>(0,ce.jsx)(Ek,{...e,stripExperimentalSettings:!0,children:e.children}),Mk=(0,p.createContext)({});function Pk({value:e,children:t}){const n=(0,p.useContext)(Mk),o=(0,p.useMemo)((()=>({...n,...e})),[n,e]);return(0,ce.jsx)(Mk.Provider,{value:o,children:t})}const Rk=Mk,Nk="core/pattern-overrides",Ak={"core/paragraph":["content"],"core/heading":["content"],"core/image":["id","url","title","alt"],"core/button":["url","text","linkTarget","rel"]};function Lk(e){return!e||0===Object.keys(e).length}function Dk(e){return e in Ak}function Ok(e,t){return Dk(e)&&Ak[e].includes(t)}function zk(e){return e?.__default?.source===Nk}function Fk(e,t){if(zk(t)){const n=Ak[e],o={};for(const e of n){const n=t[e]?t[e]:{source:Nk};o[e]=n}return o}return t}function Vk(e){const{clientId:t}=w(),n=e||t,{updateBlockAttributes:o}=(0,h.useDispatch)(Bi),{getBlockAttributes:r}=(0,h.useRegistry)().select(Bi);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};Lk(l.bindings)&&delete l.bindings,o(n,{metadata:Lk(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:Lk(t)?void 0:t})}}}const Hk={},Uk=(0,ys.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,d.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,ce.jsx)(o,{...e})})),Gk=e=>{const{name:t,clientId:n,attributes:o,setAttributes:r}=e,i=(0,h.useRegistry)(),s=(0,d.getBlockType)(t),l=(0,p.useContext)(Rk),a=(0,h.useSelect)((e=>V(e(d.store)).getAllBlockBindingsSources()),[]),{blockBindings:c,context:u,hasPatternOverrides:g}=(0,p.useMemo)((()=>{const e=s?.usesContext?Object.fromEntries(Object.entries(l).filter((([e])=>s.usesContext.includes(e)))):Hk;return o?.metadata?.bindings&&Object.values(o?.metadata?.bindings||{}).forEach((t=>{a[t?.source]?.usesContext?.forEach((t=>{e[t]=l[t]}))})),{blockBindings:Fk(t,o?.metadata?.bindings),context:e,hasPatternOverrides:zk(o?.metadata?.bindings)}}),[t,s?.usesContext,l,o?.metadata?.bindings,a]),m=(0,h.useSelect)((e=>{if(!c)return o;const r={},i=new Map;for(const[e,n]of Object.entries(c)){const{source:o,args:r}=n,s=a[o];s&&Ok(t,e)&&i.set(s,{...i.get(s),[e]:{args:r}})}if(i.size)for(const[t,o]of i){let i={};t.getValues?i=t.getValues({select:e,context:u,clientId:n,bindings:o}):Object.keys(o).forEach((e=>{i[e]=t.label}));for(const[e,t]of Object.entries(i))"url"!==e||t&&Ic(t)?r[e]=t:r[e]=null}return{...o,...r}}),[o,c,n,u,t,a]),f=(0,p.useCallback)((e=>{c?i.batch((()=>{const o={...e},s=new Map;for(const[e,n]of Object.entries(o)){if(!c[e]||!Ok(t,e))continue;const r=c[e],i=a[r?.source];i?.setValues&&(s.set(i,{...s.get(i),[e]:{args:r.args,newValue:n}}),delete o[e])}if(s.size)for(const[e,t]of s)e.setValues({select:i.select,dispatch:i.dispatch,context:u,clientId:n,bindings:t});const l=!!u["pattern/overrides"];g&&l||!Object.keys(o).length||(g&&(delete o.caption,delete o.href),r(o))})):r(e)}),[c,n,u,g,r,a,t,i]);if(!s)return null;if(s.apiVersion>1)return(0,ce.jsx)(Uk,{...e,attributes:m,context:u,setAttributes:f});const b=(0,d.hasBlockSupport)(s,"className",!0)?(0,d.getBlockDefaultClassName)(t):null,k=hs(b,o?.className,e.className);return(0,ce.jsx)(Uk,{...e,attributes:m,className:k,context:u,setAttributes:f})},$k=(0,ce.jsx)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const Wk=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,ce.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,ce.jsx)("div",{className:hs(e,"block-editor-warning"),children:(0,ce.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,ce.jsx)("p",{className:"block-editor-warning__message",children:n}),(t?.length>0||o)&&(0,ce.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map(((e,t)=>(0,ce.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,ce.jsx)(ys.DropdownMenu,{className:"block-editor-warning__secondary",icon:$k,label:(0,E.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,ce.jsx)(ys.MenuGroup,{children:o.map(((e,t)=>(0,ce.jsx)(ys.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function Kk({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,h.useDispatch)(Bi),r=(0,d.getBlockType)(t);return(0,ce.jsxs)(Wk,{actions:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,E.__)("Find original")},"find-original"),(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,E.__)("Remove")},"remove")],children:[(0,ce.jsxs)("strong",{children:[r?.title,": "]}),(0,E.__)("This block can only be used once.")]})}const Zk=(0,p.createContext)({});function qk({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:l,attributes:a={},__unstableLayoutClassNames:c}=r,{layout:u=null,metadata:h={}}=a,{bindings:g}=h,m=(0,d.hasBlockSupport)(i,"layout",!1)||(0,d.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:x}=(0,p.useContext)(Zk);return(0,ce.jsxs)(S,{value:(0,p.useMemo)((()=>({name:i,isSelected:s,clientId:l,layout:m?u:null,__unstableLayoutClassNames:c,[f]:e,[b]:t,[k]:n,[v]:g,[_]:o})),[i,s,l,m,u,c,e,t,n,g,o]),children:[(0,ce.jsx)(Gk,{...r}),x&&(0,ce.jsx)(Kk,{originalBlockClientId:x,name:i,onReplace:r.onReplace})]})}var Yk=n(8021);function Xk({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,ce.jsxs)("div",{className:i,children:[(0,ce.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ce.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ce.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ce.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ce.jsx)(p.RawHTML,{children:(0,La.safeHTML)(n)})})]}),(0,ce.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}const Qk=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,d.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const l=(a=e.originalContent,c=i,(0,Yk.JJ)(a,c).map(((e,t)=>{const n=hs({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,ce.jsx)("span",{className:n,children:e.value},t)})));var a,c;return(0,ce.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,ce.jsx)(Xk,{title:(0,E.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,E.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,ce.jsx)(Xk,{title:(0,E.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:l,renderedContent:i})]})},Jk=e=>(0,d.rawHandler)({HTML:e.originalContent});function ev({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,h.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(Bi),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,h.useDispatch)(Bi),[i,s]=(0,p.useState)(!1),l=(0,p.useCallback)((()=>s(!1)),[]),a=(0,p.useMemo)((()=>({toClassic(){const e=(0,d.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,d.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Jk(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,d.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),c=(0,p.useMemo)((()=>[{title:(0,E._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,E.__)("Convert to HTML"),onClick:a.toHTML},o&&{title:(0,E.__)("Convert to Classic Block"),onClick:a.toClassic}].filter(Boolean)),[n,o,a]);return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(Wk,{actions:[(0,ce.jsx)(ys.Button,{__next40pxDefaultSize:!0,onClick:a.toRecoveredBlock,variant:"primary",children:(0,E.__)("Attempt recovery")},"recover")],secondaryActions:c,children:(0,E.__)("Block contains unexpected or invalid content.")}),i&&(0,ce.jsx)(ys.Modal,{title:(0,E.__)("Resolve Block"),onRequestClose:l,className:"block-editor-block-compare",children:(0,ce.jsx)(Qk,{block:t,onKeep:a.toHTML,onConvert:a.toBlocks,convertor:Jk,convertButtonText:(0,E.__)("Convert to Blocks")})})]})}const tv=(0,ce.jsx)(Wk,{className:"block-editor-block-list__block-crash-warning",children:(0,E.__)("This block has encountered an error and cannot be previewed.")}),nv=()=>tv;class ov extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const rv=ov;var iv=n(4132);const sv=function({clientId:e}){const[t,n]=(0,p.useState)(""),o=(0,h.useSelect)((t=>t(Bi).getBlock(e)),[e]),{updateBlock:r}=(0,h.useDispatch)(Bi);return(0,p.useEffect)((()=>{n((0,d.getBlockContent)(o))}),[o]),(0,ce.jsx)(iv.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,d.getBlockType)(o.name);if(!i)return;const s=(0,d.getBlockAttributes)(i,t,o.attributes),l=t||(0,d.getSaveContent)(i,s),[a]=t?(0,d.validateBlock)({...o,attributes:s,originalContent:l}):[!0];r(e,{attributes:s,originalContent:l,isValid:a}),t||n(l)},onChange:e=>n(e.target.value)})};var lv=Sv(),av=e=>vv(e,lv),cv=Sv();av.write=e=>vv(e,cv);var uv=Sv();av.onStart=e=>vv(e,uv);var dv=Sv();av.onFrame=e=>vv(e,dv);var pv=Sv();av.onFinish=e=>vv(e,pv);var hv=[];av.setTimeout=(e,t)=>{let n=av.now()+t,o=()=>{let e=hv.findIndex((e=>e.cancel==o));~e&&hv.splice(e,1),bv-=~e?1:0},r={time:n,handler:e,cancel:o};return hv.splice(gv(n),0,r),bv+=1,_v(),r};var gv=e=>~(~hv.findIndex((t=>t.time>e))||~hv.length);av.cancel=e=>{uv.delete(e),dv.delete(e),pv.delete(e),lv.delete(e),cv.delete(e)},av.sync=e=>{kv=!0,av.batchedUpdates(e),kv=!1},av.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,av.onStart(n)}return o.handler=e,o.cancel=()=>{uv.delete(n),t=null},o};var mv=typeof window<"u"?window.requestAnimationFrame:()=>{};av.use=e=>mv=e,av.now=typeof performance<"u"?()=>performance.now():Date.now,av.batchedUpdates=e=>e(),av.catch=console.error,av.frameLoop="always",av.advance=()=>{"demand"!==av.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):yv()};var fv=-1,bv=0,kv=!1;function vv(e,t){kv?(t.delete(e),e(0)):(t.add(e),_v())}function _v(){fv<0&&(fv=0,"demand"!==av.frameLoop&&mv(xv))}function xv(){~fv&&(mv(xv),av.batchedUpdates(yv))}function yv(){let e=fv;fv=av.now();let t=gv(fv);t&&(wv(hv.splice(0,t),(e=>e.handler())),bv-=t),bv?(uv.flush(),lv.flush(e?Math.min(64,fv-e):16.667),dv.flush(),cv.flush(),pv.flush()):fv=-1}function Sv(){let e=new Set,t=e;return{add(n){bv+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(bv-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,bv-=t.size,wv(t,(t=>t(n)&&e.add(t))),bv+=e.size,t=e)}}}function wv(e,t){e.forEach((e=>{try{t(e)}catch(e){av.catch(e)}}))}var Cv=Object.defineProperty,Bv={};function Iv(){}((e,t)=>{for(var n in t)Cv(e,n,{get:t[n],enumerable:!0})})(Bv,{assign:()=>Vv,colors:()=>Ov,createStringInterpolator:()=>Nv,skipAnimation:()=>zv,to:()=>Av,willAdvance:()=>Fv});var jv={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 Ev(e,t){if(jv.arr(e)){if(!jv.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Mv(e,t,n){if(jv.arr(e))for(let o=0;ojv.und(e)?[]:jv.arr(e)?e:[e];function Rv(e,t){if(e.size){let n=Array.from(e);e.clear(),Tv(n,t)}}var Nv,Av,Lv=(e,...t)=>Rv(e,(e=>e(...t))),Dv=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ov=null,zv=!1,Fv=Iv,Vv=e=>{e.to&&(Av=e.to),e.now&&(av.now=e.now),void 0!==e.colors&&(Ov=e.colors),null!=e.skipAnimation&&(zv=e.skipAnimation),e.createStringInterpolator&&(Nv=e.createStringInterpolator),e.requestAnimationFrame&&av.use(e.requestAnimationFrame),e.batchedUpdates&&(av.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Fv=e.willAdvance),e.frameLoop&&(av.frameLoop=e.frameLoop)},Hv=new Set,Uv=[],Gv=[],$v=0,Wv={get idle(){return!Hv.size&&!Uv.length},start(e){$v>e.priority?(Hv.add(e),av.onStart(Kv)):(Zv(e),av(Yv))},advance:Yv,sort(e){if($v)av.onFrame((()=>Wv.sort(e)));else{let t=Uv.indexOf(e);~t&&(Uv.splice(t,1),qv(e))}},clear(){Uv=[],Hv.clear()}};function Kv(){Hv.forEach(Zv),Hv.clear(),av(Yv)}function Zv(e){Uv.includes(e)||qv(e)}function qv(e){Uv.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(Uv,(t=>t.priority>e.priority)),0,e)}function Yv(e){let t=Gv;for(let n=0;n0}var Xv="[-+]?\\d*\\.?\\d+",Qv=Xv+"%";function Jv(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var e_=new RegExp("rgb"+Jv(Xv,Xv,Xv)),t_=new RegExp("rgba"+Jv(Xv,Xv,Xv,Xv)),n_=new RegExp("hsl"+Jv(Xv,Qv,Qv)),o_=new RegExp("hsla"+Jv(Xv,Qv,Qv,Xv)),r_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,i_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,s_=/^#([0-9a-fA-F]{6})$/,l_=/^#([0-9a-fA-F]{8})$/;function a_(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 c_(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=a_(r,o,e+1/3),s=a_(r,o,e),l=a_(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function u_(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function d_(e){return(parseFloat(e)%360+360)%360/360}function p_(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function h_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function g_(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=s_.exec(e))?parseInt(t[1]+"ff",16)>>>0:Ov&&void 0!==Ov[e]?Ov[e]:(t=e_.exec(e))?(u_(t[1])<<24|u_(t[2])<<16|u_(t[3])<<8|255)>>>0:(t=t_.exec(e))?(u_(t[1])<<24|u_(t[2])<<16|u_(t[3])<<8|p_(t[4]))>>>0:(t=r_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=l_.exec(e))?parseInt(t[1],16)>>>0:(t=i_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=n_.exec(e))?(255|c_(d_(t[1]),h_(t[2]),h_(t[3])))>>>0:(t=o_.exec(e))?(c_(d_(t[1]),h_(t[2]),h_(t[3]))|p_(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 m_=(e,t,n)=>{if(jv.fun(e))return e;if(jv.arr(e))return m_({range:e,output:t,extrapolate:n});if(jv.str(e.output[0]))return Nv(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(cn){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var f_=1.70158,b_=1.525*f_,k_=f_+1,v_=2*Math.PI/3,__=2*Math.PI/4.5,x_=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,y_={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=>k_*e*e*e-f_*e*e,easeOutBack:e=>1+k_*Math.pow(e-1,3)+f_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(b_+1)*e-b_)/2:(Math.pow(2*e-2,2)*((b_+1)*(2*e-2)+b_)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*v_),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*v_)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*__)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*__)/2+1,easeInBounce:e=>1-x_(1-e),easeOutBounce:x_,easeInOutBounce:e=>e<.5?(1-x_(1-2*e))/2:(1+x_(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)}},S_=Symbol.for("FluidValue.get"),w_=Symbol.for("FluidValue.observers"),C_=e=>Boolean(e&&e[S_]),B_=e=>e&&e[S_]?e[S_]():e,I_=e=>e[w_]||null;function j_(e,t){let n=e[w_];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var E_=class{[S_];[w_];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");T_(this,e)}},T_=(e,t)=>N_(e,S_,t);function M_(e,t){if(e[S_]){let n=e[w_];n||N_(e,w_,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function P_(e,t){let n=e[w_];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[w_]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var R_,N_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),A_=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,L_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,D_=new RegExp(`(${A_.source})(%|[a-z]+)`,"i"),O_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,z_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,F_=e=>{let[t,n]=V_(e);if(!t||Dv())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&&z_.test(n)?F_(n):n||e},V_=e=>{let t=z_.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},H_=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,U_=e=>{R_||(R_=Ov?new RegExp(`(${Object.keys(Ov).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>B_(e).replace(z_,F_).replace(L_,g_).replace(R_,g_))),n=t.map((e=>e.match(A_).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=>m_({...e,output:t})));return e=>{let n=!D_.test(t[0])&&t.find((e=>D_.test(e)))?.replace(A_,""),r=0;return t[0].replace(A_,(()=>`${o[r++](e)}${n||""}`)).replace(O_,H_)}},G_="react-spring: ",$_=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${G_}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},W_=$_(console.warn);$_(console.warn);function K_(e){return jv.str(e)&&("#"==e[0]||/\d/.test(e)||!Dv()&&z_.test(e)||e in(Ov||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var Z_=Dv()?Ya.useEffect:Ya.useLayoutEffect;function q_(){let e=(0,Ya.useState)()[1],t=(()=>{let e=(0,Ya.useRef)(!1);return Z_((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var Y_=[];var X_=Symbol.for("Animated:node"),Q_=e=>e&&e[X_],J_=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,X_,t),ex=e=>e&&e[X_]&&e[X_].getPayload(),tx=class{payload;constructor(){J_(this,this)}getPayload(){return this.payload||[]}},nx=class extends tx{constructor(e){super(),this._value=e,jv.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new nx(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return jv.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,jv.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ox=class extends nx{_string=null;_toString;constructor(e){super(0),this._toString=m_({output:[e,e]})}static create(e){return new ox(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(jv.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=m_({output:[this.getValue(),e]})),this._value=0,super.reset()}},rx={dependencies:null},ix=class extends tx{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Mv(this.source,((n,o)=>{(e=>!!e&&e[X_]===e)(n)?t[o]=n.getValue(e):C_(n)?t[o]=B_(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Tv(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Mv(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){rx.dependencies&&C_(e)&&rx.dependencies.add(e);let t=ex(e);t&&Tv(t,(e=>this.add(e)))}},sx=class extends ix{constructor(e){super(e)}static create(e){return new sx(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(lx)),!0)}};function lx(e){return(K_(e)?ox:nx).create(e)}function ax(e){let t=Q_(e);return t?t.constructor:jv.arr(e)?sx:K_(e)?ox:nx}var cx=(e,t)=>{let n=!jv.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ya.forwardRef)(((o,r)=>{let i=(0,Ya.useRef)(null),s=n&&(0,Ya.useCallback)((e=>{i.current=function(e,t){return e&&(jv.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return rx.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ix(e),rx.dependencies=null,[e,n]}(o,t),c=q_(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new ux(u,a),p=(0,Ya.useRef)();Z_((()=>(p.current=d,Tv(a,(e=>M_(e,d))),()=>{p.current&&(Tv(p.current.deps,(e=>P_(e,p.current))),av.cancel(p.current.update))}))),(0,Ya.useEffect)(u,[]),(e=>{(0,Ya.useEffect)(e,Y_)})((()=>()=>{let e=p.current;Tv(e.deps,(t=>P_(t,e)))}));let h=t.getComponentProps(l.getValue());return Ya.createElement(e,{...h,ref:s})}))},ux=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&av.write(this.update)}};var dx=Symbol.for("AnimatedComponent"),px=e=>jv.str(e)?e:e&&jv.str(e.displayName)?e.displayName:jv.fun(e)&&e.name||null;function hx(e,...t){return jv.fun(e)?e(...t):e}var gx=(e,t)=>!0===e||!!(t&&e&&(jv.fun(e)?e(t):Pv(e).includes(t))),mx=(e,t)=>jv.obj(e)?t&&e[t]:e,fx=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,bx=e=>e,kx=(e,t=bx)=>{let n=vx;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);jv.und(n)||(o[r]=n)}return o},vx=["config","onProps","onStart","onChange","onPause","onResume","onRest"],_x={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 xx(e){let t=function(e){let t={},n=0;if(Mv(e,((e,o)=>{_x[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Mv(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function yx(e){return e=B_(e),jv.arr(e)?e.map(yx):K_(e)?Bv.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Sx(e){return jv.fun(e)||jv.arr(e)&&jv.obj(e[0])}var wx={tension:170,friction:26,mass:1,damping:1,easing:y_.linear,clamp:!1},Cx=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,wx)}};function Bx(e,t){if(jv.und(t.decay)){let n=!jv.und(t.tension)||!jv.und(t.friction);(n||!jv.und(t.frequency)||!jv.und(t.damping)||!jv.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ix=[],jx=class{changed=!1;values=Ix;toValues=null;fromValues=Ix;to;from;config=new Cx;immediate=!1};function Ex(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=gx(n.cancel??o?.cancel,t);if(u)h();else{jv.und(n.pause)||(r.paused=gx(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||gx(e,t)),a=hx(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-av.now()}function p(){a>0&&!Bv.skipAnimation?(r.delayed=!0,c=av.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var Tx=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Rx(e.get()):t.every((e=>e.noop))?Mx(e.get()):Px(e.get(),t.every((e=>e.finished))),Mx=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Px=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Rx=e=>({value:e,cancelled:!0,finished:!1});function Nx(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=kx(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&Rx(o)||r!==n.asyncId&&Px(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new Lx,s=new Dx;return(async()=>{if(Bv.skipAnimation)throw Ax(n),s.result=Px(o,!1),u(s),s;g(i);let l=jv.obj(e)?{...e}:{...t,to:e};l.parentId=r,Mv(p,((e,t)=>{jv.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Bv.skipAnimation)return Ax(n),Px(o,!1);try{let t;t=jv.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=Px(o.get(),!0,!1)}catch(e){if(e instanceof Lx)d=e.result;else{if(!(e instanceof Dx))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return jv.fun(s)&&av.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function Ax(e,t){Rv(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Lx=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.")}},Dx=class extends Error{result;constructor(){super("SkipAnimationSignal")}},Ox=e=>e instanceof Fx,zx=1,Fx=class extends E_{id=zx++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Q_(this);return e&&e.getValue()}to(...e){return Bv.to(this,e)}interpolate(...e){return W_(`${G_}The "interpolate" function is deprecated in v9 (use "to" instead)`),Bv.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){j_(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Wv.sort(this),j_(this,{type:"priority",parent:this,priority:e})}},Vx=Symbol.for("SpringPhase"),Hx=e=>(1&e[Vx])>0,Ux=e=>(2&e[Vx])>0,Gx=e=>(4&e[Vx])>0,$x=(e,t)=>t?e[Vx]|=3:e[Vx]&=-3,Wx=(e,t)=>t?e[Vx]|=4:e[Vx]&=-5,Kx=class extends Fx{key;animation=new jx;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(),!jv.und(e)||!jv.und(t)){let n=jv.obj(e)?{...e}:{...t,from:e};jv.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ux(this)||this._state.asyncTo)||Gx(this)}get goal(){return B_(this.animation.to)}get velocity(){let e=Q_(this);return e instanceof nx?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Hx(this)}get isAnimating(){return Ux(this)}get isPaused(){return Gx(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=ex(o.to);!s&&C_(o.to)&&(i=Pv(B_(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==ox?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=jv.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(jv.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!jv.und(a),g=i==c?l.v0>0:io,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=Q_(this),a=l.getValue();if(t){let e=B_(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return av.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ux(this)){let{to:e,config:t}=this.animation;av.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 jv.und(e)?(n=this.queue||[],this.queue=[]):n=[jv.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Tx(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Ax(this._state,e&&this._lastCallId),av.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=jv.obj(n)?n[t]:n,(null==n||Sx(n))&&(n=void 0),o=jv.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return Hx(this)||(e.reverse&&([n,o]=[o,n]),o=B_(o),jv.und(o)?Q_(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,kx(e,((e,t)=>/^on/.test(t)?mx(e,n):e))),Jx(this,e,"onProps"),ey(this,"onProps",e,this);let r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return Ex(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{Gx(this)||(Wx(this,!0),Lv(i.pauseQueue),ey(this,"onPause",Px(this,Zx(this,this.animation.to)),this))},resume:()=>{Gx(this)&&(Wx(this,!1),Ux(this)&&this._resume(),Lv(i.resumeQueue),ey(this,"onResume",Px(this,Zx(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=qx(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Rx(this));let o=!jv.und(e.to),r=!jv.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(Rx(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||jv.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Ev(d,c);p&&(l.from=d),d=B_(d);let h=!Ev(u,a);h&&this._focus(u);let g=Sx(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Bx(n={...n},t),t={...n,...t}),Bx(e,t),Object.assign(e,t);for(let t in wx)null==e[t]&&(e[t]=wx[t]);let{mass:o,frequency:r,damping:i}=e;jv.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,hx(t.config,i),t.config!==s.config?hx(s.config,i):void 0);let k=Q_(this);if(!k||jv.und(u))return n(Px(this,!0));let v=jv.und(t.reset)?r&&!t.default:!jv.und(d)&&gx(t.reset,i),_=v?d:this.get(),x=yx(u),y=jv.num(x)||jv.arr(x)||K_(x),S=!g&&(!y||gx(s.immediate||t.immediate,i));if(h){let e=ax(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(x)}}let w=k.constructor,C=C_(u),B=!1;if(!C){let e=v||!Hx(this)&&p;(h||e)&&(B=Ev(yx(_),x),C=!B),(!Ev(l.immediate,S)&&!S||!Ev(m.decay,f)||!Ev(m.velocity,b))&&(C=!0)}if(B&&Ux(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||C_(a))&&(l.values=k.getPayload(),l.toValues=C_(u)?null:w==ox?[1]:Pv(x)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;Tv(Qx,(e=>Jx(this,t,e)));let o=Px(this,Zx(this,a));Lv(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&av.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?hx(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(Nx(t.to,t,this._state,this)):C?this._start():Ux(this)&&!h?this._pendingCalls.add(n):n(Mx(_))}_focus(e){let t=this.animation;e!==t.to&&(I_(this)&&this._detach(),t.to=e,I_(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;C_(t)&&(M_(t,this),Ox(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;C_(e)&&P_(e,this)}_set(e,t=!0){let n=B_(e);if(!jv.und(n)){let e=Q_(this);if(!e||!Ev(n,e.getValue())){let o=ax(n);e&&e.constructor==o?e.setValue(n):J_(this,o.create(n)),e&&av.batchedUpdates((()=>{this._onChange(n,t)}))}}return Q_(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,ey(this,"onStart",Px(this,Zx(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),hx(this.animation.onChange,e,this)),hx(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Q_(this).reset(B_(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Ux(this)||($x(this,!0),Gx(this)||this._resume())}_resume(){Bv.skipAnimation?this.finish():Wv.start(this)}_stop(e,t){if(Ux(this)){$x(this,!1);let n=this.animation;Tv(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),j_(this,{type:"idle",parent:this});let o=t?Rx(this.get()):Px(this.get(),Zx(this,e??n.to));Lv(this._pendingCalls,o),n.changed&&(n.changed=!1,ey(this,"onRest",o,this))}}};function Zx(e,t){let n=yx(t);return Ev(yx(e.get()),n)}function qx(e,t=e.loop,n=e.to){let o=hx(t);if(o){let r=!0!==o&&xx(o),i=(r||e).reverse,s=!r||r.reset;return Yx({...e,loop:t,default:!1,pause:void 0,to:!i||Sx(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function Yx(e){let{to:t,from:n}=e=xx(e),o=new Set;return jv.obj(t)&&Xx(t,o),jv.obj(n)&&Xx(n,o),e.keys=o.size?Array.from(o):null,e}function Xx(e,t){Mv(e,((e,n)=>null!=e&&t.add(n)))}var Qx=["onStart","onRest","onChange","onPause","onResume"];function Jx(e,t,n){e.animation[n]=t[n]!==fx(t,n)?mx(t[n],e.key):void 0}function ey(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var ty=["onStart","onChange","onRest"],ny=1,oy=class{id=ny++;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];jv.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Yx(e)),this}start(e){let{queue:t}=this;return e?t=Pv(e).map(Yx):this.queue=[],this._flush?this._flush(this,t):(ay(this,t),ry(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Tv(Pv(t),(t=>n[t].stop(!!e)))}else Ax(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(jv.und(e))this.start({pause:!0});else{let t=this.springs;Tv(Pv(e),(e=>t[e].pause()))}return this}resume(e){if(jv.und(e))this.start({pause:!1});else{let t=this.springs;Tv(Pv(e),(e=>t[e].resume()))}return this}each(e){Mv(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,Rv(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&Rv(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,Rv(n,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}av.onFrame(this._onFrame)}};function ry(e,t){return Promise.all(t.map((t=>iy(e,t)))).then((t=>Tx(e,t)))}async function iy(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=jv.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=jv.arr(r)||jv.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Tv(ty,(n=>{let o=t[n];if(jv.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,Lv(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===fx(t,"cancel");(u||h&&d.asyncId)&&p.push(Ex(++e._lastAsyncId,{props:t,state:d,actions:{pause:Iv,resume:Iv,start(t,n){h?(Ax(d,e._lastAsyncId),n(Rx(e))):(t.onRest=l,n(Nx(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=Tx(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=qx(t,s,r);if(n)return ay(e,[n]),iy(e,n,!0)}return a&&av.batchedUpdates((()=>a(g,e,e.item))),g}function sy(e,t){let n=new Kx;return n.key=e,t&&M_(n,t),n}function ly(e,t,n){t.keys&&Tv(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function ay(e,t){Tv(t,(t=>{ly(e.springs,t,(t=>sy(t,e)))}))}var cy=({children:e,...t})=>{let n=(0,Ya.useContext)(uy),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Ya.useState)((()=>({inputs:t,result:e()}))),o=(0,Ya.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=uy;return Ya.createElement(i,{value:t},e)},uy=function(e,t){return Object.assign(e,Ya.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(cy,{});cy.Provider=uy.Provider,cy.Consumer=uy.Consumer;var dy=class extends Fx{constructor(e,t){super(),this.source=e,this.calc=m_(...t);let n=this._get(),o=ax(n);J_(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Ev(t,this.get())||(Q_(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&hy(this._active)&&gy(this)}_get(){let e=jv.arr(this.source)?this.source.map(B_):Pv(B_(this.source));return this.calc(...e)}_start(){this.idle&&!hy(this._active)&&(this.idle=!1,Tv(ex(this),(e=>{e.done=!1})),Bv.skipAnimation?(av.batchedUpdates((()=>this.advance())),gy(this)):Wv.start(this))}_attach(){let e=1;Tv(Pv(this.source),(t=>{C_(t)&&M_(t,this),Ox(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Tv(Pv(this.source),(e=>{C_(e)&&P_(e,this)})),this._active.clear(),gy(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=Pv(this.source).reduce(((e,t)=>Math.max(e,(Ox(t)?t.priority:0)+1)),0))}};function py(e){return!1!==e.idle}function hy(e){return!e.size||Array.from(e).every(py)}function gy(e){e.idle||(e.idle=!0,Tv(ex(e),(e=>{e.done=!0})),j_(e,{type:"idle",parent:e}))}Bv.assign({createStringInterpolator:U_,to:(e,t)=>new dy(e,t)});Wv.advance;const my=window.ReactDOM;var fy=/^--/;function by(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||fy.test(e)||vy.hasOwnProperty(e)&&vy[e]?(""+t).trim():t+"px"}var ky={};var vy={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},_y=["Webkit","Ms","Moz","O"];vy=Object.keys(vy).reduce(((e,t)=>(_y.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),vy);var xy=/^(matrix|translate|scale|rotate|skew)/,yy=/^(translate)/,Sy=/^(rotate|skew)/,wy=(e,t)=>jv.num(e)&&0!==e?e+t:e,Cy=(e,t)=>jv.arr(e)?e.every((e=>Cy(e,t))):jv.num(e)?e===t:parseFloat(e)===t,By=class extends ix{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>wy(e,"px"))).join(",")})`,Cy(e,0)]))),Mv(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if(xy.test(t)){if(delete o[t],jv.und(e))return;let n=yy.test(t)?"px":Sy.test(t)?"deg":"";r.push(Pv(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${wy(r,n)})`,Cy(r,0)]:e=>[`${t}(${e.map((e=>wy(e,n))).join(",")})`,Cy(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new Iy(r,i)),super(o)}},Iy=class extends E_{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 Tv(this.inputs,((n,o)=>{let r=B_(n[0]),[i,s]=this.transforms[o](jv.arr(r)?r:n.map(B_));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&Tv(this.inputs,(e=>Tv(e,(e=>C_(e)&&M_(e,this)))))}observerRemoved(e){0==e&&Tv(this.inputs,(e=>Tv(e,(e=>C_(e)&&P_(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),j_(this,e)}};Bv.assign({batchedUpdates:my.unstable_batchedUpdates,createStringInterpolator:U_,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 jy=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new ix(e),getComponentProps:o=e=>e}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=px(e)||"Anonymous";return(e=jv.str(e)?i[e]||(i[e]=cx(e,r)):e[dx]||(e[dx]=cx(e,r))).displayName=`Animated(${t})`,e};return Mv(e,((t,n)=>{jv.arr(e)&&(n=px(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:ky[t]||(ky[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=by(t,o[t]);fy.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new By(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ey=jy.animated;function Ty(e){return{top:e.offsetTop,left:e.offsetLeft}}const My=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,p.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:a,isDraggingBlocks:c}=(0,h.useSelect)(Bi),{previous:u,prevRect:d}=(0,p.useMemo)((()=>({previous:n.current&&Ty(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,p.useLayoutEffect)((()=>{if(!u||!n.current)return;const e=(0,La.getScrollContainer)(n.current),p=i(t),h=p||s(t),g=c();function m(){if(!g&&h&&d){const t=n.current.getBoundingClientRect().top-d.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const f=p||l(t)||a(t);if(f&&g)return;const b=f?"1":"",k=new oy({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=b,m()}});n.current.style.transform=void 0;const v=Ty(n.current),_=Math.round(u.left-v.left),x=Math.round(u.top-v.top);return k.start({x:0,y:0,from:{x:_,y:x}}),()=>{k.stop(),k.set({x:0,y:0})}}),[u,d,t,o,r,i,s,l,a,c]),n};function Py({clientId:e,initialPosition:t}){const n=(0,p.useRef)(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:i}=V((0,h.useSelect)(Bi));return(0,p.useEffect)((()=>{if(!o(e)||r()||i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if(bm(n.current,s.activeElement))return;const l=La.focus.tabbable.find(n.current).filter((e=>(0,La.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if(bm(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=La.focus.tabbable.findNext(n.current);if(e&&bm(n.current,e)&&(0,La.isFormElement)(e))return void e.focus()}(0,La.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function Ry({clientId:e}){const{hoverBlock:t}=(0,h.useDispatch)(Bi);function n(n){if(n.defaultPrevented)return;const o="mouseover"===n.type?"add":"remove";n.preventDefault(),n.currentTarget.classList[o]("is-hovered"),t("add"===o?e:null)}return(0,g.useRefEffect)((e=>(e.addEventListener("mouseout",n),e.addEventListener("mouseover",n),()=>{e.removeEventListener("mouseout",n),e.removeEventListener("mouseover",n),e.classList.remove("is-hovered"),t(null)})),[])}function Ny(e){const{isBlockSelected:t}=(0,h.useSelect)(Bi),{selectBlock:n,selectionChange:o}=(0,h.useDispatch)(Bi);return(0,g.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):bm(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}const Ay=(0,ce.jsx)(ae.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(ae.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function Ly({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,E.__)("Pattern");return(0,ce.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,ce.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,ce.jsxs)(ys.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,ce.jsx)(ys.FlexItem,{children:t?(0,ce.jsx)(yb,{icon:t}):r||(0,E.sprintf)((0,E._n)("%d block","%d blocks",e),e)}),(0,ce.jsx)(ys.FlexItem,{children:(0,ce.jsx)(yb,{icon:Ay})}),o&&(0,ce.jsx)(ys.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,ce.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}function Dy({clientId:e,isSelected:t}){const{getBlockType:n}=(0,h.useSelect)(d.store),{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:i,getBlockName:s}=V((0,h.useSelect)(Bi)),{insertAfterBlock:l,removeBlock:a,resetZoomLevel:c,startDraggingBlocks:u,stopDraggingBlocks:m}=V((0,h.useDispatch)(Bi));return(0,g.useRefEffect)((d=>{if(t)return d.addEventListener("keydown",h),d.addEventListener("dragstart",g),()=>{d.removeEventListener("keydown",h),d.removeEventListener("dragstart",g)};function h(t){const{keyCode:n,target:o}=t;n!==Oa.ENTER&&n!==Oa.BACKSPACE&&n!==Oa.DELETE||o!==d||(0,La.isTextField)(o)||(t.preventDefault(),n===Oa.ENTER&&r()?c():n===Oa.ENTER?l(e):a(e))}function g(t){if(d!==t.target||d.isContentEditable||d.ownerDocument.activeElement!==d||i())return void t.preventDefault();const r=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});t.dataTransfer.effectAllowed="move",t.dataTransfer.clearData(),t.dataTransfer.setData("wp-blocks",r);const{ownerDocument:l}=d,{defaultView:a}=l;a.getSelection().removeAllRanges();const c=document.createElement("div");(0,p.createRoot)(c).render((0,ce.jsx)(Ly,{icon:n(s(e)).icon})),document.body.appendChild(c),c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.zIndex="1000",c.style.pointerEvents="none";const h=l.createElement("div");h.style.width="1px",h.style.height="1px",h.style.position="fixed",h.style.visibility="hidden",l.body.appendChild(h),t.dataTransfer.setDragImage(h,0,0);let g={x:0,y:0};if(document!==l){const e=a.frameElement;if(e){const t=e.getBoundingClientRect();g={x:t.left,y:t.top}}}function f(e){c.style.transform=`translate( ${e.clientX+g.x}px, ${e.clientY+g.y}px )`}function b(){l.removeEventListener("dragover",f),l.removeEventListener("dragend",b),c.remove(),h.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),l.documentElement.classList.remove("is-dragging")}g.x-=58,f(t),l.addEventListener("dragover",f),l.addEventListener("dragend",b),l.addEventListener("drop",b),u([e]),document.body.classList.add("is-dragging-components-draggable"),l.documentElement.classList.add("is-dragging")}}),[e,t,o,l,a,r,c,i,u,m])}function Oy(){const e=(0,p.useContext)(DS);return(0,g.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function zy({isSelected:e}){const t=(0,g.useReducedMotion)();return(0,g.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function Fy({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=V((0,h.useSelect)(Bi));return(0,g.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const Vy=new Map;function Hy(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),"true"!==t||e.getAttribute("draggable")||e.setAttribute("draggable","true"))}function Uy(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o}=t,r=Vy.get(n);if(o)for(const e of r)"true"===e.getAttribute("draggable")&&e.contains(t)&&(e.removeAttribute("draggable"),e.setAttribute("data-draggable","true"));else for(const e of r)Hy(e)}function Gy(){return(0,g.useRefEffect)((e=>(function(e,t){let n=Vy.get(e);n||(n=new Set,Vy.set(e,n),e.addEventListener("pointerdown",Uy)),n.add(t)}(e.ownerDocument,e),()=>{!function(e,t){const n=Vy.get(e);n&&(n.delete(t),Hy(t),0===n.size&&(Vy.delete(e),e.removeEventListener("pointerdown",Uy)))}(e.ownerDocument,e)})),[])}function $y(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:a,blockApiVersion:c,blockTitle:u,isSelected:d,isSubtreeDisabled:h,hasOverlay:m,initialPosition:f,blockEditingMode:b,isHighlighted:k,isMultiSelected:_,isPartiallySelected:x,isReusable:y,isDragging:S,hasChildSelected:C,isEditingDisabled:B,hasEditableOutline:I,isTemporarilyEditingAsBlocks:j,defaultClassName:T,isSectionBlock:M,canMove:P}=(0,p.useContext)(Zk),R=(0,E.sprintf)((0,E.__)("Block: %s"),u),N="html"!==l||t?"":"-visual",A=Gy(),L=(0,g.useMergeRefs)([e.ref,Py({clientId:n,initialPosition:f}),Hp(n),Ny(n),Dy({clientId:n,isSelected:d}),Ry({clientId:n}),Oy(),My({triggerAnimationOnChange:s,clientId:n}),(0,g.useDisabled)({isDisabled:!m}),Fy({clientId:n,isEnabled:M}),zy({isSelected:d}),P?A:void 0]),D=w(),O=!!D[v]&&Dk(a)?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};c<2&&D.clientId;let z=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(z=!0),{tabIndex:"disabled"===b?-1:0,draggable:!(!P||C)||void 0,...r,...e,ref:L,id:`block-${n}${N}`,role:"document","aria-label":R,"data-block":n,"data-type":a,"data-title":u,inert:h?"true":void 0,className:hs("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":m,"is-selected":d,"is-highlighted":k,"is-multi-selected":_,"is-partially-selected":x,"is-reusable":y,"is-dragging":S,"has-child-selected":C,"is-editing-disabled":B,"has-editable-outline":I,"has-negative-margin":z,"is-content-locked-temporarily-editing-as-blocks":j},o,e.className,r.className,T),style:{...r.style,...e.style,...O}}}function Wy({children:e,isHtml:t,...n}){return(0,ce.jsx)("div",{...$y(n,{__unstableIsHtml:t}),children:e})}function Ky({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:l,__unstableLayoutClassNames:a,name:c,isValid:u,attributes:h,wrapperProps:g,setAttributes:m,onReplace:f,onRemove:b,onInsertBlocksAfter:k,onMerge:v,toggleSelection:_}){var x;const{mayDisplayControls:y,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,p.useContext)(Zk),B=ql()||{};let I=(0,ce.jsx)(qk,{name:c,isSelected:i,attributes:h,setAttributes:m,insertBlocksAfter:n?void 0:k,onReplace:o?f:void 0,onRemove:o?b:void 0,mergeBlocks:o?v:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:_,__unstableLayoutClassNames:a,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:y,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const j=(0,d.getBlockType)(c);j?.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=hs(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(g,j.getEditWrapperProps(h)));const E=g&&!!g["data-align"]&&!w,T=l?.includes("is-position-sticky");let M;if(E&&(I=(0,ce.jsx)("div",{className:hs("wp-block",T&&l),"data-align":g["data-align"],children:I})),u)M="html"===t?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("div",{style:{display:"none"},children:I}),(0,ce.jsx)(Wy,{isHtml:!0,children:(0,ce.jsx)(sv,{clientId:r})})]}):j?.apiVersion>1?I:(0,ce.jsx)(Wy,{children:I});else{const t=e?(0,d.serializeRawBlock)(e):(0,d.getSaveContent)(j,h);M=(0,ce.jsxs)(Wy,{className:"has-warning",children:[(0,ce.jsx)(ev,{clientId:r}),(0,ce.jsx)(p.RawHTML,{children:(0,La.safeHTML)(t)})]})}const{"data-align":P,...R}=null!==(x=g)&&void 0!==x?x:{},N={...R,className:hs(R.className,P&&w&&`align${P}`,!(P&&T)&&l)};return(0,ce.jsx)(Zk.Provider,{value:{wrapperProps:N,isAligned:E,...C},children:(0,ce.jsx)(rv,{fallback:(0,ce.jsx)(Wy,{className:"has-warning",children:(0,ce.jsx)(nv,{})}),children:M})})}$y.save=d.__unstableGetBlockProps;const Zy=(0,h.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:l,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:c,removeBlock:u,selectBlock:p}=e(Bi);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(Bi),i=r(),{clientId:s}=t,l=i.length?i:[s];o(l,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(Bi),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:l}=t,{getPreviousBlockClientId:a,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(Bi);function x(){const e=g(o),t=(0,d.getDefaultBlockName)(),r=(0,d.getBlockType)(t);if(f(o)!==t){const n=(0,d.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,d.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{u(o),p(e)}))}else if(r.merge){const n=r.merge({},e.attributes);s([o],[(0,d.createBlock)(t,n)])}}function y(e,t=!0){const o=f(e),i="text"===(0,d.getBlockType)(o).category,s=v(e),l=b(e),[a]=l;1===l.length&&(0,d.isUnmodifiedBlock)(g(a))?u(e):i?n.batch((()=>{if(_(f(a),s))c([a],e,s,k(e));else{const n=(0,d.switchToBlockType)(g(a),(0,d.getDefaultBlockName)());n&&n.length&&n.every((e=>_(e.name,s)))?(r(n,k(e),s,t),u(a,!1)):x()}!b(e).length&&(0,d.isUnmodifiedBlock)(g(e))&&u(e,!1)})):x()}if(e){if(l){const e=h(l);if(e){if(f(l)!==f(e))return void i(l,e);{const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(e),e,l),u(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?y(e,!1):i(o,e)}else{const e=a(o);if(e)i(e,o);else if(l){const e=a(l);if(e&&f(l)===f(e)){const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(l),l,e),u(l,!1)}))}y(l)}else x()}},onReplace(e,n,o){e.length&&!(0,d.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},onRemove(){u(t.clientId)},toggleSelection(e){l(e)}}}));Ky=(0,g.compose)(Zy,(0,ys.withFilters)("editor.BlockListBlock"))(Ky);const qy=(0,p.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,h.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,isSectionBlock:l,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:p,getSettings:h,getTemporarilyEditingAsBlocks:g,getBlockEditingMode:m,getBlockName:f,isFirstMultiSelectedBlock:b,getMultiSelectedBlockClientIds:k,hasSelectedInnerBlock:v,getBlocksByName:_,getBlockIndex:x,isBlockMultiSelected:y,isBlockSubtreeDisabled:S,isBlockHighlighted:w,__unstableIsFullySelected:C,__unstableSelectionHasUnmergeableBlock:B,isBlockBeingDragged:I,isDragging:j,__unstableHasActiveBlockOverlayActive:E,getSelectedBlocksInitialCaretPosition:T}=V(e(Bi)),M=a(t);if(!M)return;const{hasBlockSupport:P,getActiveBlockVariation:R}=e(d.store),N=c(t),{name:A,isValid:L}=M,D=(0,d.getBlockType)(A),{supportsLayout:O,isPreviewMode:z}=h(),F=D?.apiVersion>1,H={isPreviewMode:z,blockWithoutAttributes:M,name:A,attributes:N,isValid:L,themeSupportsLayout:O,index:x(t),isReusable:(0,d.isReusableBlock)(D),className:F?N.className:void 0,defaultClassName:F?(0,d.getBlockDefaultClassName)(A):void 0,blockTitle:D?.title};if(z)return H;const U=o(t),G=u(t),$=p(t),W=R(A,N),K=y(t),Z=v(t,!0),q=m(t),Y=(0,d.hasBlockSupport)(A,"multiple",!0)?[]:_(A),X=Y.length&&Y[0]!==t;return{...H,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),isSectionBlock:l(t),canRemove:G,canMove:$,isSelected:U,isTemporarilyEditingAsBlocks:g()===t,blockEditingMode:q,mayDisplayControls:U||b(t)&&k().every((e=>f(e)===A)),mayDisplayParentControls:P(f(t),"__experimentalExposeControlsToChildren",!1)&&v(t),blockApiVersion:D?.apiVersion||1,blockTitle:W?.title||D?.title,isSubtreeDisabled:"disabled"===q&&S(t),hasOverlay:E(t)&&!j(),initialPosition:U?T():void 0,isHighlighted:w(t),isMultiSelected:K,isPartiallySelected:K&&!C()&&!B(),isDragging:I(t),hasChildSelected:Z,isEditingDisabled:"disabled"===q,hasEditableOutline:"disabled"!==q&&"disabled"===m(n),originalBlockClientId:!!X&&Y[0]}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:l=!1,canRemove:a=!1,canMove:c=!1,blockWithoutAttributes:u,name:g,attributes:m,isValid:f,isSelected:b=!1,themeSupportsLayout:k,isTemporarilyEditingAsBlocks:v,blockEditingMode:_,mayDisplayControls:x,mayDisplayParentControls:y,index:S,blockApiVersion:w,blockTitle:C,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isSectionBlock:A,isEditingDisabled:L,hasEditableOutline:D,className:O,defaultClassName:z,originalBlockClientId:F}=o,H=(0,p.useMemo)((()=>({...u,attributes:m})),[u,m]);if(!o)return null;const U={isPreviewMode:r,clientId:t,className:O,index:S,mode:i,name:g,blockApiVersion:w,blockTitle:C,isSelected:b,isSubtreeDisabled:B,hasOverlay:I,initialPosition:j,blockEditingMode:_,isHighlighted:E,isMultiSelected:T,isPartiallySelected:M,isReusable:P,isDragging:R,hasChildSelected:N,isSectionBlock:A,isEditingDisabled:L,hasEditableOutline:D,isTemporarilyEditingAsBlocks:v,defaultClassName:z,mayDisplayControls:x,mayDisplayParentControls:y,originalBlockClientId:F,themeSupportsLayout:k,canMove:c};return(0,ce.jsx)(Zk.Provider,{value:U,children:(0,ce.jsx)(Ky,{...e,mode:i,isSelectionEnabled:s,isLocked:l,canRemove:a,canMove:c,block:H,name:g,attributes:m,isValid:f,isSelected:b})})})),Yy=window.wp.htmlEntities,Xy="\ufeff";function Qy({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,h.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(Bi),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,h.useDispatch)(Bi);if(n||r)return null;const l=(0,Yy.decodeEntities)(o)||(0,E.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,ce.jsxs)("div",{"data-root-client-id":e||"",className:hs("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,ce.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,E.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Oa.ENTER!==e.keyCode&&Oa.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:Xy}),(0,ce.jsx)(NB,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function Jy({rootClientId:e}){return(0,h.useSelect)((t=>t(Bi).canInsertBlockType((0,d.getDefaultBlockName)(),e)))?(0,ce.jsx)(Qy,{rootClientId:e}):(0,ce.jsx)(DB,{rootClientId:e,className:"block-list-appender__toggle"})}function eS({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,h.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(Bi),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,ce.jsx)(o,{tabIndex:-1,className:hs("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,ce.jsx)(t,{}):(0,ce.jsx)(Jy,{rootClientId:e})})}const tS=Number.MAX_SAFE_INTEGER;(0,p.createContext)();const nS=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[a,c]=(0,p.useReducer)((e=>(e+1)%tS),0),{orientation:u,rootClientId:d,isVisible:g}=(0,h.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(Bi),s=r(null!=e?e:t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),m=$p(e),f=$p(t),b="vertical"===u,k=(0,p.useMemo)((()=>{if(a<0||!m&&!f||!g)return;return{contextElement:"group"===i?f||m:m||f,getBoundingClientRect(){const e=m?m.getBoundingClientRect():null,t=f?f.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else b?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,E.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0),r=Math.max(r,0));return new window.DOMRect(n,o,r,l)}}}),[m,f,a,b,g,i,s]),v=pm(r);return(0,p.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(c);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]),(0,p.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(c);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,p.useLayoutEffect)((()=>{if(m)return m.ownerDocument.defaultView.addEventListener("resize",c),()=>{m.ownerDocument.defaultView?.removeEventListener("resize",c)}}),[m]),(m||f)&&g?(0,ce.jsx)(ys.Popover,{ref:v,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:hs("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,ce.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+d):null},oS={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const rS=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,h.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(Bi),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,g.useReducedMotion)();return(0,ce.jsx)(jm,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,ce.jsx)(ys.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?oS.show:oS.hide,animate:oS.show,exit:o?oS.show:oS.exit,className:"block-editor-block-popover__drop-zone-foreground"})})},iS=(0,p.createContext)();function sS({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,h.useDispatch)(Bi),s=(0,p.useContext)(iS),l=(0,p.useRef)(),{orientation:a,previousClientId:c,nextClientId:u,rootClientId:d,isInserterShown:m,isDistractionFree:f,isZoomOutMode:b}=(0,h.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isZoomOut:a}=V(e(Bi)),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=i(d);for(;r(p);)p=s(p);const h=l();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isDistractionFree:h.isDistractionFree,isInserterShown:c?.__unstableWithInserter,isZoomOutMode:a()}}),[]),{getBlockEditingMode:k}=(0,h.useSelect)(Bi),v=(0,g.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},x={start:{scale:v?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(f)return null;if(b&&"insert"!==n)return null;const y=hs("block-editor-block-list__insertion-point","horizontal"===a||"group"===n?"is-horizontal":"is-vertical");return(0,ce.jsx)(nS,{previousClientId:c,nextClientId:u,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,ce.jsxs)(ys.__unstableMotion.div,{layout:!v,initial:v?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&u&&"disabled"!==k(u)&&r(u,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:hs(y,{"is-with-inserter":m}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,ce.jsx)(ys.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,ce.jsx)(ys.__unstableMotion.div,{variants:x,className:hs("block-editor-block-list__insertion-point-inserter"),children:(0,ce.jsx)(NB,{position:"bottom center",clientId:u,rootClientId:d,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function lS(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,h.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(Bi),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,ce.jsx)(rS,{...e},`${t.rootClientId}-${t.index}`):(0,ce.jsx)(sS,{operation:t.operation,nearestSide:t.nearestSide,...e})}function aS(){const e=(0,p.useContext)(iS),t=(0,h.useSelect)((e=>e(Bi).getSettings().isDistractionFree||V(e(Bi)).isZoomOut()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:a,getBlockEditingMode:c,getBlockName:u,getBlockAttributes:d,getParentSectionBlock:m}=V((0,h.useSelect)(Bi)),{showInsertionPoint:f,hideInsertionPoint:b}=(0,h.useDispatch)(Bi);return(0,g.useRefEffect)((p=>{if(!t)return p.addEventListener("mousemove",h),()=>{p.removeEventListener("mousemove",h)};function h(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void b();let p;if(!t.target.classList.contains("is-root-container")){p=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(l(p)||"disabled"===c(p)||"core/block"===u(p)||p&&d(p).layout?.isManualPlacement)return;const h=n(p),g=h?.orientation||"vertical",k=!!h?.__experimentalCaptureToolbars,v=t.clientY,_=t.clientX;let x=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===g&&t.top>v||e.classList.contains("wp-block")&&"horizontal"===g&&((0,E.isRTL)()?t.right<_:t.left>_)}));if(!x)return void b();if(!x.id&&(x=x.firstElementChild,!x))return void b();const y=x.id.slice(6);if(!y||a(y)||m(y))return;if(i().includes(y)&&"vertical"===g&&!k&&!s().hasFixedToolbar)return;const S=x.getBoundingClientRect();if("horizontal"===g&&(t.clientY>S.bottom||t.clientYS.right||t.clientX{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function uS(e){return(0,ce.jsx)("div",{ref:cS(),...e})}const dS=new WeakMap;function pS(){let e;return t=>(void 0!==e&&$a()(e,t)||(e=t),e)}function hS(e){const[t]=(0,p.useState)(pS);return t(e)}function gS(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}function mS(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:l,getBlockOrder:a,getBlocksByClientId:c,getSettings:u,getBlock:g}=(0,h.useSelect)(Bi),{getGroupingBlockName:m}=(0,h.useSelect)(d.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:x}=(0,h.useDispatch)(Bi),y=(0,h.useRegistry)(),S=(0,p.useCallback)(((n,s=!0,l=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=a(e)[t];if("replace"===o)_(u,n,void 0,l);else if("group"===o){const t=g(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,d.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),a=i("core/gallery",e),p=(0,d.createBlock)(s&&a?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&a?null:"nowrap"}},o);_([u,...c],p,void 0,l)}else f(n,t,e,s,l)}),[a,e,t,o,_,g,r,i,m,f]),w=(0,p.useCallback)(((n,r,i)=>{if("replace"===o){const o=c(n),r=a(e)[t];y.batch((()=>{x(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,a,c,b,y,x,_,t,e]),C=function(e,t,n,o,r,i,s,l,a){return c=>{const{srcRootClientId:u,srcClientIds:p,type:h,blocks:g}=gS(c);if("inserter"===h){s();const e=g.map((e=>(0,d.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(p[0]);if(u===e&&s===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===l){const e=p.map((e=>a(e)));return void i(e,!0,null,p)}const c=u===e,d=p.length;r(p,u,c&&s{if(!t().mediaUpload)return;const s=(0,d.findTransform)((0,d.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,u,k,i,S),I=function(e){return t=>{const n=(0,d.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,La.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function fS(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s=e.x&&t.top<=e.y&&t.bottom>=e.y}const kS=30,vS=120,_S=120;function xS(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function yS(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function SS({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,h.useRegistry)(),[i,s]=(0,p.useState)({index:null,operation:"insert"}),{getBlockType:l,getBlockVariations:a,getGroupingBlockName:c}=(0,h.useSelect)(d.store),{canInsertBlockType:u,getBlockListSettings:m,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:x,isGroupable:y,isZoomOut:S,getSectionRootClientId:w,getBlockParents:C}=V((0,h.useSelect)(Bi)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:T}=V((0,h.useDispatch)(Bi)),M=mS("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,g.useThrottle)((0,p.useCallback)(((o,i)=>{x()||j();const p=k(),h=[t,...C(t,!0)];if(p.some((e=>h.includes(e))))return;const g=_(t),I=v([t])[0],T=v(p);if(!xS(l,g,T,I))return;const M=w();if(S()&&M!==t)return;const P=f(t);if(0===P.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const R=P.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,d.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>i.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:b(t),blockOrientation:m(t)?.orientation}})),N=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=fS(t,e,["top","bottom"]);if(e.height>vS&&n_S&&n{const p=o();let[g,m]=fS(t,p,r);const[f,b]=fS(t,p,["left","right"]),k=bS(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f=e.y}(t,p))&&(a=u,c=b),g"core/image"===e)),o=u("core/gallery",t),r=y([e.clientId,k()]),i=a(c(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:A,operation:L,nearestSide:D});const e=["before","after"].includes(L)?n:t;B(e,A,{operation:L,nearestSide:D})}))}}),[x,_,t,v,k,l,w,S,f,m,e,n,b,r,j,B,u,y,a,c]),200);return(0,g.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:M,onDragOver(e){P(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;yS(e.relatedTarget,t)||yS(e.target,t)||(P.cancel(),I())},onDragEnd(){P.cancel(),T(),I()}})}const wS={};function CS({children:e,clientId:t}){const n=function(e){return(0,h.useSelect)((t=>{const n=t(Bi).getBlock(e);if(!n)return;const o=t(d.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,ce.jsx)(Pk,{value:n,children:e})}const BS=(0,p.memo)($S);function IS(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:l,template:a,templateLock:c,wrapperRef:u,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:f,renderAppender:b,orientation:k,placeholder:v,layout:_,name:x,blockType:y,parentLock:S,defaultLayout:w}=e;!function(e,t,n,o,r,i,s,l,a,c,u,d){const g=(0,h.useRegistry)(),m=hS(n),f=hS(o),b=void 0===a||"contentOnly"===t?t:a;(0,p.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==u)t.orientation=u;else{const e=$l(d?.type);t.orientation=e.getOrientation(d)}void 0!==s&&(B()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(B()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&B()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),dS.get(g)||dS.set(g,{}),dS.get(g)[e]=t,window.queueMicrotask((()=>{const e=dS.get(g);if(Object.keys(e).length){const{updateBlockListSettings:t}=g.dispatch(Bi);t(e),dS.set(g,{})}}))}),[e,m,f,b,r,i,s,l,c,u,d,g])}(t,S,n,o,r,i,s,l,c,m,k,_),function(e,t,n,o){const r=(0,h.useRegistry)(),i=(0,p.useRef)(null);(0,p.useLayoutEffect)((()=>{let s=!1;const{getBlocks:l,getSelectedBlocksInitialCaretPosition:a,isBlockSelected:c}=r.select(Bi),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:p}=r.dispatch(Bi);return window.queueMicrotask((()=>{if(s)return;const r=l(e),h=0===r.length||"all"===n||"contentOnly"===n,g=!j()(t,i.current);if(!h||!g)return;i.current=t;const m=(0,d.synchronizeBlocksWithTemplate)(r,t);j()(m,r)||(p(),u(e,m,0===r.length&&o&&0!==m.length&&c(e),a()))})),()=>{s=!0}}),[t,n,e,r,o])}(t,a,c,g);const C=(0,d.getBlockSupport)(x,"layout")||(0,d.getBlockSupport)(x,"__experimentalLayout")||wS,{allowSizingOnChildren:I=!1}=C,E=_||C,T=(0,p.useMemo)((()=>({...w,...E,...I&&{allowSizingOnChildren:!0}})),[w,E,I]),M=(0,ce.jsx)(BS,{rootClientId:t,renderAppender:b,__experimentalAppenderTagName:f,layout:T,wrapperRef:u,placeholder:v});return y?.providesContext&&0!==Object.keys(y.providesContext).length?(0,ce.jsx)(CS,{clientId:t,children:M}):M}function jS(e){return yk(e),(0,ce.jsx)(IS,{...e})}const ES=(0,p.forwardRef)(((e,t)=>{const n=TS({ref:t},e);return(0,ce.jsx)("div",{className:"block-editor-inner-blocks",children:(0,ce.jsx)("div",{...n})})}));function TS(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:l=""}=w(),a=(0,h.useSelect)((e=>{const{getBlockName:t,isZoomOut:n,getTemplateLock:o,getBlockRootClientId:r,getBlockEditingMode:s,getBlockSettings:l,getSectionRootClientId:a}=V(e(Bi));if(!i){const e=a();return{isDropZoneDisabled:n()&&""!==e}}const{hasBlockSupport:c,getBlockType:u}=e(d.store),p=t(i),h=s(i),g=r(i),[m]=l(i,"layout");let f="disabled"===h;if(n()){const e=a();f=i!==e}return{__experimentalCaptureToolbars:c(p,"__experimentalExposeControlsToChildren",!1),name:p,blockType:u(p),parentLock:o(g),parentClientId:g,isDropZoneDisabled:f,defaultLayout:m}}),[i]),{__experimentalCaptureToolbars:c,name:u,blockType:p,parentLock:m,parentClientId:f,isDropZoneDisabled:b,defaultLayout:k}=a,v=SS({dropZoneElement:r,rootClientId:i,parentClientId:f}),_=(0,g.useMergeRefs)([e.ref,o||b||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:v]),x={__experimentalCaptureToolbars:c,layout:s,name:u,blockType:p,parentLock:m,defaultLayout:k,...t},y=x.value&&x.onChange?jS:IS;return{...e,ref:_,className:hs(e.className,"block-editor-block-list__layout",n?"":l),children:i?(0,ce.jsx)(y,{...x,clientId:i}):(0,ce.jsx)($S,{...t})}}TS.save=d.__unstableGetInnerBlocksProps,ES.DefaultBlockAppender=function(){const{clientId:e}=w();return(0,ce.jsx)(Qy,{rootClientId:e})},ES.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=w();return(0,ce.jsx)(DB,{className:hs({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},ES.Content=()=>TS.save().children;const MS=ES,PS=new Set([Oa.UP,Oa.RIGHT,Oa.DOWN,Oa.LEFT,Oa.ENTER,Oa.BACKSPACE]);function RS(){const e=(0,h.useSelect)((e=>e(Bi).isTyping()),[]),{stopTyping:t}=(0,h.useDispatch)(Bi);return(0,g.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function NS(){const{isTyping:e}=(0,h.useSelect)((e=>{const{isTyping:t}=e(Bi);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,h.useDispatch)(Bi),o=RS(),r=(0,g.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let a;function c(e){const{target:t}=e;a=i.setTimeout((()=>{(0,La.isTextField)(t)||n()}))}function u(e){const{keyCode:t}=e;t!==Oa.ESCAPE&&t!==Oa.TAB||n()}function d(){s.isCollapsed||n()}return o.addEventListener("focus",c),o.addEventListener("keydown",u),r.addEventListener("selectionchange",d),()=>{i.clearTimeout(a),o.removeEventListener("focus",c),o.removeEventListener("keydown",u),r.removeEventListener("selectionchange",d)}}function l(e){const{type:n,target:r}=e;(0,La.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&PS.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,g.useMergeRefs)([o,r])}const AS=function({children:e}){return(0,ce.jsx)("div",{ref:NS(),children:e})};function LS({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,p.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:l,blockInsertionPointVisible:a,blockInsertionPoint:c,blocksBeingDragged:u}=(0,h.useSelect)((e=>{const{getInsertionPoint:t,getBlockOrder:n,getSectionRootClientId:o,isBlockInsertionPointVisible:r,getBlockInsertionPoint:i,getDraggedBlockClientIds:s}=V(e(Bi)),l=o();return{sectionRootClientId:l,sectionClientIds:n(l),blockOrder:n(l),insertionPoint:t(),blockInsertionPoint:i(),blockInsertionPointVisible:r(),blocksBeingDragged:s()}}),[]),d=(0,g.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;const f=0===l?.index&&e===s[l.index],b=l&&l.hasOwnProperty("index")&&e===s[l.index-1];"top"===n&&(m=f||a&&0===c.index&&e===s[c.index]),"bottom"===n&&(m=b||a&&e===s[c.index-1]);const k=u[0],v=u.includes(e),_=s.indexOf(k),x=_>0?s[_-1]:null;return(v||x===e)&&(m=!1),(0,ce.jsx)(ys.__unstableAnimatePresence,{children:m&&(0,ce.jsx)(ys.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:d?0:.2,ease:[.6,0,.4,1]},className:hs("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,ce.jsx)(ys.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,E.__)("Drop pattern.")})})})}const DS=(0,p.createContext)(),OS=new WeakMap;function zS({className:e,...t}){const{isOutlineMode:n,isFocusMode:o,temporarilyEditingAsBlocks:r}=(0,h.useSelect)((e=>{const{getSettings:t,getTemporarilyEditingAsBlocks:n,isTyping:o}=V(e(Bi)),{outlineMode:r,focusMode:i}=t();return{isOutlineMode:r&&!o(),isFocusMode:i,temporarilyEditingAsBlocks:n()}}),[]),i=(0,h.useRegistry)(),{setBlockVisibility:s}=(0,h.useDispatch)(Bi),l=(0,g.useDebounce)((0,p.useCallback)((()=>{const e={};OS.get(i).forEach((([t,n])=>{e[t]=n})),s(e)}),[i]),300,{trailing:!0}),a=(0,p.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{OS.get(i)||OS.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");OS.get(i).push([e,t.isIntersecting])}l()}))}),[]),c=TS({ref:(0,g.useMergeRefs)([cS(),aS(),NS()]),className:hs("is-root-container",e,{"is-outline-mode":n,"is-focus-mode":o})},t);return(0,ce.jsxs)(DS.Provider,{value:a,children:[(0,ce.jsx)("div",{...c}),!!r&&(0,ce.jsx)(FS,{clientId:r})]})}function FS({clientId:e}){const{stopEditingAsBlocks:t}=V((0,h.useDispatch)(Bi)),n=(0,h.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(Bi);return n(e)||o(e,!0)}),[e]);return(0,p.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function VS(e){return(0,ce.jsx)(S,{value:x,children:(0,ce.jsx)(zS,{...e})})}const HS=[],US=new Set;function GS({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Wl}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:c,visibleBlocks:u,shouldRenderAppender:p}=(0,h.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:l,getTemplateLock:a,getBlockEditingMode:c,isSectionBlock:u,isZoomOut:p,canInsertBlockType:h}=V(e(Bi)),g=o(t);if(n().isPreviewMode)return{order:g,selectedBlocks:HS,visibleBlocks:US};const m=r(),f=m[0],b=!(t||f||g.length&&h((0,d.getDefaultBlockName)(),t)),k=!(!t||!f||t!==f);return{order:g,selectedBlocks:m,visibleBlocks:l(),isZoomOut:p(),shouldRenderAppender:!u(t)&&"disabled"!==c(t)&&!a(t)&&i&&!p()&&(s||k||b)}}),[t,i,s]);return(0,ce.jsxs)(Zl,{value:r,children:[l.map((e=>(0,ce.jsxs)(h.AsyncModeProvider,{value:!u.has(e)&&!c.includes(e),children:[a&&(0,ce.jsx)(LS,{clientId:e,rootClientId:t,position:"top"}),(0,ce.jsx)(qy,{rootClientId:t,clientId:e}),a&&(0,ce.jsx)(LS,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,p&&(0,ce.jsx)(eS,{tagName:o,rootClientId:t,CustomAppender:n})]})}function $S(e){return(0,ce.jsx)(h.AsyncModeProvider,{value:!1,children:(0,ce.jsx)(GS,{...e})})}function WS(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(Bi);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function KS(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,h.useSelect)(WS,[]);return(0,g.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function ZS(e,t,n,o){let r,i=La.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&fm(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!La.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 qS(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,h.useSelect)(Bi),{selectBlock:i}=(0,h.useDispatch)(Bi);return(0,g.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===Oa.UP,f=c===Oa.DOWN,b=c===Oa.LEFT,k=c===Oa.RIGHT,v=m||b,_=b||k,x=m||f,y=_||x,S=d||p||h||g,w=x?La.isVerticalEdge:La.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!y)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===Oa.UP||t===Oa.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;x?l||(l=(0,La.computeCaretRect)(B)):l=null;const I=(0,La.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=ZS(e,t,s);return n&&km(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!x||!(0,La.isVerticalEdge)(u,v)||h&&!(0,La.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,La.isHorizontalEdge)(u,I)&&!j){const e=ZS(u,I,s);(0,La.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=ZS(u,v,s,!0);e&&((0,La.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function YS(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,h.useSelect)(Bi),{multiSelect:o,selectBlock:r}=(0,h.useDispatch)(Bi),i=(0,Sk.__unstableUseShortcutEventMatch)();return(0,g.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,La.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function XS(e,t){e.contentEditable=t,t&&e.focus()}function QS(){const{startMultiSelect:e,stopMultiSelect:t}=(0,h.useDispatch)(Bi),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,h.useSelect)(Bi);return(0,g.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u,d;function p(){t(),a.removeEventListener("mouseup",p),u=a.requestAnimationFrame((()=>{if(!o())return;XS(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function h({buttons:t,target:o,relatedTarget:l}){o.contains(d)&&(o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",p),XS(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",(function({target:e}){d=e})),()=>{s.removeEventListener("mouseout",h),a.removeEventListener("mouseup",p),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function JS(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function ew(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function tw(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,h.useDispatch)(Bi),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,h.useSelect)(Bi);return(0,g.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,La.isSelectionForward)(e)?null!==(o=t.previousSibling)&&void 0!==o?o:t.parentElement:t.childNodes[n];var o}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){JS(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=km(u),g=km(d);if(p){const e=r(),t=km(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void JS(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=ew(u),l=ew(d);if(s&&l){var m,f;const e=c.getRangeAt(0),t=(0,de.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,de.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=null!==(m=t.start)&&void 0!==m?m:t.end,i=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function nw(){const{selectBlock:e}=(0,h.useDispatch)(Bi),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,h.useSelect)(Bi);return(0,g.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=km(i.target);i.shiftKey?s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function ow(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:l,getSelectionStart:a,getSelectionEnd:c,getBlockAttributes:u}=(0,h.useSelect)(Bi),{replaceBlocks:p,__unstableSplitSelection:m,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,h.useDispatch)(Bi);return(0,g.useRefEffect)((h=>{function g(e){"true"===h.contentEditable&&e.preventDefault()}function _(g){if(!g.defaultPrevented)if(r())g.keyCode===Oa.ENTER?(h.contentEditable=!1,g.preventDefault(),e()?p(t(),(0,d.createBlock)((0,d.getDefaultBlockName)())):m()):g.keyCode===Oa.BACKSPACE||g.keyCode===Oa.DELETE?(h.contentEditable=!1,g.preventDefault(),e()?f(t()):o()?b(g.keyCode===Oa.DELETE):k()):1!==g.key.length||g.metaKey||g.ctrlKey||(h.contentEditable=!1,o()?b(g.keyCode===Oa.DELETE):(g.preventDefault(),h.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(g.keyCode===Oa.ENTER){if(g.shiftKey||e())return;const t=n(),o=i(t),r=a(),h=c();if(r.attributeKey===h.attributeKey){const e=u(t)[r.attributeKey],n=(0,d.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,d.findTransform)(n,(t=>t.regExp.test(e)));if(o)return p(t,o.transform({content:e})),void v()}if(!(0,d.hasBlockSupport)(o,"splitting",!1)&&!g.__deprecatedOnSplit)return;s(o,l(t))&&(m(),g.preventDefault())}}function x(e){r()&&(h.contentEditable=!1,o()?b():(e.preventDefault(),h.ownerDocument.defaultView.getSelection().removeAllRanges()))}return h.addEventListener("beforeinput",g),h.addEventListener("keydown",_),h.addEventListener("compositionstart",x),()=>{h.removeEventListener("beforeinput",g),h.removeEventListener("keydown",_),h.removeEventListener("compositionstart",x)}}),[])}function rw(){const{getBlockName:e}=(0,h.useSelect)(Bi),{getBlockType:t}=(0,h.useSelect)(d.store),{createSuccessNotice:n}=(0,h.useDispatch)(ur.store);return(0,p.useCallback)(((o,r)=>{let i="";if("copyStyles"===o)i=(0,E.__)("Styles copied to clipboard.");else if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,E.sprintf)((0,E.__)('Copied "%s" to clipboard.'),s):(0,E.sprintf)((0,E.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,E.sprintf)((0,E._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,E.sprintf)((0,E._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[n,e,t])}function iw({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,La.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const sw=Symbol("requiresWrapperOnCopy");function lw(e,t,n){let o=t;const[r]=t;if(r){if(n.select(d.store).getBlockType(r.name)[sw]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(Bi),s=e(r.clientId),l=t(s);l&&(o=(0,d.createBlock)(l,i(s),o))}}const i=(0,d.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,La.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function aw(){const e=(0,h.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:c,canInsertBlockType:u,getBlockRootClientId:p}=(0,h.useSelect)(Bi),{flashBlock:m,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,h.useDispatch)(Bi),x=rw();return(0,g.useRefEffect)((h=>{function g(g){if(g.defaultPrevented)return;const y=n();if(0===y.length)return;if(!o()){const{target:e}=g,{ownerDocument:t}=e;if("copy"===g.type||"cut"===g.type?(0,La.documentHasUncollapsedSelection)(t):(0,La.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=g.target.ownerDocument;if(!h.contains(S))return;const w=a(),C=l()||s(),B=!C&&!w;if("copy"===g.type||"cut"===g.type)if(g.preventDefault(),1===y.length&&m(y[0]),B)v();else{let n;if(x(g.type,y),C)n=t(y);else{const[e,o]=c();n=[e,...t(y.slice(1,y.length-1)),o]}lw(g,n,e)}if("cut"===g.type)C&&!B?f(y):(g.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===g.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r();if("true"===g.clipboardData.getData("rich-text"))return;const{plainText:t,html:n,files:l}=iw(g),a=s();let c=[];if(l.length){const e=(0,d.getBlockTransforms)("from");c=l.reduce(((t,n)=>{const o=(0,d.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else c=(0,d.pasteHandler)({HTML:n,plainText:t,mode:a?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof c)return;if(a)return b(y,c,c.length-1,-1),void g.preventDefault();if(!o()&&!(0,d.hasBlockSupport)(i(y[0]),"splitting",!1)&&!g.__deprecatedOnSplit)return;const[h]=y,m=p(h),f=[];for(const e of c)if(u(e.name,m))f.push(e);else{const t=i(m),n=e.name!==t?(0,d.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)f.push(t)}_(f),g.preventDefault()}}return h.ownerDocument.addEventListener("copy",g),h.ownerDocument.addEventListener("cut",g),h.ownerDocument.addEventListener("paste",g),()=>{h.ownerDocument.removeEventListener("copy",g),h.ownerDocument.removeEventListener("cut",g),h.ownerDocument.removeEventListener("paste",g)}}),[])}function cw(){const[e,t,n]=function(){const e=(0,p.useRef)(),t=(0,p.useRef)(),n=(0,p.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i,getBlockOrder:s,getLastFocus:l,getSectionRootClientId:a,isZoomOut:c}=V((0,h.useSelect)(Bi)),{setLastFocus:u}=V((0,h.useDispatch)(Bi)),d=(0,p.useRef)();function m(t){const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(d.current)d.current=null;else if(o())e.current.focus();else if(r())l()?.current?l().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(c()){const t=a(),o=s(t);o.length?e.current.querySelector(`[data-block="${o[0]}"]`).focus():t?e.current.querySelector(`[data-block="${t}"]`).focus():n.focus()}else{const o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=La.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const f=(0,ce.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),b=(0,ce.jsx)("div",{ref:n,tabIndex:"0",onFocus:m}),k=(0,g.useRefEffect)((s=>{function a(e){if(e.defaultPrevented)return;if(e.keyCode!==Oa.TAB)return;if(!o()&&!r())return;const i=e.shiftKey,s=i?"findPrevious":"findNext",l=La.focus.tabbable[s](e.target),a=e.target.closest("[data-block]"),c=a&&l&&(fm(a,l)||bm(a,l));if((0,La.isFormElement)(l)&&c)return;const u=i?t:n;d.current=!0,u.current.focus({preventScroll:!0})}function c(e){u({...l(),current:e.target});const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){if(o.keyCode!==Oa.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=La.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:h}=s,{defaultView:g}=h;return g.addEventListener("keydown",p),s.addEventListener("keydown",a),s.addEventListener("focusout",c),()=>{g.removeEventListener("keydown",p),s.removeEventListener("keydown",a),s.removeEventListener("focusout",c)}}),[]);return[f,(0,g.useMergeRefs)([e,k]),b]}(),o=(0,h.useSelect)((e=>e(Bi).hasMultiSelection()),[]);return[e,(0,g.useMergeRefs)([t,aw(),ow(),QS(),tw(),nw(),KS(),YS(),qS(),(0,g.useRefEffect)((e=>(e.tabIndex=0,e.dataset.hasMultiSelection=o,o?(e.setAttribute("aria-label",(0,E.__)("Multiple selected blocks")),()=>{delete e.dataset.hasMultiSelection,e.removeAttribute("aria-label")}):()=>{delete e.dataset.hasMultiSelection})),[o])]),n]}const uw=(0,p.forwardRef)((function({children:e,...t},n){const[o,r,i]=cw();return(0,ce.jsxs)(ce.Fragment,{children:[o,(0,ce.jsx)("div",{...t,ref:(0,g.useMergeRefs)([r,n]),className:hs(t.className,"block-editor-writing-flow"),children:e}),i]})}));let dw=null;function pw({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-2*e)/o}function hw({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:i}]=(0,g.useResizeObserver)(),[s,{width:l,height:a}]=(0,g.useResizeObserver)(),c=(0,p.useRef)(0),u=1!==o,d=(0,g.useReducedMotion)(),h="auto-scaled"===o,m=(0,p.useRef)(!1),f=(0,p.useRef)(null);(0,p.useEffect)((()=>{u||(c.current=l)}),[l,u]);const b=Math.max(c.current,l),k=h?pw({frameSize:e,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:b}):o,v=(0,p.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=(0,p.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),x=(0,p.useCallback)((()=>{const{scrollTop:e}=v.current,{scrollTop:n}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${e}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${n}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(function(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:i,frameSize:s,scrollTop:l}=t;return[{translate:"0 0",scale:n,paddingTop:o/n+"px",paddingBottom:o/n+"px"},{translate:`0 ${r-l}px`,scale:i,paddingTop:s/i+"px",paddingBottom:s/i+"px"}]}(v.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})}),[t]),y=(0,p.useCallback)((()=>{m.current=!1,f.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=_.current}),[t]),S=(0,p.useRef)(!1);return(0,p.useEffect)((()=>{const e=t&&S.current!==u;if(S.current=u,e&&(m.current=!0,u))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}}),[t,u]),(0,p.useEffect)((()=>{if(t&&(h&&1!==v.current.scaleValue&&(v.current.scaleValue=pw({frameSize:v.current.frameSize,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:l})),k<1&&(m.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${b}px`)),m.current))if(m.current=!1,f.current){f.current.reverse();const e=v.current,t=_.current;v.current=t,_.current=e}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=a,_.current={scaleValue:k,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=function(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:i}=t;return o*(i/n)+2*r}(v.current,_.current),_.current.scrollTop=function(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:i}=e,{containerHeight:s,frameSize:l,scaleValue:a,scrollHeight:c}=t;let u=i;u=(u+n/2-o)/r-n/2,u=(u+s/2)*a+l-s/2,u=i<=o?0:u;const d=c-s;return Math.round(Math.min(Math.max(0,u),Math.max(0,d)))}(v.current,_.current),f.current=x(),d?y():f.current.onfinish=y}),[x,y,d,h,k,e,t,i,l,a,n,b]),{isZoomedOut:u,scaleContainerWidth:b,contentResizeListener:r,containerResizeListener:s}}function gw(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function mw(e){return(0,g.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;gw(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function fw({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,E.__)("Editor canvas"),...a}){const{resolvedAssets:c,isPreviewMode:u}=(0,h.useSelect)((e=>{const{getSettings:t}=e(Bi),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.isPreviewMode}}),[]),{styles:d="",scripts:m=""}=c,[f,b]=(0,p.useState)(),[k,v]=(0,p.useState)([]),_=cS(),[x,y,S]=cw(),w=(0,g.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}e._load=()=>{b(e.contentDocument)};const{ownerDocument:o}=e;function r(){const{contentDocument:r}=e,{documentElement:i}=r;t=r,i.classList.add("block-editor-iframe__html"),_(i),r.dir=o.dir;for(const e of dw||(dw=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(n.id.startsWith("wp-"))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),dw))r.getElementById(e.id)||(r.head.appendChild(e.cloneNode(!0)),u||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),t.addEventListener("click",(e=>{if("A"===e.target.tagName){e.preventDefault();const n=e.target.getAttribute("href");n?.startsWith("#")&&(t.defaultView.location.hash=n.slice(1))}}))}return v(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),e.addEventListener("load",r),()=>{delete e._load,e.removeEventListener("load",r),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),{contentResizeListener:C,containerResizeListener:B,isZoomedOut:I,scaleContainerWidth:j}=hw({scale:o,frameSize:parseInt(r),iframeDocument:f}),T=(0,g.useDisabled)({isDisabled:!i}),M=(0,g.useMergeRefs)([mw(f),e,_,y,T]),P=`\n\n\t\n\t\t\n\t\t\n\t\t